www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14225] New: [REG2.067a] GDB: error reading variable (string +


          Issue ID: 14225
           Summary: [REG2.067a] GDB: error reading variable (string +
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: mk krej.cz

char[] chars;

void main()
        string lok = "Something";
        chars = "Anything".dup;

compiled dmd -g

mk bid:~/work/pokus/debug$ gdb ./locals
GNU gdb (GDB)
(gdb) b 6
Breakpoint 1 at 0x8064e88: file locals.d, line 6.
(gdb) r
Starting program: /home/mk/work/pokus/debug/locals

Breakpoint 1, D main () at locals.d:6
6               chars = "Anything".dup;
(gdb) info locals
lok = <error reading variable>

This is with Ian's patched gdb on linux x86

dmd 2.066 works and 2.067a -gc works too.
Debug info (2.066 vs 2.067a) looks the same.

I haven't tested patched gdb + x86_64

I suspect this may be a gdb problem or something botched up on my side, but I
don't have time for more testing now.

Feb 25 2015