Comment 0 for bug 2059856

Revision history for this message
Zixing Liu (liushuyu-011) wrote : gdb 12.1 fails to examine any global variables in D programs

Summary:

 * GDB 10.0 introduced a regression where it cannot inspect any global variables in any D programs compiled by any D compiler.
 * LDC2 and GDC upstream stated Focal does not have such a problem and stuck to this release for their test images.

Reproduce steps:

Considering the following D program:

```
module t;

class uv {
    int i;
}

__gshared uv i;
int main() {
    i = new uv();
    return 0; // #break
}
```

If you build it using `gdc -g -O0 t.d -o t` or `ldc2 -o t.o t.d -g`, run the GDB using the following commands ...

```
b t.d:10
p t.i
```

... you will notice GDB will complain that "'t.i' has unknown type; cast it to its declared type."