bitkeeper revision 1.1236.25.14 (42338ac2o4mi66zj6XSPc2Z66lgEaQ)
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Sun, 13 Mar 2005 00:35:14 +0000 (00:35 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Sun, 13 Mar 2005 00:35:14 +0000 (00:35 +0000)
Various cleanups.
Signed-off-by: Christian Limpach <chris@xensource.com>
tools/libxc/xc_ptrace.c
xen/Rules.mk
xen/arch/x86/traps.c
xen/common/domain.c

index ea0b9f44c5fb25a31856bb80cd4d6a744c736d85..d5f8166acfa866b8b76f92154b508ecca577a874 100644 (file)
@@ -49,63 +49,63 @@ char * ptrace_names[] = {
 };
 
 struct gdb_regs {
-        long ebx; /* 0 */
-        long ecx; /* 4 */
-        long edx; /* 8 */
-        long esi; /* 12 */
-        long edi; /* 16 */
-        long ebp; /* 20 */
-        long eax; /* 24 */ 
-        int  xds; /* 28 */
-        int  xes; /* 32 */
-       int  xfs; /* 36 */
-       int  xgs; /* 40 */
-       long orig_eax; /* 44 */
-        long eip;    /* 48 */
-        int  xcs;    /* 52 */
-        long eflags; /* 56 */
-        long esp;    /* 60 */     
-       int  xss;    /* 64 */
+    long ebx; /* 0 */
+    long ecx; /* 4 */
+    long edx; /* 8 */
+    long esi; /* 12 */
+    long edi; /* 16 */
+    long ebp; /* 20 */
+    long eax; /* 24 */ 
+    int  xds; /* 28 */
+    int  xes; /* 32 */
+    int  xfs; /* 36 */
+    int  xgs; /* 40 */
+    long orig_eax; /* 44 */
+    long eip;    /* 48 */
+    int  xcs;    /* 52 */
+    long eflags; /* 56 */
+    long esp;    /* 60 */     
+    int  xss;    /* 64 */
 };
 #define printval(x) printf("%s = %lx\n", #x, (long)x);
 #define SET_PT_REGS(pt, xc) \
 { \
-pt.ebx = xc.ebx; \
-pt.ecx = xc.ecx; \
-pt.edx = xc.edx; \
-pt.esi = xc.esi; \
-pt.edi = xc.edi; \
-pt.ebp = xc.ebp; \
-pt.eax = xc.eax; \
-pt.eip = xc.eip; \
-pt.xcs = xc.cs; \
-pt.eflags = xc.eflags; \
-pt.esp = xc.esp; \
-pt.xss = xc.ss; \
-pt.xes = xc.es; \
-pt.xds = xc.ds; \
-pt.xfs = xc.fs; \
-pt.xgs = xc.gs; \
+    pt.ebx = xc.ebx; \
+    pt.ecx = xc.ecx; \
+    pt.edx = xc.edx; \
+    pt.esi = xc.esi; \
+    pt.edi = xc.edi; \
+    pt.ebp = xc.ebp; \
+    pt.eax = xc.eax; \
+    pt.eip = xc.eip; \
+    pt.xcs = xc.cs; \
+    pt.eflags = xc.eflags; \
+    pt.esp = xc.esp; \
+    pt.xss = xc.ss; \
+    pt.xes = xc.es; \
+    pt.xds = xc.ds; \
+    pt.xfs = xc.fs; \
+    pt.xgs = xc.gs; \
 }
 
 #define SET_XC_REGS(pt, xc) \
 { \
-xc.ebx = pt->ebx; \
-xc.ecx = pt->ecx; \
-xc.edx = pt->edx; \
-xc.esi = pt->esi; \
-xc.edi = pt->edi; \
-xc.ebp = pt->ebp; \
-xc.eax = pt->eax; \
-xc.eip = pt->eip; \
-xc.cs = pt->xcs; \
-xc.eflags = pt->eflags; \
-xc.esp = pt->esp; \
-xc.ss = pt->xss; \
-xc.es = pt->xes; \
-xc.ds = pt->xds; \
-xc.fs = pt->xfs; \
-xc.gs = pt->xgs; \
+    xc.ebx = pt->ebx; \
+    xc.ecx = pt->ecx; \
+    xc.edx = pt->edx; \
+    xc.esi = pt->esi; \
+    xc.edi = pt->edi; \
+    xc.ebp = pt->ebp; \
+    xc.eax = pt->eax; \
+    xc.eip = pt->eip; \
+    xc.cs = pt->xcs; \
+    xc.eflags = pt->eflags; \
+    xc.esp = pt->esp; \
+    xc.ss = pt->xss; \
+    xc.es = pt->xes; \
+    xc.ds = pt->xds; \
+    xc.fs = pt->xfs; \
+    xc.gs = pt->xgs; \
 }
 
 
index e262d690c8070bf259236376f013eca64a276575..e604985ee813e15f1214706d4651bd106ee66d9a 100644 (file)
@@ -1,10 +1,10 @@
 
 verbose     ?= n
 debug       ?= n
-debugger    ?= n
 perfc       ?= n
 trace       ?= n
 optimize    ?= y
+domu_debug  ?= n
 crash_debug ?= n
 
 # Currently supported architectures: x86_32, x86_64
@@ -55,8 +55,8 @@ else
 CFLAGS += -DVERBOSE
 endif
 
-ifeq ($(debugger),y)
-CFLAGS += -DXEN_UDB
+ifeq ($(domu_debug),y)
+CFLAGS += -DDOMU_DEBUG
 endif
 
 ifeq ($(crash_debug),y)
index df728da1a7dc7248683bae60262ca6c0c3edc2de..49d3a89086bae2c44ffcfdfcb2be6dbcb45d5a36 100644 (file)
@@ -223,7 +223,7 @@ asmlinkage int do_int3(struct xen_regs *regs)
         show_registers(regs);
         panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id());
     } 
-#ifdef XEN_UDB
+#ifdef DOMU_DEBUG
     else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) 
     {
         if ( !test_and_set_bit(EDF_CTRLPAUSE, &ed->ed_flags) ) {
@@ -234,7 +234,7 @@ asmlinkage int do_int3(struct xen_regs *regs)
         
         return 0;
     }
-#endif /* XEN_UDB */
+#endif /* DOMU_DEBUG */
     ti = current->arch.traps + 3;
     tb->flags = TBF_EXCEPTION;
     tb->cs    = ti->cs;
@@ -924,7 +924,7 @@ asmlinkage int do_debug(struct xen_regs *regs)
          */
         goto out;
     } 
-#ifdef XEN_UDB
+#ifdef DOMU_DEBUG
     else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) 
     {
         regs->eflags &= ~EF_TF;
@@ -936,7 +936,7 @@ asmlinkage int do_debug(struct xen_regs *regs)
 
         goto out;
     }    
-#endif /* XEN_UDB */
+#endif /* DOMU_DEBUG */
     /* Save debug status register where guest OS can peek at it */
     ed->arch.debugreg[6] = condition;
 
index 1b1edfe7f614c89c676982764bf3eb77a39b284b..d906251b020ff5adbf6715bf2587121e82d94706 100644 (file)
@@ -267,7 +267,7 @@ int set_info_guest(struct domain *p, dom0_setdomaininfo_t *setdomaininfo)
     unsigned long vcpu = setdomaininfo->exec_domain;
     struct exec_domain *ed; 
 
-    if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) != NULL) )
+    if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) == NULL) )
         return -EINVAL;
     
     if (test_bit(DF_CONSTRUCTED, &p->d_flags) &&