[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [RFC][PATCH 3/3] xen&domain gdb debugger



enable xen to trap 'break 0x0' for gdb.

# HG changeset patch
# User Kouya Shimura <kouya@xxxxxxxxxxxxxx>
# Date 1200914875 -32400
# Node ID b215199adf8b373982b70d60d2e08ef1ca37dddd
# Parent  ff90abf572f2d5aa7d4a7f764b3c343b66a06210
enable xen to trap 'break 0x0' for gdb.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r ff90abf572f2 -r b215199adf8b xen/arch/ia64/vmx/vmx_fault.c
--- a/xen/arch/ia64/vmx/vmx_fault.c     Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/arch/ia64/vmx/vmx_fault.c     Mon Jan 21 20:27:55 2008 +0900
@@ -142,6 +142,8 @@ void vmx_reflect_interruption(u64 ifa, u
     case 36: // IA64_SINGLE_STEP_TRAP_VECTOR
         if (vmx_guest_kernel_mode(regs)
             && current->domain->debugger_attached) {
+            if (vector == IA64_DEBUG_VECTOR)
+                vcpu_set_ifa(vcpu, ifa);
             domain_pause_for_debugger();
             return;
         }
@@ -189,6 +191,11 @@ vmx_ia64_handle_break (unsigned long ifa
             gdprintk(XENLOG_DEBUG, "%s:%d imm %lx\n", __func__, __LINE__, iim);
             ia64_fault(11 /* break fault */, isr, ifa, iim,
                        0 /* cr.itir */, 0, 0, 0, (unsigned long)regs);
+        }
+
+        if ((iim == 0) && d->debugger_attached) {
+            domain_pause_for_debugger();
+            return IA64_NO_FAULT;
         }
 
         if (ia64_psr(regs)->cpl == 0) {
diff -r ff90abf572f2 -r b215199adf8b xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/arch/ia64/xen/faults.c        Mon Jan 21 20:27:55 2008 +0900
@@ -532,8 +532,13 @@ ia64_handle_break(unsigned long ifa, str
                if (ia64_hyperprivop(iim, regs))
                        vcpu_increment_iip(current);
        } else {
-               if (iim == 0)
+               if (iim == 0) {
+                       if (d->debugger_attached) {
+                               domain_pause_for_debugger();
+                               return;
+                       }
                        die_if_kernel("bug check", regs, iim);
+               }
                PSCB(v, iim) = iim;
                reflect_interruption(isr, regs, IA64_BREAK_VECTOR);
        }
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.