Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/gdb_machdep.c
Show All 33 Lines | |||||
#include <sys/kdb.h> | #include <sys/kdb.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/signal.h> | #include <sys/signal.h> | ||||
#include <machine/cpufunc.h> | #include <machine/cpufunc.h> | ||||
#include <machine/frame.h> | #include <machine/frame.h> | ||||
#include <machine/gdb_machdep.h> | #include <machine/gdb_machdep.h> | ||||
#include <machine/md_var.h> | |||||
#include <machine/pcb.h> | #include <machine/pcb.h> | ||||
#include <machine/psl.h> | #include <machine/psl.h> | ||||
#include <machine/reg.h> | #include <machine/reg.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include <machine/trap.h> | #include <machine/trap.h> | ||||
#include <machine/frame.h> | #include <machine/frame.h> | ||||
#include <machine/endian.h> | #include <machine/endian.h> | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | gdb_cpu_signal(int type, int code) | ||||
case 16: return (SIGEMT); /* Coprocessor error. */ | case 16: return (SIGEMT); /* Coprocessor error. */ | ||||
} | } | ||||
return (SIGEMT); | return (SIGEMT); | ||||
} | } | ||||
void * | void * | ||||
gdb_begin_write(void) | gdb_begin_write(void) | ||||
{ | { | ||||
u_long cr0save; | |||||
cr0save = rcr0(); | return (disable_wp() ? &gdb_begin_write : NULL); | ||||
load_cr0(cr0save & ~CR0_WP); | |||||
return ((void *)cr0save); | |||||
} | } | ||||
void | void | ||||
gdb_end_write(void *arg) | gdb_end_write(void *arg) | ||||
{ | { | ||||
load_cr0((u_long)arg); | restore_wp(arg != NULL); | ||||
} | } | ||||