This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

Re: more patches


>We know the ranges of address space occupied by program code.  We can
>scan up the stack looking for numbers in those ranges.  Those are very
>likely to be return addresses.  We report all those, and then weed out
>false positives in backtrace_symbols by checking against the symbol
>table.  (It might not be necessary to bother; the programmer can
>easily spot them.)
>
>That should make backtrace() not need frame pointers to work.

I don't think this is a good idea.  The most obvious thing that would confuse 
it is a local variable that's a function pointer. 

We always say that if you build with -fomit-frame-pointer the resulting code 
will be undebuggable.  It seems perfectly reasonable for this to apply to 
backtraces too.

p.




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