public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/31922] New: [15 Regression] gdb.lookup_type() dosn't work for function-local types
@ 2024-06-23 19:54 ssbssa at sourceware dot org
  2024-06-23 20:00 ` [Bug python/31922] " ssbssa at sourceware dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ssbssa at sourceware dot org @ 2024-06-23 19:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31922

            Bug ID: 31922
           Summary: [15 Regression] gdb.lookup_type() dosn't work for
                    function-local types
           Product: gdb
           Version: 15.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: ssbssa at sourceware dot org
  Target Milestone: ---

Given this example:
```
int main()
{
  struct A { int num; } a;
  a.num = 3;
  return a.num;
}
```

Trying to get the 'A' type with python in gdb-15:
```
$ g++ -g -o local-type local-type.cpp
$ gdb -q local-type
Reading symbols from local-type...
(gdb) py print(gdb.lookup_type("main()::A"))
Python Exception <class 'gdb.error'>: No type named main()::A.
Error occurred in Python: No type named main()::A.
```

The same works in gdb-14:
```
(gdb) py print(gdb.lookup_type("main()::A"))
A
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-24 17:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-23 19:54 [Bug python/31922] New: [15 Regression] gdb.lookup_type() dosn't work for function-local types ssbssa at sourceware dot org
2024-06-23 20:00 ` [Bug python/31922] " ssbssa at sourceware dot org
2024-06-24 16:46 ` cvs-commit at gcc dot gnu.org
2024-06-24 16:48 ` ssbssa at sourceware dot org
2024-06-24 17:41 ` cvs-commit at gcc dot gnu.org
2024-06-24 17:43 ` ssbssa at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).