[Issue 4181] GDB prints wrong value of TLS variables

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|D1  D2 |D2

--


[Issue 4181] GDB prints wrong value of TLS variables

2015-02-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #26 from github-bugzi...@puremagic.com ---
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/aa9812bef7e8aadb1495c474f7587f8481077ab8
Fix Issue 4181 - GDB prints wrong value of TLS variables

https://github.com/D-Programming-Language/dmd/commit/11842652cdc58f479590af618c79335ba44af03f
Merge pull request #4053 from tramker/bug4181

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #24 from Martin Krejcirik m...@krej.cz ---
Can you elaborate ? I've tried gdb 7.8.50.20141011-cvs on Debian x86_64 and it
doesn't seem broken.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #25 from Iain Buclaw ibuc...@gdcproject.org ---
 Can you elaborate ? I've tried gdb 7.8.50.20141011-cvs on Debian x86_64 and 
 it doesn't seem broken.

In response to my own Comment 10.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #20 from Martin Krejcirik m...@krej.cz ---
Yes, I can confirm it works on Fedora 20 x86_64 with ld.gold from git (GNU
Binutils 2.24.51.20141010). Debian wheezy seems not affected.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #21 from Martin Nowak c...@dawg.eu ---
I didn't had any problems with this patch and my default ld.gold (2.23.2)
version.
Also the linked binutils issue seems unrelated.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #22 from Martin Krejcirik m...@krej.cz ---
I did find out. My original patch din't work with the stock (2.23.2) ld.gold.
Merged version is not affected. So all is well.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #23 from Iain Buclaw ibuc...@gdcproject.org ---
Just a note from my side (as I've been silent on this).

Further changes in GDB instead re-exposed this bug.  I had looked at the area
PR fixed, and while I could see in the codegen what the dmd backend was doing
wrong, I do not have the time to figure out how to make dmd more conformant.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #16 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/aa9812bef7e8aadb1495c474f7587f8481077ab8
Fix Issue 4181 - GDB prints wrong value of TLS variables

- add DWARF_VERSION to dwarf.h
- emit DW_OP_GNU_push_tls_address or DW_OP_form_tls_address based on
DWARF_VERSION

https://github.com/D-Programming-Language/dmd/commit/11842652cdc58f479590af618c79335ba44af03f
Merge pull request #4053 from tramker/bug4181

Fix Issue 4181 - GDB prints wrong value of TLS variables

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #17 from Brad Roberts bra...@puremagic.com ---
I believe we'd gotten the dmd codegen and debug gen to the point that ld.gold
was happy.  This fix is incomplete as long as ld.gold isn't happy.  It should
either be re-opened or a followup ld.gold specific bug filed.  imho.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #18 from Martin Krejcirik m...@krej.cz ---
I think it's a bug in ld.gold which has been fixed recently:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5efeedf61e4fe720fd3e9a08e6c91c10abb66d42

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #19 from Brad Roberts bra...@puremagic.com ---
Can you confirm?  Either way, thanks for the research.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

--- Comment #15 from Martin Krejcirik m...@krej.cz ---
Note: if, with the above pull, you experience high tls offset like this:

(gdb) p _D4test1xi
Cannot access memory at address 0x78434e50
(gdb) info address _D4test1xi
Symbol test.x() is a thread-local variable at offset 0x45e6f0 in the
thread-local storage for `/home/dawg/Code/D/test'.

It may be caused by ld.gold linker during program build time. Use ld.bfd.

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-10-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4181

Martin Krejcirik m...@krej.cz changed:

   What|Removed |Added

   Keywords||pull

--- Comment #14 from Martin Krejcirik m...@krej.cz ---
https://github.com/D-Programming-Language/dmd/pull/4053

--


[Issue 4181] GDB prints wrong value of TLS variables

2014-03-13 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 CC||c...@dawg.eu


--- Comment #13 from Martin Nowak c...@dawg.eu 2014-03-13 07:57:45 PDT ---
(In reply to comment #7)
 There was a time where DMD would emit a delegate as a ulong in debug code, and
 have it's own custom DWARF tags for D arrays, etc.  This is no longer the 
 case.

Yeah, I removed most of these differences and replaced them with structs. Some
of them are recognized by the rotten D support in gdb.
But it would be much nicer to use DWARF-4 for array types.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-23 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #12 from Iain Buclaw ibuc...@ubuntu.com 2014-01-23 00:11:33 PST 
---
Will do.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #11 from Andrei Alexandrescu and...@erdani.com 2014-01-22 
13:48:07 PST ---
Awesome, keep us posted.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-20 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #9 from Iain Buclaw ibuc...@ubuntu.com 2014-01-20 10:04:04 PST ---
I believe this should be now fixed in my local copy of gdb.  I've got a few
more things to do including:

- Get line completion working without 'quotes'
- Implement .sizeof property keeping sizeof(T) for gdb compatibility.
- Recognise 'cast(T)' whilst keeping C-style casts for gdb compatibility.

Oh Ho!

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-20 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #10 from Iain Buclaw ibuc...@ubuntu.com 2014-01-20 22:53:11 PST 
---
Yep, this is now working for DMD in my local copy of gdb. :)

Will probably take me about a week to finalise some patches to send off (anyone
wanting to help test is more than welcome).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181


Iain Buclaw ibuc...@ubuntu.com changed:

   What|Removed |Added

 CC||ibuc...@ubuntu.com


--- Comment #3 from Iain Buclaw ibuc...@ubuntu.com 2014-01-12 02:36:32 PST ---
(In reply to comment #2)
 placed $50 bounty

Something is completely fudged with -g in DMD.

Just doing a cursory check on 2.064:

(gdb) p 'test.STest.y'
Cannot access memory at address 0x736574050065b510
(gdb) p 'test.x'
Cannot access memory at address 0x34445f040065b510


Cannot reproduce with -gc, and of course, GDC is just fine.

Personally I would like to see -gc deprecated and all features of -gc moved
over to -g, excluding the setting of DW_LANG_C89.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181


Benjamin Thaut c...@benjamin-thaut.de changed:

   What|Removed |Added

 CC||c...@benjamin-thaut.de


--- Comment #4 from Benjamin Thaut c...@benjamin-thaut.de 2014-01-12 03:13:51 
PST ---
(In reply to comment #3)
 (In reply to comment #2)
  placed $50 bounty
 
 Something is completely fudged with -g in DMD.
 

I also noticed that debugging seemed to work better with dmd 2.063.2 (but on
Windows)

 
 Personally I would like to see -gc deprecated and all features of -gc moved
 over to -g, excluding the setting of DW_LANG_C89.

Please no. Under windows -g works fine and I really don't want the debug
information to look like C code. If this is done please make it unix only.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #5 from Iain Buclaw ibuc...@ubuntu.com 2014-01-12 03:26:48 PST ---
(In reply to comment #4)
 
 Please no. Under windows -g works fine and I really don't want the debug
 information to look like C code. If this is done please make it unix only.

I'd hate to be the barer of bad news, but -g and -gc have been nearly identical
for quite a few years now.  Here's the current score.

1) The difference between -g and -gc on Windows is dchars are represented as
ulong (determined by a quick grep of 'symdebug' over the glue code.  Windows
debug format is either CV4 or CV8.

2) The difference between -g and -gc on Linux is DW_LANG_D vs DW_LANG_C89
(determined by diff'ing a objdump -g of two compiled objects).

So whatever misconception you have of -gc, it is wrong and this attitude should
be dropped.


I can't imagine things breaking on Windows deprecating -gc and removing (1) so
that dchar is *always* represented as dchar.

As for (2) something is sorely broken on Linux if DW_LANG_D is specified vs
DW_LANG_C89.  This may not be a problem for GDC perhaps because it emits
DW_OP_GNU_tls_address against the TLS symbols.  But it's still no excuse for
GDB to break debugging when this is missing.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #6 from Benjamin Thaut c...@benjamin-thaut.de 2014-01-12 03:56:32 
PST ---
 
 So whatever misconception you have of -gc, it is wrong and this attitude 
 should
 be dropped.


If its really that similar I'm fine with dropping it. I just wanted to point
out the windows side of things, as those are often forgotten in den D-Community
in general.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #7 from Iain Buclaw ibuc...@ubuntu.com 2014-01-12 04:54:06 PST ---
(In reply to comment #5)

 If its really that similar I'm fine with dropping it. I just wanted to point
 out the windows side of things, as those are often forgotten in den 
 D-Community
 in general.

Anyway, I'm not promoting 'pretend we're C' behaviour.  I'm in favour of
killing 'pretend we're C' behaviour.

There was a time where DMD would emit a delegate as a ulong in debug code, and
have it's own custom DWARF tags for D arrays, etc.  This is no longer the case.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #8 from Iain Buclaw ibuc...@ubuntu.com 2014-01-12 06:25:52 PST ---
(In reply to comment #5)
 
 As for (2) something is sorely broken on Linux if DW_LANG_D is specified vs
 DW_LANG_C89.  This may not be a problem for GDC perhaps because it emits
 DW_OP_GNU_tls_address against the TLS symbols.  But it's still no excuse for
 GDB to break debugging when this is missing.

Problem seems to be in GDB itself, and not DMD.  This is something that I'll
check is fixed once I finish up writing the D expression parser.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-10 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #2 from Andrei Alexandrescu and...@erdani.com 2014-01-10 17:45:09 
PST ---
placed $50 bounty

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---