This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gcc - gdb compatibility issue
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: sumanth <sumanth dot gundapneni at redpinesignals dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 26 Apr 2009 23:03:29 -0700
- Subject: Re: gcc - gdb compatibility issue
- References: <49F53FD6.5040209@redpinesignals.com>
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