Re: The stability crisis

Andrea Arcangeli (andrea@suse.de)
Mon, 5 Jul 1999 02:35:09 +0200 (CEST)


On Sun, 4 Jul 1999, Arnaldo Carvalho de Melo wrote:

>Andrea, can I get your patches to dump the stack trace using the sysrq
>keys? 8)

Ahh fun :). I hack it every time by hand when I need it 8)). But here it
is the patch (I'll hack this time as well :).

Index: arch/i386/kernel/process.c
===================================================================
RCS file: /var/cvs/linux/arch/i386/kernel/process.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 process.c
--- arch/i386/kernel/process.c 1999/05/06 23:55:56 1.1.1.4
+++ arch/i386/kernel/process.c 1999/07/05 00:32:39
@@ -411,6 +411,8 @@
__asm__("movl %%cr2, %0": "=r" (cr2));
__asm__("movl %%cr3, %0": "=r" (cr3));
printk("CR0: %08lx CR2: %08lx CR3: %08lx\n", cr0, cr2, cr3);
+ printk("----- stack trace ------\n");
+ show_registers(regs);
}

/*
Index: arch/i386/kernel/traps.c
===================================================================
RCS file: /var/cvs/linux/arch/i386/kernel/traps.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 traps.c
--- arch/i386/kernel/traps.c 1999/02/20 15:38:05 1.1.1.3
+++ arch/i386/kernel/traps.c 1999/07/05 00:33:01
@@ -120,7 +120,7 @@
#define VMALLOC_OFFSET (8*1024*1024)
#define MODULE_RANGE (8*1024*1024)

-static void show_registers(struct pt_regs *regs)
+void show_registers(struct pt_regs *regs)
{
int i;
int in_kernel = 1;

(note i didn't tried if it compiles but it should give you the idea :)

Andrea

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