[Issue 1001] print stack trace (in debug mode) when program die

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 24 08:23:55 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #34 from Witold Baryluk <baryluk at smp.if.uj.edu.pl> 2010-11-24 08:22:14 PST ---
(In reply to comment #30)
> Okay, demangling added for Linux and OSX.  I'll try to make sure that
> -L--export-dynamic is added to dmd.conf on Linux for the next release.

Wouldn't it be better, if it will be added by compiler itself when command line
have any of  -g, -gc, -debug, -cov, -profile?


BTW. after adding -L--export-dynamic under Linux stacktrace display works
almost perfectly.

Example:

$D/dmt> ./dmt  s.dt
std.stream.OpenException: Cannot open or create file 's.dt'
----------------
./dmt(std std.stream.StreamException.__ctor(immutable(char)[])) [0x809ccf9]
./dmt(std std.stream.StreamFileException.__ctor(immutable(char)[])) [0x80a0507]
./dmt(std std.stream.OpenException.__ctor(immutable(char)[])) [0x80a0527]
./dmt(_D3std6stream4File4openMFAyaE3std6stream8FileModeZv+0xe5) [0x80a06d9]
./dmt(_D3std6stream4File6__ctorMFAyaE3std6stream8FileModeZC3std6stream4File+0x25)
[0x80a05ed]
./dmt(_D3std6stream12BufferedFile6__ctorMFAyaE3std6stream8FileModekZC3std6stream12BufferedFile+0x28)
[0x80a0c9c]
./dmt(bool dmt.Convert(immutable(char)[], immutable(char)[])) [0x808a7e9]
./dmt(_Dmain+0x1ef) [0x808b323]
./dmt(extern (C) int rt.dmain2.main(int, char**)) [0x8091279]
./dmt(extern (C) int rt.dmain2.main(int, char**)) [0x80911cf]
./dmt(extern (C) int rt.dmain2.main(int, char**)) [0x80912bf]
./dmt(extern (C) int rt.dmain2.main(int, char**)) [0x80911cf]
./dmt(main+0xa7) [0x8091177]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7630c76]
./dmt() [0x808a431]
$

I had everything compiled with -gc -L--export-dynamic including druntime and
phobos. For some reasons it still do not demangle some symbols. It happens both
in when compiling phobos/druntime with -release and without it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list