ia64/xen-unstable

changeset 1518:9b9720f48ab1

bitkeeper revision 1.993 (40d6a9ddBgr-KXWbCA_-rEDpeCQHQw)

Fix pdb.
author kaf24@scramble.cl.cam.ac.uk
date Mon Jun 21 09:26:53 2004 +0000 (2004-06-21)
parents 5ce5fa6643ed
children a815a43920c0 a7a278aaf261
files xen/arch/x86/pdb-stub.c xen/include/xen/softirq.h
line diff
     1.1 --- a/xen/arch/x86/pdb-stub.c	Mon Jun 21 09:10:11 2004 +0000
     1.2 +++ b/xen/arch/x86/pdb-stub.c	Mon Jun 21 09:26:53 2004 +0000
     1.3 @@ -20,6 +20,7 @@
     1.4  #include <asm/pdb.h>
     1.5  #include <xen/list.h>
     1.6  #include <xen/serial.h>
     1.7 +#include <xen/softirq.h>
     1.8  
     1.9  #undef PDB_DEBUG_TRACE
    1.10  #ifdef PDB_DEBUG_TRACE
    1.11 @@ -1287,10 +1288,15 @@ int pdb_handle_exception(int exceptionVe
    1.12      return 0;
    1.13  }
    1.14  
    1.15 +void __pdb_key_pressed(void)
    1.16 +{
    1.17 +    struct pt_regs *regs = (struct pt_regs *)get_execution_context();
    1.18 +    pdb_handle_exception(KEYPRESS_EXCEPTION, regs);
    1.19 +}
    1.20 +
    1.21  void pdb_key_pressed(u_char key, void *dev_id, struct pt_regs *regs) 
    1.22  {
    1.23 -    pdb_handle_exception(KEYPRESS_EXCEPTION, regs);
    1.24 -    return;
    1.25 +    raise_softirq(DEBUGGER_SOFTIRQ);
    1.26  }
    1.27  
    1.28  void initialize_pdb()
    1.29 @@ -1323,6 +1329,7 @@ void initialize_pdb()
    1.30      /* Acknowledge any spurious GDB packets. */
    1.31      pdb_put_char('+');
    1.32  
    1.33 +    open_softirq(DEBUGGER_SOFTIRQ, __pdb_key_pressed);
    1.34      add_key_handler('D', pdb_key_pressed, "enter pervasive debugger");
    1.35  
    1.36      pdb_initialized = 1;
     2.1 --- a/xen/include/xen/softirq.h	Mon Jun 21 09:10:11 2004 +0000
     2.2 +++ b/xen/include/xen/softirq.h	Mon Jun 21 09:26:53 2004 +0000
     2.3 @@ -11,6 +11,9 @@ enum
     2.4  {
     2.5      AC_TIMER_SOFTIRQ=0,
     2.6      NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ,
     2.7 +#ifdef XEN_DEBUGGER
     2.8 +    DEBUGGER_SOFTIRQ,
     2.9 +#endif
    2.10      SCHEDULE_SOFTIRQ, /* NB. This must come last or do_softirq() will break! */
    2.11      NR_SOFTIRQS
    2.12  };