how to search for a global type?

Daniel Jacobowitz drow@false.org
Wed Jan 2 03:18:00 GMT 2008


On Sun, Dec 30, 2007 at 08:28:44PM -0800, Gary Funck wrote:
> static
> int
> lookup_type_by_name (const char *type_name)
> {
>   const struct symbol *sym;
>   const struct type *type;
>   int type_id;
>   sym = lookup_symbol_global (type_name, NULL, TYPES_DOMAIN, NULL);

Are types global, or do they usually end up in the file's static
block?  I'd guess the latter.  Check maint print symbols.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list