Module Name: src
Committed By: bouyer
Date: Wed Aug 26 23:17:03 UTC 2009
Modified Files:
src/sys/arch/i386/i386: db_trace.c
Log Message:
Do not try to get the faulting instruction if eip is 0.
This makes 'trace' work when the kernel paniced because it jumped to
a NULL function pointer.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/i386/i386/db_trace.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/i386/db_trace.c
diff -u src/sys/arch/i386/i386/db_trace.c:1.61 src/sys/arch/i386/i386/db_trace.c:1.62
--- src/sys/arch/i386/i386/db_trace.c:1.61 Sat Mar 7 22:02:16 2009
+++ src/sys/arch/i386/i386/db_trace.c Wed Aug 26 23:17:03 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.61 2009/03/07 22:02:16 ad Exp $ */
+/* $NetBSD: db_trace.c,v 1.62 2009/08/26 23:17:03 bouyer Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.61 2009/03/07 22:02:16 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.62 2009/08/26 23:17:03 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -501,7 +501,7 @@
sym = db_frame_info(frame, callpc, &name, &offset, &is_trap,
&narg);
- if (lastframe == 0 && sym == (db_sym_t)0) {
+ if (lastframe == 0 && sym == (db_sym_t)0 && callpc != 0) {
/* Symbol not found, peek at code */
int instr = db_get_value(callpc, 4, false);