[Issue 15432] Win64: bad code offset in debug line number info

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 3 10:31:50 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=15432

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |symdeb
                 CC|                            |dlang-bugzilla at thecybershad
                   |                            |ow.net

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
I reproduced this with 2.074.1.

Detailed steps to reproduce (without assuming prior knowledge):

1. You need:
  - dumpbin.exe (Visual Studio or Windows SDK)
  - dumplines.exe (build from source from https://github.com/rainers/cv2pdb,
install Visual D from https://github.com/dlang/visuald/releases, or download
stand-alone binary I compiled from
https://dump.thecybershadow.net/3d28f947dd7aeeb30325935bc2463d5d/dumplines.exe)

2. Save code to test.d
3. Run: dmd -g -m64 -c test.d 
4. Run: dumpbin.exe /DISASM test.obj > test.asm
5. Run: dumplines.exe test.obj > test-lines.txt
6. In test-lines.txt, note the offsets (Off 0x### numbers) for the _Dmain
function (should be the first in the file)
7. In test.asm, note the offsets (first column of hex numbers) for the
instructions for the _Dmain function (should be the first in the file)

If there are any offsets in test-lines.txt's _Dmain which do not appear in
test.asm's _Dmain, then it is an instance of this bug.

A self-contained example would be nice. Would it be possible to reproduce this
issue e.g. by throwing an exception and looking at the stack trace for an
address not mapped to a line number OSLT?

--


More information about the Digitalmars-d-bugs mailing list