This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

trying to characterize the circumstances under which backtrace() works reliably


I'm working on a very tiny little source lib intended to make
debugging C using instrumentation a bit easier.  It's just a wrapper
around dladdr(), backtrace(), nm, and addr2line that tries to make it
easy to see the backtrace or what a function pointer actually points
to.

It mostly works great, but I'd like to be able to characterize as
precisely as possible the compilation options that are needed or
allowed for it to work correctly.  I believe I've got it mostly sorted
out for pointer lookups (dladdr() + nm) but backtrace (backtrace() +
addr2line) not so much.  I get some inconsistent line number behavior
(other email).  I wonder how effective addr2line --inlines option is
at figuring things out is the presence of inlining.

Is there any good source on this anywhere, beyond what's in the
backtrace()  and addr2line man pages?

Thanks,
Britton


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