trap
if (signo < NSIG && trap[signo] != NULL) {
out1qstr(trap[signo]);
if (trap[signo])
ckfree(trap[signo]);
trap[signo] = action;
for (tp = trap ; tp <= &trap[NSIG - 1] ; tp++) {
if (tp != &trap[0])
setsignal(tp - trap);
for (tp = trap ; tp <= &trap[NSIG - 1] ; tp++) {
if ((t = trap[signo]) == NULL)
return (trap[SIGCHLD] != NULL && *trap[SIGCHLD] != '\0');
if (signo == SIGINT && trap[SIGINT] == NULL) {
if (trap[signo] != NULL && trap[signo][0] != '\0' &&
if (trap[i]) {
evalstring(stsavestr(trap[i]), 0);
if ((p = trap[0]) != NULL && *p != '\0') {
trap[0] = NULL;
static char *volatile trap[NSIG]; /* trap handler commands */
if (rc) return (trap) ? (error) : rc; \
#define INIT_INIT_EX(trap, error) \
#define CLIENT_INIT_EX(trap, error) \
INIT_INIT_EX(trap, error); \
if (status) return (trap) ? (error) : status; \
void __noinline trap(struct trapframe *frame);
trap(frame);
#define HFGT_TRAP_FIELDS(read, write, read_pfx, write_pfx, name, trap) \
el2ctx->read |= read_pfx ## _EL2_ ## name ## _ ## trap; \
el2ctx->write |= write_pfx ## _EL2_ ## name ## _ ## trap; \
void trap(struct trapframe *frame);
SYSCTL_PROC(_debug_kdb, OID_AUTO, trap,
vm_offset_t trap;
for (trap = EXC_RST; trap < EXC_LAST; trap += 0x20)
bcopy(&trapcode, (void *)trap, trapsize);
void trap(struct trapframe *);
trap(framep);
struct hyptrap *trap)
htrap = trap;
if (trap->scause == -1 && (val & 0x3) == 0x3) {
struct hyptrap *trap)
bzero(trap, sizeof(struct hyptrap));
trap->scause = -1;
riscv_unpriv_read(hypctx, guest_addr, &insn, trap);
if (trap->scause != -1)
struct hyptrap trap;
ret = riscv_gen_inst_emul_data(hypctx, vme, &trap);
vme->u.hyp.scause = trap.scause;
#define KDB_BACKEND(name, init, trace, trace_thread, trap) \
.dbbe_trap = trap \