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]

Re: eCos threads debugging using gdb with Jeeni


Mathieu Routhier wrote:
> 
> Maybe by modifying the gdb sources, I can add this support without
> recoding everything?  Maybe using a configure flag like --enable-ecos.
> 
> Because there is already a possibility to connect using RDI with Angel
> through Ethernet and that's what we use to talk to Jeeni.  I suppose
> this part of code just needs to know how and where eCos stores thread
> data...

It may seem yucky but since the only thing that knows that is eCos itself,
the way to do this is to store a structure in a fixed location that points
to a function. You would make the ICE store the old CPU state, and then set
the PC to *be* at to that function (and set the stack pointer, and put
arguments in registers), so that it can do whatever operations are
required, and then go to an exit point - which would also be put in this
structure so that the ICE can set a breakpoint at it. When that breakpoint
is hit, the ICE can notice this, extract the results from registers (or
from memory the registers point at) and restore the CPU state.

There's an example for a different ICE at
hal/v85x/v850/current/src/v850_ice.cxx.
 
> By using a serial connection, directly to the evalboard, I think gdb can
> access thread info.  Am I right?  The eCos FAQ says so but does not
> mention which connection is required.

Yes you can. You get thread info when debugging via serial or TCP. Just not
by ICE.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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