Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2005 17:21:10 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Ed Maste <emaste@phaedrus.sandvine.ca>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: How to get stack from every thread when doing crash dump?
Message-ID:  <0674fbcfaecb08e9ffb3a39eaa9cf3d2@xcllnt.net>
In-Reply-To: <20050704231359.GA58430@sandvine.com>
References:  <20050623102024.GA89874@frontfree.net> <200506231815.44052.peter@wemm.org> <20050704231359.GA58430@sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 4, 2005, at 4:14 PM, Ed Maste wrote:

> I tried changing the linker script to put both in the .debug_frame
> section, but ld faild ("Not enough room for program headers").  The
> .eh_frame section is marked loadable, so it seems ld still tries to
> create a phdr entry for it.  Once I can figure out how to address
> that I'll test out adding the .cfi_ pseudo-ops to exception.s.

This will not resolve the problem. The problem relates to how signal
frames need to be handled in userland code. In order to unwind across
traps and signal frames, the debugger needs to know 2 things: which
functions are for kernel entry (or signal trampoline) and how to get
to the saved registers. Only the first can possibly be addressed by
unwind information. One still need to teach the debugger about the
trapframes (or signal frames) themselves.

I'm working on the import of GDB 6.3, which allows us to handle this
case by registering special frame unwinders.

Adding .cfi directives is probably a good idea, but it needs a bit
more work to fix backtraces.

-- 
  Marcel Moolenaar         USPA: A-39004          marcel@xcllnt.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0674fbcfaecb08e9ffb3a39eaa9cf3d2>