lkml.org 
[lkml]   [2002]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: show_stack()/show_trace() prototypes
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 +

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.054 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site