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
* [Bug python/31922] [15 Regression] gdb.lookup_type() dosn't work for function-local types
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 ` ssbssa at sourceware dot org
2024-06-24 16:46 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ssbssa at sourceware dot org @ 2024-06-23 20:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31922
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/31922] [15 Regression] gdb.lookup_type() dosn't work for function-local types
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-24 16:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31922
--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hannes Domani <ssbssa@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ae5974d60378fa3faecff64725e00c8695bcc7d
commit 5ae5974d60378fa3faecff64725e00c8695bcc7d
Author: Hannes Domani <ssbssa@yahoo.de>
Date: Mon Jun 24 18:45:37 2024 +0200
Fix gdb.lookup_type for function-local types
Looking for a type defined locally in a function doesn't work
any more since the introduction of TYPE_DOMAIN:
```
(gdb) python print (gdb.lookup_type ('main()::Local'))
Python Exception <class 'gdb.error'>: No type named main()::Local.
Error occurred in Python: No type named main()::Local.
```
cp_search_static_and_baseclasses was simply missing a check for
SEARCH_TYPE_DOMAIN, now it works again:
```
(gdb) python print (gdb.lookup_type ('main()::Local'))
Local
```
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31922
Approved-By: Tom Tromey <tom@tromey.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/31922] [15 Regression] gdb.lookup_type() dosn't work for function-local types
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
4 siblings, 0 replies; 6+ messages in thread
From: ssbssa at sourceware dot org @ 2024-06-24 16:48 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31922
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |16.1
--- Comment #2 from Hannes Domani <ssbssa at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/31922] [15 Regression] gdb.lookup_type() dosn't work for function-local types
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
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-24 17:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31922
--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The gdb-15-branch branch has been updated by Hannes Domani
<ssbssa@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=390359aea1d911f3ad4577c4257a219e1557b48f
commit 390359aea1d911f3ad4577c4257a219e1557b48f
Author: Hannes Domani <ssbssa@yahoo.de>
Date: Mon Jun 24 18:45:37 2024 +0200
Fix gdb.lookup_type for function-local types
Looking for a type defined locally in a function doesn't work
any more since the introduction of TYPE_DOMAIN:
```
(gdb) python print (gdb.lookup_type ('main()::Local'))
Python Exception <class 'gdb.error'>: No type named main()::Local.
Error occurred in Python: No type named main()::Local.
```
cp_search_static_and_baseclasses was simply missing a check for
SEARCH_TYPE_DOMAIN, now it works again:
```
(gdb) python print (gdb.lookup_type ('main()::Local'))
Local
```
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31922
Approved-By: Tom Tromey <tom@tromey.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/31922] [15 Regression] gdb.lookup_type() dosn't work for function-local types
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
` (3 preceding siblings ...)
2024-06-24 17:41 ` cvs-commit at gcc dot gnu.org
@ 2024-06-24 17:43 ` ssbssa at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: ssbssa at sourceware dot org @ 2024-06-24 17:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31922
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|16.1 |15.1
--
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).