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: Re: RedBoot+GDB+application combo question


On Sun, 2004-02-22 at 20:16, Jonathan Larmour wrote:
> Savin Zlobec wrote:
> > [v850[e] breakpoints]
> > I'am aware of 16/32 bit gdb breakpoint instruction thing - it is just that
> > I somehow remember the 'dbtrap' as a 16 bit instruction (have to check that
> > in the docs).
> 
> It's possible eCos could be changed to use it for the v850e only. But not 
> only eCos: GDB has knowledge about breakpoint instructions too.

I actually considered these options when I did the original V850 HAL.  
The biggest problem I ran into was that GDB simply wasn't prepared (at 
that time) to handle such breakpoints.  Here's why: when GDB wants to
insert a breakpoint at runtime, it temporarily replaces the instruction
at the breakpoint location with the breakpoint code.  The V850 can use
either 16 or 32 bit instructions, and if the breakpoint instruction is
32 bits long, it can't be stuffed where a 16 bit instruction lives.  GDB
is [or was, things might have changed] very anal about this in that 
breakpoints have to be exactly where you say or else it gets confused.
I worked with the GDB folks, trying to come up with a way where the
breakpoint instruction could end up "close" to the desired location,
but that created many more problems.  In the end, we [all] decided that
for this hardware the only sane solution was the hard branch with
watchdog timeout.  It's ugly, but it does work.
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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