more patches
Philip Blundell
pb@nexus.co.uk
Tue Jun 9 06:01:00 GMT 1998
>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.
More information about the Libc-hacker
mailing list