request for info on stack and frame pointers on sparc

request for info on stack and frame pointers on sparc

Post by N. Joshua Mad » Fri, 16 May 1997 04:00:00



        i would like to dump the call stack from a signal handler in a
multithreaded app.  unfortunately i can not find any information on
the calling convention for a sparc (running solaris 2.5.1).  does any
one have the information i am lokking for or know where to look ?

thanks in advance.

 
 
 

request for info on stack and frame pointers on sparc

Post by N. Joshua Mad » Fri, 16 May 1997 04:00:00


        i would like to dump the call stack from a signal handler in a
multi-threaded app.  unfortunately i can not find any information on
the calling convention for a sparc (running solaris 2.5.1).  does any
one have the information i am looking for or know where to look ?

thanks in advance.

 
 
 

1. SPARC stack pointer (maybe off topic)

My question concerns the following assembler instruction

ld [%i0], %sp

What I would like to happen is the contents of %i0 point to a structure I
have built.  I expect that the stack should now point to the information
the [%i0] points to.

DIAGRAM 1
-------------------------------------------------------------
REGISTERS               Main Memory    
%sp -> 0xa              0xa contains 0xff9ef    
%i0 -> 0xef20           Oxb [or $sp + 4] contains Oxffeee

                        0xef20 contains Oxf10

                        0xf10 contains structure data
                        ...
-------------------------------------------------------------

I want this to happen:

DIAGRAM 2
-------------------------------------------------------------
%sp -> 0xf10            0xf10 contains structure data
-------------------------------------------------------------

Unfortunately this happens:

DIAGRAM 3
-------------------------------------------------------------
%sp -> 0xf10            0xf10 contains 0xff9ef
                        ... old sp info copied here
-------------------------------------------------------------

I find this very strange, and suspect the %sp register cannot be
manipulated.  If I do the same stuff with %fp I have no problem
unfortunately I need to use the %sp

Any ideas??
If you need more info on the overall problem it can be arranged

Peter Jamieson
U of T

2. Questions for Linux user/developers

3. gdb: missing frames in frame stack or function name garbled

4. Can linux run on this?

5. Request for Info: Frame capture to laserdisc

6. DNS Client Problem,

7. Request: Frame Grabber DT-2861 info again, please - -

8. Memory Fault problems when running shutdown, bcheckrc, dumpsave. Help!?

9. Sparc-1 frame buffer in Sparc-10?

10. what causes 0x0 in stack frame?

11. gcc stack frame layout for linux?

12. Bogus end() stack frames under Linux