A working backtrace for linux
David Bryant
bagnose at gmail.com
Tue Aug 3 22:26:31 PDT 2010
Ok,
I've added -L--export-dynamic to dmd.conf and done a copy/modify of
DefaultTraceInfo from runtime.d to include demangling and catch certain
signals. My backtraces now look gorgeous under Linux.
I've attached the source for the updated module.
Thanks,
Dave
On 04/08/10 12:39, Sean Kelly wrote:
> Graham St Jack Wrote:
>>
>> Sean, is there any chance of you rolling some of the good stuff in this
>> code into druntime?
>>
>> In particular, it would be very nice to get symbol names in a stacktrace
>> rather than a bunch of addresses, and even nicer to get a stacktrace on
>> a SIGSEGV.
>
> You can get the symbol names by adding -L--export-dynamic to your DFLAGS in dmd.conf. That option is on by default on OSX and I didn't realize it was different on Linux. I'll sort out demangling as well, it's just a bit more work. I like the stack trace code provided, but it uses a lot of modules that aren't available to druntime so it would be difficult to use directly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backtrace.d
Type: text/x-dsrc
Size: 3026 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100804/0b6f270a/attachment.d>
More information about the Digitalmars-d
mailing list