Clean up a bit.
This commit is contained in:
parent
52778508b5
commit
e2662b6ceb
|
@ -27,18 +27,17 @@
|
||||||
/*
|
/*
|
||||||
* Interface to new debugger.
|
* Interface to new debugger.
|
||||||
*/
|
*/
|
||||||
#include "param.h"
|
#include <sys/param.h>
|
||||||
#include "proc.h"
|
#include <sys/proc.h>
|
||||||
#include <machine/db_machdep.h>
|
|
||||||
|
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
|
#include <sys/systm.h> /* just for boothowto --eichin */
|
||||||
|
|
||||||
#include <vm/vm_statistics.h>
|
#include <vm/vm_statistics.h>
|
||||||
#include <vm/pmap.h>
|
#include <vm/pmap.h>
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <machine/trap.h>
|
||||||
#include <sys/systm.h> /* just for boothowto --eichin */
|
#include <machine/mon.h>
|
||||||
#include "machine/trap.h"
|
#include <machine/db_machdep.h>
|
||||||
#include "machine/mon.h"
|
|
||||||
|
|
||||||
extern jmp_buf db_jmpbuf; /* XXX used in i386. ? */
|
extern jmp_buf db_jmpbuf; /* XXX used in i386. ? */
|
||||||
extern jmp_buf *db_recover;
|
extern jmp_buf *db_recover;
|
||||||
|
@ -56,7 +55,6 @@ kdb_kintr(regs)
|
||||||
kdb_trap(-1, regs);
|
kdb_trap(-1, regs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define T_BRKPT T_TRAP15
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* kdb_trap - field a TRACE or BPT trap
|
* kdb_trap - field a TRACE or BPT trap
|
||||||
|
@ -65,17 +63,11 @@ kdb_trap(type, regs)
|
||||||
int type;
|
int type;
|
||||||
register struct mc68020_saved_state *regs;
|
register struct mc68020_saved_state *regs;
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type) {
|
||||||
{
|
|
||||||
case T_TRACE: /* single-step */
|
case T_TRACE: /* single-step */
|
||||||
case T_BRKPT: /* breakpoint */
|
case T_BREAKPOINT: /* breakpoint */
|
||||||
/* case T_WATCHPOINT:*/
|
/* case T_WATCHPOINT:*/
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case EXC_BREAKPOINT:
|
|
||||||
type = T_BRKPT;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case -1:
|
case -1:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -110,10 +102,9 @@ kdb_trap(type, regs)
|
||||||
* trace bit in the current SR (and trapping while exiting KDB).
|
* trace bit in the current SR (and trapping while exiting KDB).
|
||||||
*/
|
*/
|
||||||
(void) spl7();
|
(void) spl7();
|
||||||
/*
|
/* if (!USERMODE(regs->sr) && (regs->sr & SR_T1) && (current_thread())) {
|
||||||
if (!USERMODE(regs->sr) && (regs->sr & SR_T1) && (current_thread())) {
|
|
||||||
current_thread()->pcb->pcb_flag |= TRACE_KDB;
|
current_thread()->pcb->pcb_flag |= TRACE_KDB;
|
||||||
*/
|
}*/
|
||||||
/* if ((regs->sr & SR_T1) && (current_thread())) {
|
/* if ((regs->sr & SR_T1) && (current_thread())) {
|
||||||
current_thread()->pcb->flag |= TRACE_KDB;
|
current_thread()->pcb->flag |= TRACE_KDB;
|
||||||
}*/
|
}*/
|
||||||
|
@ -122,8 +113,7 @@ kdb_trap(type, regs)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char *trap_type[];
|
extern char *trap_type[];
|
||||||
#define TRAP_TYPES 15
|
extern int trap_types;
|
||||||
/*extern int TRAP_TYPES;*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print trap reason.
|
* Print trap reason.
|
||||||
|
@ -132,7 +122,7 @@ kdbprinttrap(type, code)
|
||||||
int type, code;
|
int type, code;
|
||||||
{
|
{
|
||||||
printf("kernel: ");
|
printf("kernel: ");
|
||||||
if (type >= TRAP_TYPES || type < 0)
|
if (type >= trap_types || type < 0)
|
||||||
printf("type %d", type);
|
printf("type %d", type);
|
||||||
else
|
else
|
||||||
printf("%s", trap_type[type]);
|
printf("%s", trap_type[type]);
|
||||||
|
@ -142,7 +132,6 @@ kdbprinttrap(type, code)
|
||||||
/*
|
/*
|
||||||
* Read bytes from kernel address space for debugger.
|
* Read bytes from kernel address space for debugger.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
db_read_bytes(addr, size, data)
|
db_read_bytes(addr, size, data)
|
||||||
vm_offset_t addr;
|
vm_offset_t addr;
|
||||||
|
@ -197,10 +186,9 @@ db_write_bytes(addr, size, data)
|
||||||
#if 0
|
#if 0
|
||||||
if (oldmap0) {
|
if (oldmap0) {
|
||||||
setpgmap(addr, oldmap0);
|
setpgmap(addr, oldmap0);
|
||||||
if (oldmap1) {
|
if (oldmap1)
|
||||||
setpgmap(addr1, oldmap1);
|
setpgmap(addr1, oldmap1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue