This is the mail archive of the
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.email@example.com>
On Sun, Apr 26, 2009 at 10:17 PM, sumanth
> 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