This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: GDB watching and printing variables content problem
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Teresa Fazio <fazio at planetek dot it>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 24 Jul 2003 16:58:39 +0200
- Subject: Re: [ECOS] GDB watching and printing variables content problem
- References: <3F200644.32339.6D9E61F8@localhost>
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