[ECOS] Erratic insight/gdb behavior

Andrew Lunn andrew.lunn@ascom.ch
Mon Mar 17 17:31:00 GMT 2003


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



More information about the Ecos-discuss mailing list