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]

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


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