[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Fix Register dumping from ^A^A^A console



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 38b437a708a2d32c4d8000a585b0c62afcd1a33b
# Parent  f911e945d9593aba1caa37845414ffd1596c64d0
[XEN][POWERPC] Fix Register dumping from ^A^A^A console
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/backtrace.c       |   12 ++++++++++++
 xen/include/asm-powerpc/debugger.h |   21 ++++++++++++---------
 2 files changed, 24 insertions(+), 9 deletions(-)

diff -r f911e945d959 -r 38b437a708a2 xen/arch/powerpc/backtrace.c
--- a/xen/arch/powerpc/backtrace.c      Wed Nov 22 14:53:13 2006 -0500
+++ b/xen/arch/powerpc/backtrace.c      Wed Nov 22 16:09:28 2006 -0500
@@ -220,3 +220,15 @@ void __warn(char *file, int line)
 
     console_end_sync();
 }
+
+void dump_execution_state(void)
+{
+    struct vcpu *v = current;
+    struct cpu_user_regs *regs = &v->arch.ctxt;
+
+    show_registers(regs);
+    if (regs->msr & MSR_HV) {
+        printk("In Xen:\n");
+        show_backtrace(regs->gprs[1], regs->pc, regs->lr);
+    }
+}
diff -r f911e945d959 -r 38b437a708a2 xen/include/asm-powerpc/debugger.h
--- a/xen/include/asm-powerpc/debugger.h        Wed Nov 22 14:53:13 2006 -0500
+++ b/xen/include/asm-powerpc/debugger.h        Wed Nov 22 16:09:28 2006 -0500
@@ -27,11 +27,19 @@ extern void show_backtrace_regs(struct c
 extern void show_backtrace_regs(struct cpu_user_regs *);
 extern void show_backtrace(ulong sp, ulong lr, ulong pc);
 
-static inline void dump_execution_state(void)
+static inline void show_execution_state(struct cpu_user_regs *regs)
+{
+    show_registers(regs);
+}
+
+extern void dump_execution_state(void);
+
+static inline void dump_all_execution_state(void)
 {
     ulong sp;
     ulong lr;
 
+    dump_execution_state();
     sp = (ulong)__builtin_frame_address(0);
     lr = (ulong)__builtin_return_address(0);
 
@@ -40,13 +48,13 @@ static inline void dump_execution_state(
 
 static inline void __force_crash(void)
 {
-    dump_execution_state();
+    dump_all_execution_state();
     __builtin_trap();
 }
 
 static inline void debugger_trap_immediate(void)
 {
-    dump_execution_state();
+    dump_all_execution_state();
 #ifdef CRASH_DEBUG
     __builtin_trap();
 #endif
@@ -55,13 +63,8 @@ static inline void unimplemented(void)
 static inline void unimplemented(void)
 {
 #ifdef VERBOSE
-    dump_execution_state();
+    dump_all_execution_state();
 #endif
-}
-
-static inline void show_execution_state(struct cpu_user_regs *regs)
-{
-    show_registers(regs);
 }
 
 extern void __warn(char *file, int line);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.