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]
Other format: [Raw text]

Re: How to get thread state info?


Grant Edwards <grante@visi.com> writes:

> For troubleshooting purposes, I would like to be abled to
> display the states of all the threads in the system (SP, IP,
> thread state, backtrace).  Are there any existing methods to do
> something like that?
> 

Well, GDB will do it.

But I assume that you want to do it from within eCos. In which case,
at the present the answer is no. However, I do have some code I have
been working on myself that does most of what you are after:
enumerating all the threads and getting some info from them (state,
priority, stack base and size etc.).

Some of the things you want are not very easy. SP and IP are
architecture specific. We would have to add new macros to every HAL to
extract them from saved thread states. Backtrace is really hard, GDB
contains all sorts of dodgy heuristics to try and get this right. We
couldn't possibly duplicate that on the target.

I'll see if I can check the code I have into the repository.

-- 
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/


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


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