How to find type when same type name is used more than once?
Johan Erlandsson <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CALiXj0Bk9FJVgAH6oCVzD-OTHuuM3TitGuFqu-Z8wDAR03dQhg@mail.gmail.com> |
Hi I have problem to deterministic find correct type in GDB, since the same name 'some_type' is used for two different types. The type I am looking for is only used as parameter and local variable. I have observed different behavior depending on core file and build. So when changing (core,build) I can get different result when running: (gdb) ptype some_type I can get either of the two types. From 'info types' I always see both. (gdb) info types some_type File a.h: some_type; File b.cpp: some_type; I am aware of this syntax for variables: (gdb) p 'includefile'::some_global Now I am looking for something similar but for types. From python I tried this function, gdb.lookup_type (name [, block]) For block I used one of the functions that takes the wanted 'some_type' as a parameter. But this didn't help. Any ideas how I can find the type that belong to a specific file? Regards Johan