This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: GDB watching and printing variables content problem


"Teresa Fazio" <fazio@planetek.it> writes:

> Hi,
> did you never have problem watching and printing variables content (wrong values) 
> while debugging in GDB?
> 
> I found info regarding problem using compilation option "-O" and "-g" together.
> What do you think about?
> 
> Target V850-elf
> Ecos version 0.98
> GNU gdb 5.2
> 

This is a know problem. If gcc optimizes the code then it may decide
to eliminate some variables altogether. Other variables may only be
live during a small section of a function, not necessarily across
their entire scope. If you want variables to behave themselves during
debugging, do not optimize.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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