How to backtrace stack frames?

How to backtrace stack frames?

Post by Jung-Ho A » Wed, 14 Jun 1995 04:00:00



I'm trying to print backtrace of all stack frames.
Does anybody know how to do it?
or Is there any information about stack frame?

Any tips would be appreciated.

Many thanks in advance,

--
==============================================================
 Jung-Ho Ahn                        ||
 OOPSLA Lab. Dept. of Computer Eng. || fax.   871-6945
 Seoul National University          || email:

 Seoul 151-742, KOREA               ||
==============================================================

 
 
 

How to backtrace stack frames?

Post by David Pete » Wed, 14 Jun 1995 04:00:00



>I'm trying to print backtrace of all stack frames.
>Does anybody know how to do it?
>or Is there any information about stack frame?

>Any tips would be appreciated.

>Many thanks in advance,

>--

You don't say what platform you're using. If it's HP-UX then you can use
the U_STACK_TRACE function. This is described in the PA-RISC Calling
Conventions Manual.

>==============================================================
> Jung-Ho Ahn                        ||
> OOPSLA Lab. Dept. of Computer Eng. || fax.   871-6945
> Seoul National University          || email:

> Seoul 151-742, KOREA               ||
>==============================================================

--
"Bring lawyers, guns and money. The shit is about to hit the fan."

 
 
 

How to backtrace stack frames?

Post by Paul D. Smi » Thu, 15 Jun 1995 04:00:00


%% Regarding Re: How to backtrace stack frames?;
%% David Peter <davep> writes:


    >> I'm trying to print backtrace of all stack frames.

    dp> You don't say what platform you're using. If it's HP-UX then you
    dp> can use the U_STACK_TRACE function. This is described in the
    dp> PA-RISC Calling Conventions Manual.

You can correctly infer from this that there is *no* portable way to do
this that will work on all (or even most) UNIX systems.

--
-------------------------------------------------------------------------------

 Senior Software Engineer                                   Bay Networks, Inc.
-----------------------------------------------==<http://www.baynetworks.com/>-
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.

 
 
 

1. How to backtrace stack frames?

Hello,

I would like to backtrace all stack frames in a signal
handler and then get 'program counter' for each nested
function call. Any suggestions or information about
stack frame would be appreciated.
I'm using Sparc10(SunOS 4.1.3) and g++ 2.6.3.

Thanks in advance

--
==============================================================
 Jung-Ho Ahn                        ||
 OOPSLA Lab. Dept. of Computer Eng. || fax.   871-6945
 Seoul National University          || email:

 Seoul 151-742, KOREA               ||
==============================================================

2. Cash prize or software?

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

4. Changing screens in C ? help !

5. call stack backtrace from a C program

6. put back panel in Gnome

7. Stack backtrace from signal handler

8. lpd reports unlinked

9. Stack Backtrace for Solaris 2.3/SunPro C 2.0

10. Seeking stack backtrace function

11. adb and dbx gives different stack backtraces

12. call stack backtrace from a C program (Solaris)

13. Interpreting the results from backtrace()/ backtrace() usability