This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to search for a global type?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Gary Funck <gary at intrepid dot com>
- Cc: GDB List <gdb at sources dot redhat dot com>
- Date: Tue, 1 Jan 2008 22:17:50 -0500
- Subject: Re: how to search for a global type?
- References: <20071231042844.GA18814@intrepid.com>
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