D-Programming-Language/dmd — pull request #3681 by ibuclaw (2014-06-19 22:01:16+00:00)
Title: DWARF: Emit address of __gshared variable correctly on I64

Picked up when testing gdb development with D patches.

When writing out ``DW_AT_location`` of a 64bit ``DW_OP_addr``, DMD only pads out the value to 32bits.

eg: ``<8a> DW_AT_location : 5 byte block: 3 0 0 0 0 (DW_OP_addr: 0)``

This could cause a debugger to read the variable data incorrectly, so best writing out the location with the correct length. ``<8a> DW_AT_location : 9 byte block: 3 0 0 0 0 0 0 0 0 (DW_OP_addr: 0)``