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: Multi thread Debugging


> -----Original Message-----
> From: Jonathan Larmour [mailto:jlarmour@redhat.co.uk]
> Subject: Re: [ECOS] Multi thread Debugging
> 
> > 
> > And doing so I saw that the hwthread->saved_context member 
> > is always a NULL
> > pointer (for every thread and all the time)
> 
> Then you should probably be looking at interrupt_end in
> kernel/VERSION/src/intr/intr.cxx to see what's going on there - in
> particular, is the "regs" argument valid.
> 

AFAICS the argument seems valid. 

Si now I see that there is a saved context when there is an interrupt but  
I don't understand how is the context saved when there is a thread switch.

The macro HAL_THREAD_SWITCH_CONTEXT let me think that there is something
saved in the stack_ptr member of the Threads while in interrupt_end it is
saved in the saved_context member. 

Then, I'v eseen in GDB that in order to get the information for each thread
it does a thread switch. How (where?) is a thread switch request from gdb
done in the Stub? 

Thanks
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

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