Exception stack traces on Phobos2? (Win or Lin)
Jonathan M Davis
jmdavisprog at gmail.com
Sat Sep 4 17:21:58 PDT 2010
On Saturday 04 September 2010 15:14:30 Nick Sabalausky wrote:
> "Nick Sabalausky" <a at a.a> wrote in message
> news:i5ufqs$1v26$1 at digitalmars.com...
>
> > Is there a way to get stack traces for exceptions on Phobos2? For either
> > Windows (preferably), or for Linux.
>
> Oops, sorry, I completely forgot I asked the exact same thing here little
> more than a month ago :)
>
> But, someone there reported they're getting them in Linux as long as they
> don't use -release, but on Linux, even with both -debug and -g, I'm just
> getting meaningless addresses, no names or anything.
Add
-L--export-dynamic
to your dmd build command, and you should get mangled names. Demangled names are
still in the works unfortunately, but it's better than nothing.
Personally, my real problem is the difficulty in figuring out which unittest an
exception was thrown from when it's not an assert in the unit test itself which
fails. But fixing that would require name unit tests, and Walter hasn't agreed to
do those yet...
In any case, you should be able to get mangled names on linux.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list