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

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



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


 


Rackspace

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