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


On Thu, Jul 24, 2003 at 04:16:04PM +0200, Teresa Fazio wrote:

> 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?

Thats normal. Gcc has put variables into registers and gdb does not
know this. Hence it prints the wrong values. Take out -O altogether
and it will be better.

    Andrew

-- 
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]