* show_stack()/show_trace() prototypes
@ 2002-09-28 16:42 David Mosberger
2002-09-28 18:26 ` Maciej W. Rozycki
2002-09-29 0:18 ` Paul Mackerras
0 siblings, 2 replies; 3+ messages in thread
From: David Mosberger @ 2002-09-28 16:42 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
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.
Thanks,
--david
PS: force_sig_info() still drops the siginfo pointer passed to it.
Will you fix this soon as promised?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: show_stack()/show_trace() prototypes
2002-09-28 16:42 show_stack()/show_trace() prototypes David Mosberger
@ 2002-09-28 18:26 ` Maciej W. Rozycki
2002-09-29 0:18 ` Paul Mackerras
1 sibling, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2002-09-28 18:26 UTC (permalink / raw)
To: davidm; +Cc: mingo, linux-kernel
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 +
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: show_stack()/show_trace() prototypes
2002-09-28 16:42 show_stack()/show_trace() prototypes David Mosberger
2002-09-28 18:26 ` Maciej W. Rozycki
@ 2002-09-29 0:18 ` Paul Mackerras
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mackerras @ 2002-09-29 0:18 UTC (permalink / raw)
To: davidm; +Cc: mingo, linux-kernel
David Mosberger writes:
> 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.
I agree. It is unnecessary to have these declarations in
linux/sched.h since these functions are only called from arch code.
So I would also vote for having the declarations arch-specific.
Paul.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-29 0:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-28 16:42 show_stack()/show_trace() prototypes David Mosberger
2002-09-28 18:26 ` Maciej W. Rozycki
2002-09-29 0:18 ` Paul Mackerras
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).