|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [xenppc-unstable] [XEN][POWERPC] Fix Register dumping from ^A^A
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 177007615848aa444b0ccb4f5846ba74e67ac003
# Parent ea41ccaa8d77134b8fb55e8b002d358e67c47152
[XEN][POWERPC] Fix Register dumping from ^A^A^A console
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
xen/arch/powerpc/backtrace.c | 12 ++++++++++++
xen/include/asm-powerpc/debugger.h | 21 ++++++++++++---------
2 files changed, 24 insertions(+), 9 deletions(-)
diff -r ea41ccaa8d77 -r 177007615848 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 ea41ccaa8d77 -r 177007615848 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-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [XenPPC] [xenppc-unstable] [XEN][POWERPC] Fix Register dumping from ^A^A^A console,
Xen patchbot-xenppc-unstable <=
|
|
|
|
|