Messages in this thread Patch in this message |  | | Date | Mon, 1 Nov 2004 19:30:21 GMT | | From | dhowells@redhat ... | | Subject | [PATCH 7/14] FRV: GDB stub dependent additional BUG()'s |
| |
The attached patch adds a couple of extra BUG() calls if a GDB stub is configured in the kernel. These allow the GDB stub to catch bad_page() and panic().
Signed-Off-By: dhowells@redhat.com --- diffstat frv-gdbstub-2610rc1bk10.diff kernel/panic.c | 3 +++ mm/page_alloc.c | 3 +++ 2 files changed, 6 insertions(+)
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/kernel/panic.c linux-2.6.10-rc1-bk10-frv/kernel/panic.c --- /warthog/kernels/linux-2.6.10-rc1-bk10/kernel/panic.c 2004-10-27 17:32:38.000000000 +0100 +++ linux-2.6.10-rc1-bk10-frv/kernel/panic.c 2004-11-01 11:47:05.162632657 +0000 @@ -59,6 +59,9 @@ vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf); +#ifdef CONFIG_GDBSTUB + BUG(); +#endif bust_spinlocks(0); #ifdef CONFIG_SMP diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/mm/page_alloc.c linux-2.6.10-rc1-bk10-frv/mm/page_alloc.c --- /warthog/kernels/linux-2.6.10-rc1-bk10/mm/page_alloc.c 2004-11-01 11:45:35.000000000 +0000 +++ linux-2.6.10-rc1-bk10-frv/mm/page_alloc.c 2004-11-01 11:47:05.230626996 +0000 @@ -83,6 +83,9 @@ page->mapping, page_mapcount(page), page_count(page)); printk(KERN_EMERG "Backtrace:\n"); dump_stack(); +#ifdef CONFIG_GDBSTUB + BUG(); +#endif printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); page->flags &= ~(1 << PG_private | 1 << PG_locked | - 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/
|  |