This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Thread "program counter" for SPARC platform.
- From: Ottawa Guy <ottawaguy81 at yahoo dot com>
- To: amassa at san dot rr dot com
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 6 May 2004 12:45:45 -0700 (PDT)
- Subject: [ECOS] RE: Thread "program counter" for SPARC platform.
Thanks Anthony for your quick response. I looked at
the hal_thread_switch_context ealier. That function
saves all the current register of the SPARC platform.
However I didnt see any program counter there.
thanks
Ottawa
--- "amassa@san.rr.com" <amassa@san.rr.com> wrote:
>
> You can see what is being stored during a context
> switch in
> /packages/hal/sparc/arch/current/src/context.S in
> the function
> hal_thread_switch_context.
>
> You can parse through here and get the current
> location saved for the
> current thread.
>
> --Anthony
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> 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
>
>
>
--------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
__________________________________
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