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*, Cpu_number::Value cpu);
21 bool exclude_logging() { return false; }
28 { s.error_code = 0x10000000; /* see Msr */ }
30 void dump() { s.dump(); }
40 Trap_state::copy_and_sanitize(Trap_state const *)
42 // FIXME: unimplemented
47 Trap_state::ip() const
52 Trap_state::trapno() const
53 { return error_code; }
57 Trap_state::error() const
62 Trap_state::set_pagefault(Mword pfa, Mword error)
70 Trap_state::is_debug_exception() const
77 char const *excpts[] =
78 {"reset","machine check"};
80 printf("EXCEPTION: pfa=%08lx, error=%08lx\n",
81 //excpts[((error_code & ~0xff) >> 8) - 1]
82 pf_address, error_code);
84 printf("SP: %08lx LR: %08lx SRR0: %08lx SRR1 %08lx\n\n"
86 "R[3]: %08lx %08lx %08lx %08lx %08lx\n"
87 "R[8]: %08lx %08lx %08lx %08lx %08lx\n",
89 r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7],