[ECOS] RE: Thread-aware debugging w/ Redboot on ARM?

Paul D. DeRocco pderocco@ix.netcom.com
Tue Dec 7 23:16:00 GMT 2004

> From: grante@visi.com [mailto:grante@visi.com]
> > I'm not sure what you mean by "running target". When I halt an
> > eCos system with Ctrl+C in GDB, in what sense is the target
> > still "running"?
> The CPU is executing instructions.

Okay, if by "target" you mean the board, then of course the CPU is still
running, because Redboot is running. If by "target" you mean the eCos system
plus application that you're debugging, the CPU isn't executing instructions
from it, is it? I guess what I'm trying to verify is that Redboot works by
seizing control of the CPU and not allowing anything outside of itself to
execute, rather than, say, by putting all the threads into the suspended
state. To GDB/Redboot, the entire eCos system, including its scheduler,
looks like a single program, so when you're single-stepping, you can
single-step right through the scheduler, and watch a thread switch happen,
if you want. Am I mistaken about that?

> > Obviously, there's some Redboot code that waits at the serial
> > or Ethernet port for commands, but isn't the eCos kernel
> > frozen out at that point, so that no instructions are being
> > executed outside of Redboot?
> No.  Redboot has the ability via the Virtual Vector table to
> make calls into the eCos kernel to retrieve thread info and (I
> think) do things like lock/unlock the scheduler.

But those are just subroutine calls to eCos utility functions, taking place
within the Redboot stack, aren't they?

One final question: when you halt a program via remote debugging, are
interrupts masked in the CPU, or do interrupts continue to be serviced even
while Redboot is sitting there waiting for a single-step or continue


Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com

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

More information about the Ecos-discuss mailing list