This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Error referencing symbols in gdb when compiled with gcc 3.4.6
- From: Michael Eager <eager at eagercon dot com>
- To: Kalpana Ramamurthy <kal_pana at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org, gcc at gnu dot org
- Date: Wed, 18 Jul 2007 10:16:05 -0700
- Subject: Re: Error referencing symbols in gdb when compiled with gcc 3.4.6
- References: <BAY144-F39E66CC5296F1114A07684E8FA0@phx.gbl>
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 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077