Error referencing symbols in gdb when compiled with gcc 3.4.6

Michael Eager
Wed Jul 18 17:16:00 GMT 2007

Kalpana Ramamurthy wrote:
> Hello,
> I am having a problem when using gcc 3.4.6. My code was compiled earlier 
> using gcc 3.2.2 with the -g option.
> I was able to print the addess of any symbol or do a "ptype" on any 
> symbol using gdb 6.4 with the generated
> binary.
> Now I compile the very same code using gcc 3.4.6 using the -g option 
> again. Here, I get an error saying
> "There is no field/member named <symbol name>".
> This very symbol was found when the code was compiled using gcc 3.2.2.

First, please don't cross-post to both gcc and gcc-help mailing lists.
This belongs on gcc-help; future replies should only go to gcc-help.

You can see if there is debugging information in the object file
file by running "readelf -aw" and searching for the name.  You may
want to check both the object file and the executable.  If the symbol
appears to be defined correctly, then the problem may be in gdb.

Michael Eager
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

More information about the Gcc mailing list