ia64/xen-unstable

changeset 1963:fcf4e9746724

bitkeeper revision 1.1098.1.6 (4107db75itLJdhymWtZH0cAEBEY1jA)

Disable interrupts while we're doing debug stuff, to avoid
things changing underneath the user.
author sos22@donkeykong.cl.cam.ac.uk
date Wed Jul 28 16:59:33 2004 +0000 (2004-07-28)
parents f1c05a13dd6c
children fc03d5fc3686
files xen/arch/x86/xdb.c
line diff
     1.1 --- a/xen/arch/x86/xdb.c	Wed Jul 28 16:50:07 2004 +0000
     1.2 +++ b/xen/arch/x86/xdb.c	Wed Jul 28 16:59:33 2004 +0000
     1.3 @@ -318,6 +318,7 @@ void
     1.4  	int r;
     1.5  	static int xendbg_running;
     1.6  	static char recv_buf[4096];
     1.7 +	unsigned flags;
     1.8  
     1.9  	if (xendbg_serhnd < 0) {
    1.10  		dbg_printk("Debugger not ready yet.\n");
    1.11 @@ -337,6 +338,10 @@ void
    1.12  	   obvious reason, which is Bad */
    1.13  	printk("Waiting for GDB to attach to XenDBG\n");
    1.14  
    1.15 +	/* Try to make things a little more stable by disabling
    1.16 +	   interrupts while we're here. */
    1.17 +	local_irq_save(flags);
    1.18 +
    1.19  	while (resume == 0) {
    1.20  		r = receive_command(recv_buf);
    1.21  		if (r < 0) {
    1.22 @@ -346,6 +351,7 @@ void
    1.23  			resume = process_command(recv_buf, regs);
    1.24  	}
    1.25  	xendbg_running = 0;
    1.26 +	local_irq_restore(flags);
    1.27  }
    1.28  
    1.29  void