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: Erratic insight/gdb behavior


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


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