ia64/xen-unstable

changeset 1085:eefcc4592e7f

bitkeeper revision 1.720 (402b8772rYEU_Vd9LCqLXqSheY4-iQ)

turn off watchdog in pdb
author ach61@labyrinth.cl.cam.ac.uk
date Thu Feb 12 14:02:26 2004 +0000 (2004-02-12)
parents 35e9a7d31995
children 0960e7d04fce
files tools/examples/Makefile tools/xc/py/Makefile xen/arch/i386/pdb-stub.c
line diff
     1.1 --- a/tools/examples/Makefile	Thu Feb 12 11:51:34 2004 +0000
     1.2 +++ b/tools/examples/Makefile	Thu Feb 12 14:02:26 2004 +0000
     1.3 @@ -26,10 +26,10 @@ dist: all
     1.4  	mkdir -p ../../../install/bin
     1.5  	mkdir -p ../../../install/etc
     1.6  	mkdir -p ../../../install/init.d
     1.7 -	cp -a $(INSTALL) ../../../install/bin
     1.8 -	cp -a $(ETC) ../../../install/etc
     1.9 +	install --mode=555 $(INSTALL) ../../../install/bin
    1.10 +	install --mode=444 $(ETC) ../../../install/etc
    1.11  	#chmod 755 $(INSTALL)
    1.12 -	cp -a $(INITD) ../../../install/init.d
    1.13 +	install --mode=555 $(INITD) ../../../install/init.d
    1.14  
    1.15  clean:
    1.16  
     2.1 --- a/tools/xc/py/Makefile	Thu Feb 12 11:51:34 2004 +0000
     2.2 +++ b/tools/xc/py/Makefile	Thu Feb 12 14:02:26 2004 +0000
     2.3 @@ -8,9 +8,10 @@ install: all
     2.4  dist: all
     2.5  	mkdir -p ../../../../install/lib/python
     2.6  	for i in `find . -name 'Xc.so'` ; do                           \
     2.7 -		cp $$i ../../../../install/lib/python/`basename $$i` ; \
     2.8 +		install --mode=755 $$i ../../../../install/lib/python/`basename $$i` ; \
     2.9  	done
    2.10  	python -c 'import py_compile, sys; py_compile.compile("XenoUtil.py")'
    2.11 -	cp XenoUtil.py* ../../../../install/lib/python
    2.12 +	install --mode=444 XenoUtil.py ../../../../install/lib/python
    2.13 +	install --mode=644 XenoUtil.pyc ../../../../install/lib/python
    2.14  clean:
    2.15  	rm -rf build *.pyc *.pyo *.o *.a *~
     3.1 --- a/xen/arch/i386/pdb-stub.c	Thu Feb 12 11:51:34 2004 +0000
     3.2 +++ b/xen/arch/i386/pdb-stub.c	Thu Feb 12 14:02:26 2004 +0000
     3.3 @@ -2,6 +2,7 @@
     3.4  #include <xeno/sched.h>
     3.5  #include <asm-i386/ptrace.h>
     3.6  #include <xeno/keyhandler.h> 
     3.7 +#include <asm/apic.h>
     3.8  #include <asm/pdb.h>
     3.9  #include <xeno/list.h>
    3.10  
    3.11 @@ -13,9 +14,6 @@ static const char hexchars[]="0123456789
    3.12  
    3.13  static int remote_debug;
    3.14  
    3.15 -int pdb_foobar = 0x123456;                                        /* testing */
    3.16 -char *pdb_foobaz = "cambridge";                                   /* testing */
    3.17 -
    3.18  #define PDB_BUFMAX 1024
    3.19  static char pdb_in_buffer[PDB_BUFMAX];
    3.20  static char pdb_out_buffer[PDB_BUFMAX];
    3.21 @@ -677,13 +675,16 @@ void pdb_get_packet(char *buffer)
    3.22   * Return 1 if pdb is not interested in the exception; it should
    3.23   * be propagated to the guest os.
    3.24   */
    3.25 -#define DEBUG_EXCEPTION      1
    3.26 -#define BREAKPT_EXCEPTION    3
    3.27 -#define KEYPRESS_EXCEPTION 136
    3.28 +
    3.29 +#define DEBUG_EXCEPTION     0x01
    3.30 +#define BREAKPT_EXCEPTION   0x03
    3.31 +#define KEYPRESS_EXCEPTION  0x88
    3.32 +
    3.33  int pdb_handle_exception(int exceptionVector,
    3.34  			 struct pt_regs *xen_regs)
    3.35  {
    3.36      int signal = 0;
    3.37 +    int watchdog_save;
    3.38  
    3.39      /*
    3.40       * If PDB didn't set the breakpoint, is not single stepping, and the user
    3.41 @@ -712,6 +713,9 @@ int pdb_handle_exception(int exceptionVe
    3.42          xen_regs->eip--;
    3.43      }
    3.44  
    3.45 +    watchdog_save = watchdog_on;
    3.46 +    watchdog_on = 0;
    3.47 +
    3.48      /* Generate a signal for GDB. */
    3.49      switch ( exceptionVector )
    3.50      {
    3.51 @@ -722,7 +726,7 @@ int pdb_handle_exception(int exceptionVe
    3.52      case BREAKPT_EXCEPTION: 
    3.53          signal = 5; break;                                 /* SIGTRAP */
    3.54      default:
    3.55 -        printk("can't generate signal for unknown exception vector %d\n",
    3.56 +        printk("pdb: can't generate signal for unknown exception vector %d\n",
    3.57                 exceptionVector);
    3.58          break;
    3.59      }
    3.60 @@ -739,6 +743,8 @@ int pdb_handle_exception(int exceptionVe
    3.61      }
    3.62      while ( pdb_process_command(pdb_in_buffer, xen_regs) == 0 );
    3.63  
    3.64 +    watchdog_on = watchdog_save;
    3.65 +
    3.66      return 0;
    3.67  }
    3.68  
    3.69 @@ -773,8 +779,8 @@ void initialize_pdb()
    3.70          return;
    3.71      }
    3.72  
    3.73 -    printk("Initializing pervasive debugger (PDB) [%s] port %d, high %d\n",
    3.74 -           opt_pdb, pdb_com_port, pdb_high_bit);
    3.75 +    printk("Initializing pervasive debugger (PDB) on serial port %d %s\n",
    3.76 +           pdb_com_port, pdb_high_bit ? "(high bit enabled)" : "");
    3.77  
    3.78      /* ack any spurrious gdb packets */
    3.79      pdb_put_char ('+');