This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Artifical dwarf2 debug info
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Sun, 15 Dec 2002 11:19:24 -0500
- Subject: Re: [RFA] Artifical dwarf2 debug info
- References: <3DFBD14C.7090501@suse.cz>
On Sun, Dec 15, 2002 at 01:48:12AM +0100, Michal Ludvig wrote:
> Hi all,
> this long patch provides a fix for a very annoying fact, that GDB on
> x86-64 can't do backtraces from hand-optimized assembler functions (that
> applies for example to glibc's memset, str*, etc as well as to syscall
> wrappers).
Workaround, really - just for some particular functions...
> My approach to fix this behaviour is based on the fortunate fact, that
> most of those affected glibc's functions don't touch the stack at all,
> so creating an artifical FDE for them is easy.
Lucky. We can use this to solve a similar problem on i386 but that
will require an actual FDE.
> Advantages of this approach are simplicity and cleanliness. There is no
> need to "manually" fill in values in CFI's context structure - just
> provide a valid, simple FDE and everything else will be done
> automagically. This new FDE is of course joined to all other FDEs read
> from the file before and is automatically used when needed again.
>
> The patch is transparent to architectures that are not prepared to have
> advantage of it and shouldn't hurt anything.
Great. One big problem: gdbarch.h and gdbarch.c are generated files.
Add this to gdbarch.sh instead, and regenerate them. Also it needs
documentation, as Eli said.
It would be nice if there were routines in dwarf2cfi.[ch] for creating
FDEs instead of having hex in the tdep file but that doesn't really
bother me. We can do that later when I need real FDEs.
> OK to commit to branch and mainline?
I do not believe this is appropriate for the branch, at least until
it's sat on mainline without causing problems for some time.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer