D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14313 - [ld.gold] gdb: wrong value of shared variables
Summary: [ld.gold] gdb: wrong value of shared variables
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: DebugInfo, pull
Depends on:
Blocks:
 
Reported: 2015-03-21 02:32 UTC by Martin Krejcirik
Modified: 2015-06-17 21:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Krejcirik 2015-03-21 02:32:35 UTC
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.
Comment 1 Martin Krejcirik 2015-03-21 03:34:07 UTC
https://github.com/D-Programming-Language/dmd/pull/4507
Comment 2 github-bugzilla 2015-03-23 17:03:10 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9bd7c7c24c5d30db21520d5edf8bf4433164a8e8
Fix Issue 14313 - [ld.gold] gdb: wrong value of shared variables

https://github.com/D-Programming-Language/dmd/commit/13af2803c8a0463cae1ab611cda539d035e4b59f
Merge pull request #4507 from tramker/bug14313

Fix Issue 14313 - [ld.gold] gdb: wrong value of shared variables
Comment 3 github-bugzilla 2015-06-17 21:02:39 UTC
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9bd7c7c24c5d30db21520d5edf8bf4433164a8e8
Fix Issue 14313 - [ld.gold] gdb: wrong value of shared variables

https://github.com/D-Programming-Language/dmd/commit/13af2803c8a0463cae1ab611cda539d035e4b59f
Merge pull request #4507 from tramker/bug14313