This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Thread "program counter" for SPARC platform.
- From: Ottawa Guy <ottawaguy81 at yahoo dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 6 May 2004 12:20:09 -0700 (PDT)
- Subject: [ECOS] Thread "program counter" for SPARC platform.
Hello,
I am using ECOS in a SPARC platform.
I am trying to implement something that would give the
PC of every task running in the system.
I can walk through the list of all task then print
information about every task. I print the stack_ptr by
calling get_saved_context(). I assumed the all
registers are saved into stack during the context Can
anyone suggest how I could figure out the PC and nPc
from stack. Following is the example .
Cyg_Thread *t = Cyg_Thread::get_list_head();
printf("\nThreads:\n\n");
while( NULL != t )
{
printf( "%20s stack base = %08x ptr = %08x size =
%08x\n",
"",
t->get_stack_base(),
t->get_saved_context(),
t->get_stack_size()
);
t = t->get_list_next();
}
Thanks
Ottawa
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss