ia64/xen-unstable

changeset 1958:049ca85b7b73

bitkeeper revision 1.1098.1.2 (4107d1daarfb__XMoCtKug7vXc1-4w)

Random tidy-ups.
author sos22@donkeykong.cl.cam.ac.uk
date Wed Jul 28 16:18:34 2004 +0000 (2004-07-28)
parents 0efb230c9804
children 18624243ddc8
files xen/Rules.mk xen/arch/x86/Rules.mk xen/arch/x86/xdb.c xen/common/kernel.c
line diff
     1.1 --- a/xen/Rules.mk	Wed Jul 28 15:08:31 2004 +0000
     1.2 +++ b/xen/Rules.mk	Wed Jul 28 16:18:34 2004 +0000
     1.3 @@ -43,7 +43,7 @@ CFLAGS += -DNDEBUG
     1.4  endif
     1.5  
     1.6  ifeq ($(debugger),y)
     1.7 -CFLAGS += -DXEN_DEBUGGER
     1.8 +CFLAGS += -DXEN_DEBUGGER -g
     1.9  endif
    1.10  
    1.11  ifeq ($(perfc),y)
     2.1 --- a/xen/arch/x86/Rules.mk	Wed Jul 28 15:08:31 2004 +0000
     2.2 +++ b/xen/arch/x86/Rules.mk	Wed Jul 28 16:18:34 2004 +0000
     2.3 @@ -4,8 +4,8 @@
     2.4  CC := gcc
     2.5  LD := ld
     2.6  
     2.7 -CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -O3
     2.8 -CFLAGS  += -iwithprefix include -Wall -Werror -fomit-frame-pointer -pipe
     2.9 +CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
    2.10 +CFLAGS  += -iwithprefix include -Wall -Werror -pipe
    2.11  CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
    2.12  
    2.13  ifeq ($(TARGET_SUBARCH),x86_32)
    2.14 @@ -13,6 +13,12 @@ CFLAGS  += -m32 -march=i686
    2.15  LDFLAGS := --oformat elf32-i386 
    2.16  endif
    2.17  
    2.18 +ifeq ($(debugger),y)
    2.19 +CFLAGS += -O2
    2.20 +else
    2.21 +CFLAGS += -O3 -fomit-frame-pointer
    2.22 +endif
    2.23 +
    2.24  ifeq ($(TARGET_SUBARCH),x86_64)
    2.25  CFLAGS  += -m64 -mno-red-zone -fpic -fno-reorder-blocks
    2.26  CFLAGS  += -fno-asynchronous-unwind-tables
     3.1 --- a/xen/arch/x86/xdb.c	Wed Jul 28 15:08:31 2004 +0000
     3.2 +++ b/xen/arch/x86/xdb.c	Wed Jul 28 16:18:34 2004 +0000
     3.3 @@ -40,17 +40,7 @@ hex_char_val(unsigned char c)
     3.4  		return c - 'A' + 10;
     3.5  	else
     3.6  		BUG();
     3.7 -}
     3.8 -
     3.9 -static unsigned char
    3.10 -val_to_hex_char(unsigned val)
    3.11 -{
    3.12 -	if (val < 10)
    3.13 -		return val + '0';
    3.14 -	else if (val < 16)
    3.15 -		return val - 10 + 'a';
    3.16 -	else
    3.17 -		BUG();
    3.18 +	return -1;
    3.19  }
    3.20  
    3.21  /* Receive a command.  Returns -1 on csum error, 0 otherwise. */
    3.22 @@ -344,11 +334,11 @@ void
    3.23  		return;
    3.24  	}
    3.25  	xendbg_running = 1;
    3.26 -	/* trap_to_xendbg gets esp slightly wrong.  Correct for this. */
    3.27 -	regs->esp += 8;
    3.28  
    3.29 -	dbg_printk("Waiting for GDB to attach to XenDBG\n");
    3.30 -	/* Urgg... hope this is right... */
    3.31 +	/* Shouldn't really do this, but otherwise we stop for no
    3.32 +	   obvious reason, which is Bad */
    3.33 +	printk("Waiting for GDB to attach to XenDBG\n");
    3.34 +
    3.35  	while (resume == 0) {
    3.36  		r = receive_command(recv_buf);
    3.37  		if (r < 0) {
     4.1 --- a/xen/common/kernel.c	Wed Jul 28 15:08:31 2004 +0000
     4.2 +++ b/xen/common/kernel.c	Wed Jul 28 16:18:34 2004 +0000
     4.3 @@ -112,7 +112,6 @@ static struct {
     4.4  
     4.5  
     4.6  void initialize_xendbg(void);
     4.7 -void trap_to_xendbg(void);
     4.8  
     4.9  void cmain(multiboot_info_t *mbi)
    4.10  {
    4.11 @@ -299,10 +298,6 @@ void cmain(multiboot_info_t *mbi)
    4.12  
    4.13      shadow_mode_init();
    4.14  
    4.15 -    printk("Trapping to debugger.\n");
    4.16 -    trap_to_xendbg();
    4.17 -    printk("Trapped to debugger and came back.\n");
    4.18 -
    4.19      /*
    4.20       * We're going to setup domain0 using the module(s) that we stashed safely
    4.21       * above our heap. The second module, if present, is an initrd ramdisk.