This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc - gdb compatibility issue


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]