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: Thread debugging sans stubs


Grant Edwards wrote:
> 
> I've got a thread that stops running occasionally, and I'm
> trying to figure out why.  Since I'm using a JTAG interface, I
> don't have the thread support provided by GDB stubs.  I can
> print out the thread object, but don't know how to interpret
> it. Is there any documentation that explains how to figure out
> things like the thread's current IP,

Not really. But if saved_context == 0, this must be the current thread so
the registers are on the stack, i.e. up from stack_ptr. You'll have to
unwind the stack by hand, using HAL_THREAD_GET_SAVED_REGISTERS for your
arch to indicate what's required - which for ARM is just a
HAL_SavedRegisters struct.

> and if/why the thread is blocked?

For "if" look at state and compare with what's in thread.hxx. For "why"
look at "queue" and find out what object that queue is associated with.
 
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]