A working backtrace for linux
Rory Mcguire
rjmcguire at gm_no_ail.com
Wed Aug 4 03:34:09 PDT 2010
Thanks!!
The code at the start of this thread didn't work at all for me but what
you've done works.
David Bryant wrote:
> 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.
More information about the Digitalmars-d
mailing list