This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I'm having some issues with debugging an application compiled with g++ 4.1.2 The type names for structures appear in gdb as ".0", ".1", etc. Here is a simple testcase: foo.h ---------------------------------------------- typedef struct { int bar; char br; } foo_t; ---------------------------------------------- foo.c ---------------------------------------------- #include "foo.h" foo_t * global_foo_ptr; int main(void) { return 0; } ---------------------------------------------- Compiled with >g++4 -g -m32 foo.c -o test GDB trace: ---------------------------------------------- (gdb) whatis global_foo_ptr type = ._0 * (gdb) ptype foo_t No symbol "foo_t" in current context. ---------------------------------------------- >gdb --version GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh) >g++4 --version g++4 (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) A more recent version of gdb (7.1) gives the same results. A more recent version of gcc (4.5.1) gives the expected results. Any idea? Thanks for your help, -- Michel Metzger.
Attachment:
gdb_struct_name.tar.gz
Description: gdb_struct_name.tar.gz
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |