Jump to page: 1 2
Thread overview
[Issue 14225] [REG2.067a] GDB: error reading variable (string + dup)
Feb 26, 2015
Martin Krejcirik
Feb 27, 2015
Martin Krejcirik
Mar 04, 2015
Vladimir Panteleev
Mar 04, 2015
Martin Nowak
Mar 04, 2015
Martin Nowak
Mar 09, 2015
Walter Bright
Mar 09, 2015
Martin Nowak
Mar 09, 2015
Martin Nowak
Mar 11, 2015
Walter Bright
Mar 13, 2015
Martin Nowak
Mar 13, 2015
Martin Nowak
Mar 13, 2015
Martin Nowak
Mar 14, 2015
Martin Krejcirik
February 26, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

Martin Krejcirik <mk@krej.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|DMD                         |druntime
            Summary|[REG2.067a] GDB: error      |[REG2.067a] GDB: error
                   |reading variable (string +  |reading variable (string +
                   |char[])                     |dup)

--- Comment #1 from Martin Krejcirik <mk@krej.cz> ---
Introduced by https://github.com/D-Programming-Language/druntime/commit/5a5d1c5c4d9f27785422191178fc4e2876a0a097

--
February 27, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #2 from Martin Krejcirik <mk@krej.cz> ---
Small correction: -gc doesn't make it work.
Also the problem is not limited to recent gdb version, 7.4.1-debian is affected
too for example.

--
March 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com

--- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Pull request in question: https://github.com/D-Programming-Language/druntime/pull/1031

--
March 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #4 from Martin Nowak <code@dawg.eu> ---
Confirmed, doesn't depend on ld.bfd vs. ld.gold.
Neither dwarfdump nor readelf --debug-dump report any error.

--
March 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
.debug_frame and .debug_ranges changed and look indeed weird. There is an overlapping PC range.

000000c0 0000000000000024 00000000 FDE cie=00000000
pc=0000000000000000..0000000000000084
  DW_CFA_advance_loc: 1 to 0000000000000001
  DW_CFA_def_cfa_offset: 16
  DW_CFA_offset: r6 (rbp) at cfa-16
  DW_CFA_advance_loc: 2 to 0000000000000003
  DW_CFA_def_cfa_register: r6 (rbp)
  DW_CFA_advance_loc: 6 to 0000000000000009
  DW_CFA_offset: r1 (rdx) at cfa-80
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

000000e8 0000000000000024 00000000 FDE cie=00000000
pc=0000000000000000..0000000000000053
  DW_CFA_advance_loc: 1 to 0000000000000001
  DW_CFA_def_cfa_offset: 16
  DW_CFA_offset: r6 (rbp) at cfa-16
  DW_CFA_advance_loc: 2 to 0000000000000003
  DW_CFA_def_cfa_register: r6 (rbp)
  DW_CFA_advance_loc: 6 to 0000000000000009
  DW_CFA_offset: r1 (rdx) at cfa-24
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop


    00000000 0000000000000000 0000000000000084
    00000000 0000000000000000 0000000000000053

Further investigation tomorrow ;).

--
March 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---
Any news?

--
March 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #7 from Martin Nowak <code@dawg.eu> ---
For yet unknown reason gdb reads an incorrect sizeof for the .length variable
of the string. This only applies to the arrays in main not the ones passed to
the dup functions.
It also works in lldb.

It would be more optimal if dmd cached and emitted only a single instance per array type. Will try to implement that and see if it helps before spending more hours debugging gdb.

--
March 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #8 from Martin Nowak <code@dawg.eu> ---
(In reply to Martin Nowak from comment #7)
> It would be more optimal if dmd cached and emitted only a single instance per array type. Will try to implement that and see if it helps before spending more hours debugging gdb.

Indeed, fixing the type repetition of debug infos for arrays fixes the issue. The code is pretty ugly and needs some refactoring before fixing the incorrect hashing, but that'd be my preferred fix as it get's rid of a lot of unnecessary debug info.

--
March 11, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #9 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to Martin Nowak from comment #8)
> Indeed, fixing the type repetition of debug infos for arrays fixes the issue. The code is pretty ugly and needs some refactoring before fixing the incorrect hashing, but that'd be my preferred fix as it get's rid of a lot of unnecessary debug info.

What is the prospect of this being done in time for 2.067?

--
March 13, 2015
https://issues.dlang.org/show_bug.cgi?id=14225

--- Comment #10 from Martin Nowak <code@dawg.eu> ---
(In reply to Walter Bright from comment #9)
> What is the prospect of this being done in time for 2.067?

I'm working on that, but dwarf.c is a mess. So far everything I tried had to
touch too much code, likely resulting in a regression.
I think the simplest solution is to throw out DW_AT_siblings, it's not that
useful anyhow.

--
« First   ‹ Prev
1 2