Launchpad has imported 1 comments from the remote bug at https://sourceware.org/bugzilla/show_bug.cgi?id=32398.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2024-11-28T00:12:07+00:00 Zixing Liu wrote: Created attachment 15807 Suggested patch for this issue This seems to be a regression: GDB 9+ can't examine exported D symbols from another D module when the imported symbol is imported inside a function (subprogram). For example, in file a.d, we have: __gshared float b_Glob = 55.22; In file b.d, we have: void main() { import a; b_Glob = 99.88; // GDB: p b_Glob return; //#break } When you build the program using: gdc -ggdb3 -O0 a.d b.d -o a And then run `gdb ./a` with the following command inputs, and you will see: (gdb) b b.d:5 Breakpoint 1 at 0x252da: file /tmp/b.d, line 5. (gdb) r Starting program: /tmp/a [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Breakpoint 1, D main () at /tmp/b.d:5 5 return; //#break (gdb) p b_Glob No symbol "b_Glob" in current context. (gdb) With GDB 9, you will see the expected print-out (on amd64) of: $1 = 99.8799973 ----------------- I suspect this is an issue with how GDB reads imported modules and investigated this to be an accidental regression caused by a refactor to dwarf2/read.c. Please see my suggested patch attached. Reply at: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2089805/comments/0 ** Changed in: gdb Status: Unknown => New ** Changed in: gdb Importance: Unknown => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2089805 Title: GDB 9+ can't examine any exported D symbols from another module To manage notifications about this bug go to: https://bugs.launchpad.net/gdb/+bug/2089805/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
