From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18707 invoked by alias); 7 Oct 2004 22:33:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18699 invoked from network); 7 Oct 2004 22:33:20 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 7 Oct 2004 22:33:20 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i97MXKl6027470 for ; Thu, 7 Oct 2004 18:33:20 -0400 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i97MXJr25749; Thu, 7 Oct 2004 18:33:19 -0400 To: gdb-patches@sources.redhat.com Subject: RFA: fix formatting of 'p' packet register number From: Jim Blandy Date: Thu, 07 Oct 2004 22:33:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-10/txt/msg00136.txt.bz2 2004-10-07 Jim Blandy * remote.c (fetch_register_using_p): Construct 'p' packet in a manner independent of the host byte order. Index: gdb/remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.149 diff -c -p -r1.149 remote.c *** gdb/remote.c 5 Oct 2004 19:52:04 -0000 1.149 --- gdb/remote.c 7 Oct 2004 22:31:11 -0000 *************** fetch_register_using_p (int regnum) *** 3176,3184 **** char regp[MAX_REGISTER_SIZE]; int i; ! buf[0] = 'p'; ! bin2hex((char *) ®num, &buf[1], sizeof(regnum)); ! buf[9] = 0; remote_send (buf, rs->remote_packet_size); if (buf[0] != 0 && buf[0] != 'E') { p = buf; --- 3176,3185 ---- char regp[MAX_REGISTER_SIZE]; int i; ! p = buf; ! *p++ = 'p'; ! p += hexnumstr (p, regnum); ! *p++ = '\0'; remote_send (buf, rs->remote_packet_size); if (buf[0] != 0 && buf[0] != 'E') { p = buf;