Public bug reported:

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."

** Affects: gdb
     Importance: Medium
         Status: Confirmed

** Affects: gdb (Ubuntu)
     Importance: Undecided
         Status: New

** Bug watch added: Sourceware.org Bugzilla #31580
   https://sourceware.org/bugzilla/show_bug.cgi?id=31580

** Also affects: gdb via
   https://sourceware.org/bugzilla/show_bug.cgi?id=31580
   Importance: Unknown
       Status: Unknown

** Changed in: gdb (Ubuntu)
    Milestone: None => jammy-updates

** Summary changed:

- gdb 12.1 fails to examine any global variables in D programs
+ gdb 10.0 fails to examine any global variables in D programs

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/2059856

Title:
  gdb 10.0 fails to examine any global variables in D programs

Status in gdb:
  Confirmed
Status in gdb package in Ubuntu:
  New

Bug description:
  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."

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/2059856/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to