Bug 8451 – cv2pdb does not work properly with 2.060-produced binaries
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2012-07-27T07:03:00Z
Last change time
2013-09-17T14:51:51Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2012-07-27T07:03:57Z
module test;
import std.exception;
void main() { enforce(0); }
2.059:
$ dmd -g test.d
$ cv2pdb test.exe test.exe
$ test.exe
[email protected](7): Enforcement failed
----------------
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\exception.d(3
2.060:
$ dmd -g test.d
$ cv2pdb test.exe test.exe
$ test.exe
[email protected](3): Enforcement failed
----------------
0x0040BEE8 in std
0x0040BD73 in std
0x004027FE in std
0x00402031 in D main at D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\exception.d(356)
0x0040256C in std
0x004025A6 in std
0x004021C8 in std
0x004135A1 in std
0x7C817067
Without cv2pdb I cannot see stacktraces regardless of which dbghelp.dll is installed.
Comment #1 by andrej.mitrovich — 2012-07-27T07:05:18Z
(In reply to comment #0)
> module test;
> import std.exception;
> void main() { enforce(0); }
>
> 2.059:
>
> $ dmd -g test.d
> $ cv2pdb test.exe test.exe
> $ test.exe
>
> [email protected](7): Enforcement failed
Sorry that was really (3), not (7) when I shortened the sample. The issue is the printout of "0x0040BEE8 in std" lines which weren't there before.
Comment #2 by r.sagitario — 2012-07-27T08:19:19Z
The problem is that cv2pdb already demangles the symbols and converts '.' to '@' in the demangled name (otherwise the VS debugger is confuced). The stack tracing seems to remove or cutoff any '@'.
Try "cv2pdb -s. test.exe" to use not replace '@' or "cv2pdb -n test.exe" to not demangle symbols.
Comment #3 by andrej.mitrovich — 2012-07-27T09:01:10Z
(In reply to comment #2)
> The problem is that cv2pdb already demangles the symbols and converts '.' to
> '@' in the demangled name (otherwise the VS debugger is confuced). The stack
> tracing seems to remove or cutoff any '@'.
>
> Try "cv2pdb -s. test.exe" to use not replace '@' or "cv2pdb -n test.exe" to
> not demangle symbols.
I get "unknwon option: -s." and "unknwon option: -n". I don't use VisualD.
Comment #4 by r.sagitario — 2012-07-28T00:32:07Z
I guess you should update to a newer version. It seems you are before 0.21, the current version is 0.25.
Comment #5 by andrej.mitrovich — 2012-07-28T07:25:38Z
(In reply to comment #4)
> I guess you should update to a newer version. It seems you are before 0.21, the
> current version is 0.25.
Thanks, but I still get different stack traces than before. With -n it's the same, with -s.:
[email protected](3): Enforcement failed
----------------
0x0040BEE8 in std.exception.enforce!(int).enforce
0x0040BD73 in std.exception.enforce!(int).enforce
0x004027FE in std.exception.enforce!(int).enforce
0x00402031 in D main at D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\exception.d(356)
0x0040256C in std.exception.enforce!(int).enforce
0x004025A6 in std.exception.enforce!(int).enforce
0x004021C8 in std.exception.enforce!(int).enforce
0x004135A1 in std.exception.enforce!(int).enforce
Comment #6 by andrej.mitrovich — 2013-09-17T14:51:51Z
Since I'm on Win7 now and exceptions work by default (without the need for cv2pdb), I'm marking this as WORKSFORME. If anyone else runs into this issue they can reopen or file a new bug.