September 09, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #30 from Sean Kelly <sean@invisibleduck.org> 2010-09-09 13:32:47 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 16, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #31 from Trass3r <mrmocool@gmx.de> 2010-09-16 05:07:27 PDT ---
Note that ddmd has custom working stack trace code for windoze. Maybe this could help in some way.

http://dsource.org/projects/ddmd

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 02, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1001


vano <ivan.melnychuk+d@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ivan.melnychuk+d@gmail.com


--- Comment #32 from vano <ivan.melnychuk+d@gmail.com> 2010-10-02 10:18:36 PDT ---
(In reply to comment #24)
> There's two big things left on my list for stacktraces (at least on linux) that
> need to be done:
> 
> 1) the default dmd.conf needs to have -L--export-dynamic in it 2) the strings from backtrace_symbols need to be demangled
> 
> Any collapsing of recursion is a distant second in my opinion.
> 
> Obviously, for those that use windows, traces on windows would probably go above #1 in priority -- but I'm not in that set. :)

So true! The lack of backtrace (stacktrace) on Windows is so frustrating. I really hope that with this bug having quite few votes Sean would implement it in the near future.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 07, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1001


Benjamin Thaut <code@benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@benjamin-thaut.de


--- Comment #33 from Benjamin Thaut <code@benjamin-thaut.de> 2010-10-07 06:39:34 PDT ---
For a win32 stacktrace (XP+) you might check my project on this:

http://3d.benjamin-thaut.de/?p=15

Kind Regards
Benjamin Thaut

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 24, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #34 from Witold Baryluk <baryluk@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: -------
January 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #35 from Sean Kelly <sean@invisibleduck.org> 2011-01-20 15:40:41 PST ---
(In reply to comment #33)
> For a win32 stacktrace (XP+) you might check my project on this:
> 
> http://3d.benjamin-thaut.de/?p=15

Thanks!  I've noticed that the code doesn't have a Boost-compatible copyright. Would you be averse to changing this so some derivative could be used in druntime?  I also found this in the MSDN docs:

"All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function."

http://msdn.microsoft.com/en-us/library/ms681327(v=vs.85).aspx

I guess that means that the stack trace generation on Windows will have to be wrapped in a synchronized block.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #36 from Trass3r <mrmocool@gmx.de> 2011-03-15 05:10:07 PDT ---
What's the status of Windows stack trace integration?

Note that Benjamin's code needs to be updated by adding an opApply version with index to class Callstack.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 16, 2011
<d-bugmail@puremagic.com> wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=1001
> 
> 
> 
> --- Comment #36 from Trass3r <mrmocool@gmx.de> 2011-03-15 05:10:07 PDT ---
> What's the status of Windows stack trace integration?
> 
> Note that Benjamin's code needs to be updated by adding an opApply version with index to class Callstack.

Next release.
March 23, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #37 from Benjamin Thaut <code@benjamin-thaut.de> 2011-03-23 00:56:13 PDT ---
(In reply to comment #36)
> What's the status of Windows stack trace integration?
> 
> Note that Benjamin's code needs to be updated by adding an opApply version with index to class Callstack.

I just updated the code on my blog, the opApply issue is fixed and it is also under a new licence which hopefully removes the problem of adding it to phobos.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1001



--- Comment #38 from Sean Kelly <sean@invisibleduck.org> 2011-03-24 12:10:44 PDT ---
The changes are in.  I worked from the original implementation, since I'd already taken care of the opApply issue and such.

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