This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Artifical dwarf2 debug info


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]