Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/gdb_machdep.c
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | gdb_cpu_setreg(int regnum, void *val) | ||||
} | } | ||||
} | } | ||||
int | int | ||||
gdb_cpu_signal(int type, int code) | gdb_cpu_signal(int type, int code) | ||||
{ | { | ||||
switch (type & ~T_USER) { | switch (type & ~T_USER) { | ||||
case 0: return (SIGFPE); /* Divide by zero. */ | case T_BPTFLT: return (SIGTRAP); | ||||
case 1: return (SIGTRAP); /* Debug exception. */ | case T_ARITHTRAP: return (SIGFPE); | ||||
case 3: return (SIGTRAP); /* Breakpoint. */ | case T_PROTFLT: return (SIGSEGV); | ||||
case 4: return (SIGSEGV); /* into instr. (overflow). */ | case T_TRCTRAP: return (SIGTRAP); | ||||
case 5: return (SIGURG); /* bound instruction. */ | case T_PAGEFLT: return (SIGSEGV); | ||||
case 6: return (SIGILL); /* Invalid opcode. */ | case T_DIVIDE: return (SIGFPE); | ||||
case 7: return (SIGFPE); /* Coprocessor not present. */ | case T_NMI: return (SIGTRAP); | ||||
case 8: return (SIGEMT); /* Double fault. */ | case T_FPOPFLT: return (SIGILL); | ||||
case 9: return (SIGSEGV); /* Coprocessor segment overrun. */ | case T_TSSFLT: return (SIGSEGV); | ||||
case 10: return (SIGTRAP); /* Invalid TSS (also single-step). */ | case T_SEGNPFLT: return (SIGSEGV); | ||||
case 11: return (SIGSEGV); /* Segment not present. */ | case T_STKFLT: return (SIGSEGV); | ||||
case 12: return (SIGSEGV); /* Stack exception. */ | case T_XMMFLT: return (SIGFPE); | ||||
case 13: return (SIGSEGV); /* General protection. */ | |||||
case 14: return (SIGSEGV); /* Page fault. */ | |||||
case 16: return (SIGEMT); /* Coprocessor error. */ | |||||
} | } | ||||
return (SIGEMT); | return (SIGEMT); | ||||
} | } | ||||
void * | void * | ||||
gdb_begin_write(void) | gdb_begin_write(void) | ||||
{ | { | ||||
Show All 9 Lines |