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: Nick Garnett <nickg at ecoscentric dot com>
- To: Ottawa Guy <ottawaguy81 at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 07 May 2004 09:47:10 +0100
- Subject: Re: [ECOS] Thread "program counter" for SPARC platform.
- References: <20040506192009.68049.qmail@web60904.mail.yahoo.com>
Ottawa Guy <ottawaguy81@yahoo.com> writes:
> 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 .
>
You are going to have to work it out. It's there on the stack
somewhere. Take a look at what the context switch and interrupt
handling code does. You will also probably need an architecture
reference manual.
The sparc is very weird in this respect. I wouldn't want to try to
work this out.
Good luck.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss