bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MACROS in gdb ???


From: Daniel Berlin
Subject: Re: MACROS in gdb ???
Date: 19 Mar 2001 23:07:47 -0500
User-agent: Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.2 (Thelxepeia (GTK Inside))

Aditya Chugh <address@hidden> writes:

> Hello Jtc,
> Many thanks for your help.
> The target I'm using is a Linux machine
> running kernel version 2.2.16-22(Red Hat Linux release 7.0)
> and the version of gdb is 5.0.
> 
> Also the gdb output looked like this....?
> (gdb) p u2IncarnId
> $2 = 0
> (gdb) n
> (gdb) p u2IncarnId
> $3 = 1
> (gdb) p &u2IncarnId
> Address requested for identifier "u2IncarnId" which is in a register.
> (gdb)
> 
> I found that one of the Makefiles I was using has
> CCFLAGS  = -O2 -Wall.After removing the -O2 the problem seems to have been
> resolved.
> 
> But does this mean that if we complile using GNU CC with both `-g'  and `-O'
> options
> GDB will give us wrong results ?? Moreover the same code when run in Visual
> Studio 6.0
> prints correct values for u2IncarnId.Does this mean that the debugger in
> Visual Studio 6.0
> is better than GDB for optimized code ? 
Right now?
Quite possibly.


Optimized debugging support in GDB is only really possible through
fully supporting things we don't fully support yet.
--Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]