How can I get a backtrace on segfault?

Tobias Pankrath tobias at pankrath.net
Wed Sep 14 01:07:54 PDT 2011


struct Foo 
{
	int bar_;
	@property
	int bar() { return bar; }
}

Foo myFoo;
myFoo.bar; // (1)

The program will segfault at (1). I would have spot the error
much faster, if I've got a decent backtrace, instead of
"segmentation fault".

How can I get one? I've found the backtrace handler in
object_.d, but I don't know how to make it work.






More information about the Digitalmars-d-learn mailing list