This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Erratic insight/gdb behavior
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Rycerz Roman-G11565 <roman dot rycerz at motorola dot com>
- Cc: eCos Discussion Group <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 17 Mar 2003 18:30:05 +0100
- Subject: Re: [ECOS] Erratic insight/gdb behavior
- References: <1918EAFA710FD611B80800D0B781E3AB05BCB741@il06exm06.corp.mot.com>
On Mon, Mar 17, 2003 at 11:23:30AM -0600, Rycerz Roman-G11565 wrote:
> Hi
>
> I have been trying to debug support for a new flash. insight/gdb works
> fine up till I start executing "_flash_query".
> In this routine gdb no longer executes linearly, but jumps from line to
> line , forward and back..... I see the same results in straigt gdb.
>
> I am using insight 5.1 and gcc 2.95.2
>
> Anyone one know why this is happening ?????
Two things.
1) Gcc has optimized the code, so that things happen in a different
order which is more optimal.
2) Your gdb stub may be in flash. Normally when doing things with
flash devices, they go into a programming mode where you cannot
read the contents out. This means you cannot be executing code in
the flash, ie the gdb stubs used for single stepping.
At the moment 1) is probably your problem. Take out the -O option to
gcc from the build so that it does not optimize.
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