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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 3 01:19:37 PST 2010


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



--- Comment #7 from Brad Roberts <braddr at puremagic.com> 2010-02-03 01:19:34 PST ---
Created an attachment (id=560)
first pass patch to add stack tracing for exceptions on linux

It's dumping filename (always the test binary name right now) and address, but
not function name for some reason.. at least on my debian amd/64 box.  I'm not
sure yet why it's failing to find the symbols right now.  I need to pull the
code over into a C app to make sure it works there.  That'd at least help
narrow down where the problem lies.

Current output:
$ ./obj/posix/debug/unittest.brad            
object.Exception: blah
----------------
./obj/posix/debug/unittest.brad [0x804b684]
./obj/posix/debug/unittest.brad [0x804b65c]
./obj/posix/debug/unittest.brad [0x804ab0b]
./obj/posix/debug/unittest.brad [0x804a8f0]
./obj/posix/debug/unittest.brad [0x804ab27]
./obj/posix/debug/unittest.brad [0x80491de]
./obj/posix/debug/unittest.brad [0x80491f0]
./obj/posix/debug/unittest.brad [0x804b93c]
./obj/posix/debug/unittest.brad [0x804b745]
./obj/posix/debug/unittest.brad [0x804b97e]
./obj/posix/debug/unittest.brad [0x804b745]
./obj/posix/debug/unittest.brad [0x804b603]
/lib32/libc.so.6(__libc_start_main+0xe6) [0xf7e02b46]
./obj/posix/debug/unittest.brad [0x8049101]

test code:
public import std.c.stdio;

void foo()
{
    throw new Exception("blah");
}

int main(char[][] args)
{   
    foo();
    printf("Success!\n");
    return 0;
}

-- 
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