Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/dtrace/amd64/dtrace_subr.c
| Show First 20 Lines • Show All 443 Lines • ▼ Show 20 Lines | if (nofault) { | ||||
| case T_PROTFLT: | case T_PROTFLT: | ||||
| /* Flag an illegal operation. */ | /* Flag an illegal operation. */ | ||||
| cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_ILLOP; | cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_ILLOP; | ||||
| /* | /* | ||||
| * Offset the instruction pointer to the instruction | * Offset the instruction pointer to the instruction | ||||
| * following the one causing the fault. | * following the one causing the fault. | ||||
| */ | */ | ||||
| frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); | frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); | ||||
| return (1); | return (1); | ||||
| /* Page fault. */ | /* Page fault. */ | ||||
| case T_PAGEFLT: | case T_PAGEFLT: | ||||
| /* Flag a bad address. */ | /* Flag a bad address. */ | ||||
| cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; | cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; | ||||
| cpu_core[curcpu].cpuc_dtrace_illval = frame->tf_addr; | cpu_core[curcpu].cpuc_dtrace_illval = frame->tf_addr; | ||||
| /* | /* | ||||
| * Offset the instruction pointer to the instruction | * Offset the instruction pointer to the instruction | ||||
| * following the one causing the fault. | * following the one causing the fault. | ||||
| */ | */ | ||||
| frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); | frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); | ||||
| return (1); | return (1); | ||||
| default: | default: | ||||
| /* Handle all other traps in the usual way. */ | /* Handle all other traps in the usual way. */ | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| /* Handle the trap in the usual way. */ | /* Handle the trap in the usual way. */ | ||||
| return (0); | return (0); | ||||
| } | } | ||||