On Wed, 4 Oct 2000, Keith Owens wrote:
> Rik van Riel <[EMAIL PROTECTED]> wrote:

> >Sysrq-T is broken on x86 ;((((((((
> 
> show_task() calls thread_saved_pc() which is giving bad results.
> Getting the correct PC for blocked threads is easy,
> 
> Index: 0-test9-pre9.3/include/asm-i386/processor.h
> --- 0-test9-pre9.3/include/asm-i386/processor.h Tue, 08 Aug 2000 16:14:08 +1000 kaos 
>(linux-2.4/P/18_processor. 1.1.1.5 644)
> +++ 0-test9-pre9.3(w)/include/asm-i386/processor.h Wed, 04 Oct 2000 01:48:32 +1100 
>kaos (linux-2.4/P/18_processor. 1.1.1.5 644)
> @@ -411,7 +411,7 @@ extern void forget_segments(void);
>   * Return saved PC of a blocked thread.
>   */
>  extern inline unsigned long thread_saved_pc(struct thread_struct *t)
>  {
> -       return ((unsigned long *)t->esp)[3];
> +       return (t->eip);
>  }
> 
> But it does not give you much.  Thread esp and eip are only
> saved during switch_to(), at which point eip always points to
> schedule+0x42c.

Yup ;)

So this function will need to look at the call trace and
give the function that called schedule() ...

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/               http://www.surriel.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to