gcc - gdb compatibility issue
Paul Pluzhnikov
ppluzhnikov@google.com
Mon Apr 27 06:30:00 GMT 2009
On Sun, Apr 26, 2009 at 10:17 PM, sumanth
<sumanth.gundapneni@redpinesignals.com> wrote:
> I am using gcc-4.3.3 and gdb 5.3 version.
That's a rather new GCC and rather old GDB.
> I have problems in debugging my binaries (a.out) concerned to local
> variable's address location.
What kind of problems?
Did you compile with -O, -O2, or -O3?
Debugging optimized code is always problematic: the compiler may not
have assigned address for a local variable at all.
> Is there any gcc-gdb compatibility issue here. If so how can I generate the
> correct debugging information and use it.
Start by compiling with '-g -O0'.
If that doesn't work, try current GDB built from CVS Head.
If that still doesn't work, show us your compile line, and output from
'gcc --version'.
Cheers,
--
Paul Pluzhnikov
More information about the Gdb
mailing list