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-devel

[Xen-devel] Gdbserver and --attach (stepping disabled since 8ed131452f27

To: xen-devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Gdbserver and --attach (stepping disabled since 8ed131452f27)
From: Simon Kagstrom <simon.kagstrom@xxxxxx>
Date: Thu, 11 May 2006 12:16:41 +0200
Delivery-date: Thu, 11 May 2006 03:16:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Wanderlust/2.15.2 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
Hi,

Changeset 8ed131452f27 (March 6th, patch submitted by Horms) disabled
single-stepping for attached debugging:

     case PTRACE_SETREGS:
+        if (!current_isfile)
+                goto out_unspported; /* XXX not yet supported */
         SET_XC_REGS(((struct gdb_regs *)data), ctxt[cpu].user_regs);
         if ((retval = xc_vcpu_setcontext(xc_handle, current_domid, cpu, 
                                 &ctxt[cpu])))
@@ -407,6 +390,8 @@
         break;
 
     case PTRACE_SINGLESTEP:
+        if (!current_isfile)
+              goto out_unspported; /* XXX not yet supported */
         /*  XXX we can still have problems if the user switches threads
          *  during single-stepping - but that just seems retarded
          */

Is there any special reason while this was done? The description does
not comment this. Reverting this part of the patch allows me to
single-step the attached domain again (but see below).


There appears to be some kind of heap corruption as the gdb server
dies with

*** glibc detected *** malloc(): memory corruption: 0x08094fc8 ***

Program received signal SIGABRT, Aborted.
0xbfffe402 in __kernel_vsyscall ()
(gdb) bt
#0  0xbfffe402 in __kernel_vsyscall ()
#1  0xb7dc1991 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7dc333b in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7df8af7 in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7e000d0 in free () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7e013f6 in malloc () from /lib/tls/i686/cmov/libc.so.6
#6  0x08049f23 in putpkt (buf=0x8054048 
"T0505:344a2ec0;04:2c4a2ec0;08:a90900c0;thread:0;") at 
../../../gdb-6.2.1/gdb/gdbserver/remote-utils.c:273
#7  0x0804bf8a in main (argc=4, argv=0xbfe0b904) at 
../../../gdb-6.2.1/gdb/gdbserver/server.c:630

// Simon

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>