#endif
}
+void show_execution_state(struct cpu_user_regs *regs)
+{
+ show_registers(regs);
+ show_stack(regs);
+}
+
/*
* This is called for faults at very unexpected times (e.g., when interrupts
* are disabled). In such situations we can't do much that is safe. We try to
watchdog_disable();
console_start_sync();
- show_registers(regs);
+ show_execution_state(regs);
if ( trapnr == TRAP_page_fault )
{
DEBUGGER_trap_fatal(trapnr, regs);
- show_registers(regs);
+ show_execution_state(regs);
panic("CPU%d FATAL TRAP: vector = %d (%s)\n"
"[error_code=%04x]\n",
smp_processor_id(), trapnr, str, regs->error_code);
if ( unlikely(!guest_mode(regs)) )
{
DEBUGGER_trap_fatal(TRAP_invalid_op, regs);
- show_registers(regs);
+ show_execution_state(regs);
panic("CPU%d FATAL TRAP: vector = %d (invalid opcode)\n",
smp_processor_id(), TRAP_invalid_op);
}
if ( !guest_mode(regs) )
{
DEBUGGER_trap_fatal(TRAP_int3, regs);
- show_registers(regs);
+ show_execution_state(regs);
panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id());
}
DEBUGGER_trap_fatal(TRAP_page_fault, regs);
- show_registers(regs);
+ show_execution_state(regs);
show_page_walk(addr);
panic("CPU%d FATAL PAGE FAULT\n"
"[error_code=%04x]\n"
DEBUGGER_trap_fatal(TRAP_gp_fault, regs);
hardware_gp:
- show_registers(regs);
+ show_execution_state(regs);
panic("CPU%d GENERAL PROTECTION FAULT\n[error_code=%04x]\n",
smp_processor_id(), regs->error_code);
return 0;
"ss: %04x cs: %04x\n",
fault_regs.ds, fault_regs.es, fault_regs.fs,
fault_regs.gs, fault_regs.ss, fault_regs.cs);
-
- show_stack(regs);
}
void show_page_walk(unsigned long addr)
#include <public/callback.h>
-static void __show_registers(struct cpu_user_regs *regs)
+void show_registers(struct cpu_user_regs *regs)
{
struct cpu_user_regs fault_regs = *regs;
unsigned long fault_crs[8];
fault_regs.gs, fault_regs.ss, fault_regs.cs);
}
-void show_registers(struct cpu_user_regs *regs)
-{
- __show_registers(regs);
- show_stack(regs);
-}
-
void show_page_walk(unsigned long addr)
{
unsigned long pfn, mfn = read_cr3() >> PAGE_SHIFT;
/* Find information saved during fault and dump it to the console. */
printk("************************************\n");
- __show_registers(regs);
+ show_registers(regs);
show_stack_overflow(regs->rsp);
printk("************************************\n");
printk("CPU%d DOUBLE FAULT -- system shutdown\n", smp_processor_id());
{
printk("Domain %d (vcpu#%d) crashed on cpu#%d:\n",
d->domain_id, current->vcpu_id, smp_processor_id());
- show_registers(guest_cpu_user_regs());
+ show_execution_state(guest_cpu_user_regs());
}
else
{
static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
{
printk("'%c' pressed -> dumping registers\n", key);
- show_registers(regs);
+ show_execution_state(regs);
}
static void halt_machine(unsigned char key, struct cpu_user_regs *regs)
#include <xen/gdbstub.h>
void show_registers(struct cpu_user_regs *regs);
+#define show_execution_state show_registers
// NOTE: on xen struct pt_regs = struct cpu_user_regs
// see include/asm-ia64/linux-xen/asm/ptrace.h
extern void vmx_save_state(struct vcpu *v);
extern void vmx_load_state(struct vcpu *v);
extern void show_registers(struct pt_regs *regs);
+#define show_execution_state show_registers
extern int vmx_build_physmap_table(struct domain *d);
extern unsigned long __gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
extern void sync_split_caches(void);
#define __hvm_bug(regs) \
do { \
printk("__hvm_bug at %s:%d\n", __FILE__, __LINE__); \
- show_registers(regs); \
+ show_execution_state(regs); \
domain_crash_synchronous(); \
} while (0)
void show_stack(struct cpu_user_regs *regs);
void show_stack_overflow(unsigned long esp);
void show_registers(struct cpu_user_regs *regs);
+void show_execution_state(struct cpu_user_regs *regs);
void show_page_walk(unsigned long addr);
asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);