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] Re: [PATCH]: gdbsx: update README and remove space in q pack

To: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH]: gdbsx: update README and remove space in q packet
From: Bruce Edge <bruce.edge@xxxxxxxxx>
Date: Thu, 15 Jul 2010 10:34:50 -0700
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 15 Jul 2010 10:37:13 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=fT5ZeSNnFgj+W7CwHUO5HU08rPhpkxHRN2dKty+k6Y0=; b=rzSMxzAGNvsZ8Z2X1xXYFhaPBhYYqru652U4KVPLVBx9txEynUHlSD1gmvcQW+pauK Jy/ouAtzuPG3rMx3cwo+H0PgeufKc8EzcnCUie9ZdR2EtsYmYlOGO6hnTdV7FIjd5s0m x+sc8SNfszASGCSVVyI3H30Wem+U3Od6Z5fGQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ly8GmpvgK+9mOAqV4T8EmclY9U1eYXulZmtqUMiORD8hiQvT/RlCI3gPYAeCpV5TGd 136hpRla6SyvDsmAj/ZwGfbPnqMXmaIcZ6wkjqnbn2dckF9AoMtgBmceFR8YLLs6HZlb 3ttmL/Z2v1GOIr5sYWLW0UtxXgyd94LpBvfCU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100714193626.57259db1@xxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100714193626.57259db1@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, Jul 14, 2010 at 7:36 PM, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
Newer version of gdb, version 7*, seems to have bug where it is not
parsing thread list from gdbsx properly. Getting rid of the space in
thread list works around it. It's ok with older gdb also.

Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>

diff -r d867eb643fe4 tools/debugger/gdbsx/README
--- a/tools/debugger/gdbsx/README       Tue Jul 13 18:17:28 2010 +0100
+++ b/tools/debugger/gdbsx/README       Wed Jul 14 19:05:37 2010 -0700
@@ -26,7 +26,7 @@
      bash> gdb ./vmlinux             (exact matching vmlinux of guest kernel)
      (gdb) target remote dom0:9999

-   - Additionally, to debug loadable kernel modules, please do following:

Does this 32 bit clarification imply there's no mechanism to debug modules on a 64 bit domU ?
Or or there another mechanism to obtain the same info for 64 bit clients?

Thanks

-Bruce
 
+   - Additionally, to debug 32bit loadable kernel modules, please do following:
      (gdb) p init_mm.pgd[3]
      $1 = {pgd = 0x1b874f027}
      (gdb) monitor pgd3 0x1b874f027  (Make sure value is in HEX)
diff -r d867eb643fe4 tools/debugger/gdbsx/gx/gx_main.c
--- a/tools/debugger/gdbsx/gx/gx_main.c Tue Jul 13 18:17:28 2010 +0100
+++ b/tools/debugger/gdbsx/gx/gx_main.c Wed Jul 14 19:05:37 2010 -0700
@@ -132,12 +132,12 @@
 static void
 process_q_request(char *remote_buf)
 {
-    /* send a list of tids: "m 0,1,2,3l" */
+    /* send a list of tids: "m0,1,2,3l" */
    if (strcmp("qfThreadInfo", remote_buf) == 0) {
        vcpuid_t vid = 0;
        char *p = remote_buf;

-        sprintf(p, "m %x", vid);        /* puts null char at the end */
+        sprintf(p, "m%x", vid);        /* puts null char at the end */
        p = p + strlen(p);
        for (vid=1; vid <= max_vcpuid; vid++) {
            sprintf(p, ",%x", vid);
@@ -146,8 +146,9 @@
        sprintf(p, "l");                /* puts null char at the end */
        return;
    }
+
    /* qSymbol works for init_mm, and not init_mm.pgd, hence we can't use
-         * it at this time. instead use "monitor" in gdb */
+     * it at this time. instead use "monitor" in gdb */
    if (strncmp("qRcmd,", remote_buf, 6) == 0) {
        _do_qRcmd_req(remote_buf);
        return;
@@ -155,8 +156,7 @@

    /* TBD : qThreadExtraInfo : send extra banner info  */

-        /* nothing else supported right now */
-    remote_buf[0] = '\0';
+    remote_buf[0] = '\0';              /* nothing else supported for now */

    return;
 }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>