Don't enter the debugger if KDB_UNATTENDED is set or if

debug.debugger_on_panic=0.

MFC after:	2 weeks
This commit is contained in:
Paul Saab 2005-04-20 20:52:46 +00:00
parent cf7152ab4c
commit 8cb038b4b2
6 changed files with 3 additions and 7 deletions

View File

@ -623,7 +623,7 @@ trap_fatal(frame, eva)
}
#ifdef KDB
if (kdb_trap(type, 0, frame))
if ((debugger_on_panic || kdb_active) && kdb_trap(type, 0, frame))
return;
#endif
printf("trap number = %d\n", type);

View File

@ -71,7 +71,6 @@ extern db_expr_t db_maxoff;
extern int db_indent;
extern int db_inst_count;
extern int db_load_count;
extern int debugger_on_panic;
extern int db_store_count;
extern db_expr_t db_radix;
extern db_expr_t db_max_width;

View File

@ -798,7 +798,7 @@ trap_fatal(frame, eva)
}
#ifdef KDB
if (kdb_trap(type, 0, frame))
if ((debugger_on_panic || kdb_active) && kdb_trap(type, 0, frame))
return;
#endif
printf("trap number = %d\n", type);

View File

@ -93,8 +93,6 @@ int badaddr_read(void *, size_t, int *);
extern char *syscallnames[];
extern int debugger_on_panic; /* XXX */
struct powerpc_exception {
u_int vector;
char *name;

View File

@ -93,8 +93,6 @@ int badaddr_read(void *, size_t, int *);
extern char *syscallnames[];
extern int debugger_on_panic; /* XXX */
struct powerpc_exception {
u_int vector;
char *name;

View File

@ -57,6 +57,7 @@ struct thread;
struct trapframe;
extern int kdb_active; /* Non-zero while in debugger. */
extern int debugger_on_panic; /* enter the debugger on panic. */
extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */
extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */
extern struct pcb *kdb_thrctx; /* Current context. */