direct-io.hg

changeset 3786:87ebc14decdb

bitkeeper revision 1.1178 (420c87ccD2VdHFZVGUqHR4Zd2yI1mg)

After a fatal trap, we want to debug whatever caused the trap rather than the trap
handler. Fix things up accordingly.

Also add some documentation while I'm here.

Signed-off-by: sos22@cl.cam.ac.uk.
author sos22@douglas.cl.cam.ac.uk
date Fri Feb 11 10:24:12 2005 +0000 (2005-02-11)
parents 2c95c08ed850
children 13fe6a361bc3
files xen/arch/x86/traps.c xen/include/asm-x86/debugger.h
line diff
     1.1 --- a/xen/arch/x86/traps.c	Fri Feb 11 01:51:41 2005 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Fri Feb 11 10:24:12 2005 +0000
     1.3 @@ -123,7 +123,7 @@ asmlinkage void fatal_trap(int trapnr, s
     1.4      printk("System shutting down -- need manual reset.\n");
     1.5      printk("************************************\n");
     1.6  
     1.7 -    debugger_trap_immediate();
     1.8 +    debugger_trap_fatal(trapnr, regs);
     1.9  
    1.10      /* Lock up the console to prevent spurious output from other CPUs. */
    1.11      console_force_lock();
     2.1 --- a/xen/include/asm-x86/debugger.h	Fri Feb 11 01:51:41 2005 +0000
     2.2 +++ b/xen/include/asm-x86/debugger.h	Fri Feb 11 10:24:12 2005 +0000
     2.3 @@ -17,6 +17,14 @@
     2.4   *  hook to drop into a debug session. It can also be used to hook off
     2.5   *  deliberately caused traps (which you then handle and return non-zero)
     2.6   *  but really these should be hooked off 'debugger_trap_entry'.
     2.7 + *
     2.8 + * 3. debugger_trap_immediate():
     2.9 + *  Called if we want to drop into a debugger now.  This is essentially the
    2.10 + *  same as debugger_trap_fatal, except that we use the current register state
    2.11 + *  rather than the state which was in effect when we took the trap.
    2.12 + *  Essentially, if we're dying because of an unhandled exception, we call
    2.13 + *  debugger_trap_fatal; if we're dying because of a panic() we call
    2.14 + *  debugger_trap_immediate().
    2.15   */
    2.16  
    2.17  #ifndef __X86_DEBUGGER_H__