[ECOS] [PC Target][Patch] Full Multi Thread debugging.

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Thu Sep 21 14:39:00 GMT 2000


Hi,

Here is patch that's should provide full debugging multithread debug
capabilities to the PC target. 

In fact there are two things:

1/ New saved context:
Currently, the context saved during thread switch and the one saved on a
interrupt are different. The first thing this patch should do is to have the
same context saved. The context saved before a normal task switch(ie: not an
interrupt) will appears as if the thread were interrupted in
Cyg_Scheduler::unlock_inner.
I think this part of the patch is quite good. I didn't noticed any changes
while using eCos with this part of the patch.

2/ PC Stub modifications:
In the current PC stub, the context reported to gdb was always the context
of the interrupted task (ie: the current task)
In order to have the stub report all the context, I had to modify the stub.
This part of the patch is probably the less simple, so I enclosed my changes
in some #ifdef _FG_X. You will have to build eCos with this macro defined in
order to see the result.

The results looks quite good: You should be able to see the call stack of
each thread now. However, it is not perfect. For example, the position of
the idle task is often at 0xffffffff and I suspect it may be the cause of
some crashes. I ran some of the eCos tests with this patch and that seemed
fine, but I think more in-depth tests could reveal some problems. I think
that In most of my test the task switches are caused by the thread waiting
for some lock, and maybe there is some problems occuring in time-sliced task
switch.

I would be glad is someones have the time to try and look at this patch and
give some feedback. 

Thanks 

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 


 


 <<pc_debug_thread.patch.fix>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc_debug_thread.patch.fix
Type: text/x-diff
Size: 12164 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20000921/1ee8eba5/attachment.bin>


More information about the Ecos-discuss mailing list