5 #include "entry_frame.h"
9 // static int (*base_handler)(Trap_state *) asm ("BASE_TRAP_HANDLER");
16 class Trap_state : public Trap_state_regs, public Syscall_frame,
20 typedef int (*Handler)(Trap_state*, unsigned cpu);
21 bool exclude_logging() { return false; }
31 Trap_state::sanitize_user_state()
38 Trap_state::ip() const
43 Trap_state::trapno() const
44 { return error_code; }
48 Trap_state::error() const
53 Trap_state::set_ipc_upcall()
55 error_code = 0x10000000; // see Msr
60 Trap_state::set_pagefault(Mword pfa, Mword error)
68 Trap_state::is_debug_exception() const
75 char const *excpts[] =
76 {"reset","machine check"};
78 printf("EXCEPTION: pfa=%08lx, error=%08lx\n",
79 //excpts[((error_code & ~0xff) >> 8) - 1]
80 pf_address, error_code);
82 printf("SP: %08lx LR: %08lx SRR0: %08lx SRR1 %08lx\n\n"
84 "R[3]: %08lx %08lx %08lx %08lx %08lx\n"
85 "R[8]: %08lx %08lx %08lx %08lx %08lx\n",
87 r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7],