WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][POWERPC] Fix Register dumping from ^A^A^A console
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:34:51 +0000
Delivery-date: Wed, 13 Dec 2006 09:38:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN][POWERPC] Fix Register dumping from ^A^A^A console, Xen patchbot-unstable <=