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: Thread "program counter" for SPARC platform.


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


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