linux-mips
[Top] [All Lists]

Re: general mips question

To: Peter Popov <ppopov@redcreek.com>
Subject: Re: general mips question
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Mon, 15 May 2000 23:32:49 +0200
Cc: "linux@engr.sgi.com" <linux@cthulhu.engr.sgi.com>
In-reply-to: <3920677D.221EC442@redcreek.com>; from ppopov@redcreek.com on Mon, May 15, 2000 at 02:09:17PM -0700
References: <3920677D.221EC442@redcreek.com>
Sender: owner-linuxmips@oss.sgi.com
On Mon, May 15, 2000 at 02:09:17PM -0700, Peter Popov wrote:

> Is it possible to "walk" the stack on a mips system after a crash to
> figure out all the functions which were called upto and including the
> function where the crash occurred?  For example, I can do that on an
> i960 system because of the help I get from the cpu in creating a stack
> and saving some registers for every function call.  If A called B which
> called C which called D, I can walk the stack on an i960 system and
> figure out how I got to D. But I can't quite figure out how to do that
> in software on a mips system.  All I can get is the return address of
> the current function -- eg if the system crashed in D, all I can get is
> the return address which is somewhere in function C.  Any ideas?

Well, you couldn't figure out simply because it's not possible to unwind
MIPS stackframes without the help of debug information or doing stunts
like analysing the code of the returning function.  A reasonable heuristic
should be to search the stack for words that have valid text addresses
in them.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>