Bug 14313 – [ld.gold] gdb: wrong value of shared variables
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-03-21T02:32:00Z
Last change time
2015-06-17T21:02:39Z
Keywords
pull, symdeb
Assigned to
nobody
Creator
mk
Comments
Comment #0 by mk — 2015-03-21T02:32:35Z
GDB prints wrong value of shared or __gshared variables on Linux x86_64 with ld.gold linker.
__gshared uint globvar1 = 4020000000;
__gshared ushort globvar2 = 65000;
void main()
{
globvar1++;
globvar2 += 5;
return;
}
(gdb) p goldbug.globvar1
$1 = 4020000001
(gdb) p goldbug.globvar2
$2 = 21761
Fix will follow shortly.