direct-io.hg

changeset 11508:13e406c85c8b

[POWERPC][XEN] if crash_debug=n then at least dump a backtrace.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Sep 12 06:48:32 2006 -0400 (2006-09-12)
parents 3b045a00e703
children 2e6c10dc7c0b
files xen/include/asm-powerpc/debugger.h
line diff
     1.1 --- a/xen/include/asm-powerpc/debugger.h	Tue Sep 12 06:47:22 2006 -0400
     1.2 +++ b/xen/include/asm-powerpc/debugger.h	Tue Sep 12 06:48:32 2006 -0400
     1.3 @@ -36,8 +36,23 @@ static inline int debugger_trap_fatal(
     1.4  
     1.5  #else /* CRASH_DEBUG */
     1.6  
     1.7 -#define debugger_trap_fatal(_v, _r) (0)
     1.8 -#define debugger_trap_immediate() ((void)0)
     1.9 +static inline int debugger_trap_fatal(
    1.10 +    unsigned int vector, struct cpu_user_regs *regs)
    1.11 +{
    1.12 +    show_backtrace(regs->gprs[1], regs->lr, regs->pc);
    1.13 +    return vector;
    1.14 +}
    1.15 +
    1.16 +static inline void debugger_trap_immediate(void)
    1.17 +{
    1.18 +    ulong sp;
    1.19 +    ulong lr;
    1.20 +
    1.21 +    sp = (ulong)__builtin_frame_address(0);
    1.22 +    lr = (ulong)__builtin_return_address(0);
    1.23 +
    1.24 +    show_backtrace(sp, lr, lr);
    1.25 +}
    1.26  
    1.27  #endif /* CRASH_DEBUG */
    1.28