WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [RFC][PATCH 3/3] xen&domain gdb debugger
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Mon, 21 Jan 2008 21:21:10 +0900
Delivery-date: Mon, 21 Jan 2008 04:21:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [RFC][PATCH 3/3] xen&domain gdb debugger, Kouya Shimura <=