Tango backtrace hack?
Fawzi Mohamed
fmohamed at mac.com
Wed Apr 1 12:10:14 PDT 2009
On 2009-04-01 19:16:20 +0200, grauzone <none at example.net> said:
>> - linux: backtrace, get just the addresses, those can be resolved
>> through addr2line to have function and file/line number
>
> You can get the mangled function name in a very simple way: just open
> /proc/self/exe and read the .symtab and .strtab sections. That's not
> perfect, but better than nothing, and it's probably much simpler than
> to parse the debugging infos.
patch are welcome ;)
at the moment I use dladdr which on mac gives info for both static and
dynamically loaded objects, but on linux gives just the offset to the
beginning of the static exe image.
Fawzi
More information about the Digitalmars-d
mailing list