linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: davidm@hpl.hp.com
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: show_stack()/show_trace() prototypes
Date: Sat, 28 Sep 2002 20:26:56 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.GSO.3.96.1020928202321.10698A-100000@delta.ds2.pg.gda.pl> (raw)
In-Reply-To: <200209281642.g8SGgKMA007827@napali.hpl.hp.com>

On Sat, 28 Sep 2002, David Mosberger wrote:

> Ingo, the ksymoops patch adds these to linux/sched.h:
> 
> extern void show_trace(unsigned long *stack);
> extern void show_stack(unsigned long *stack);
> 
> This is not good.  In general, it is not possible to do a reliable
> backtrace with just a stack pointer as a starting point (it is
> necessary to have access to the entire "preserved" machine state
> instead).  I'd suggest to either change the argument to a task_struct
> pointer (and update half a dozen platforms or so accordingly), or to
> leave the declarations platform-specific like they were before.

 Also the prototypes may differ, e.g. for MIPS/MIPS64 we have:

extern void show_trace(long *stack);

since MIPS addresses are signed and then, for consistency, we have:

extern void show_stack(long *stack);

as well.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


  reply	other threads:[~2002-09-28 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-28 16:42 show_stack()/show_trace() prototypes David Mosberger
2002-09-28 18:26 ` Maciej W. Rozycki [this message]
2002-09-29  0:18 ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.3.96.1020928202321.10698A-100000@delta.ds2.pg.gda.pl \
    --to=macro@ds2.pg.gda.pl \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).