]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2004-11-05 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Fri, 5 Nov 2004 23:38:25 +0000 (23:38 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 5 Nov 2004 23:38:25 +0000 (23:38 +0000)
Backport 2004-10-27 Jim Blandy <jimb@redhat.com>
* remote.c (fetch_register_using_p): Construct 'p' packet in a
manner independent of the host byte order.

gdb/ChangeLog
gdb/remote.c

index e8cbfc8bebba4822b2111e6e5bc43d53a84262d6..3a008d581b0d143b829959db27d0b1027f9e2f16 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-05  Andrew Cagney  <cagney@gnu.org>
+
+       Backport 2004-10-27 Jim Blandy <jimb@redhat.com>
+       * remote.c (fetch_register_using_p): Construct 'p' packet in a
+       manner independent of the host byte order.
+
 2004-11-04  Kei Sakamoto  <sakamoto.kei@denesas.com>
 
        * Makefile.in (m32r-tdep.o): Update dependencies.
index c389c4a7f3b699fcfa11da5f7758e90c3bb51d97..5d1ac7f2eb02fc6e57a0d7ff95e2aa7c7e49e524 100644 (file)
@@ -3176,9 +3176,10 @@ fetch_register_using_p (int regnum)
   char regp[MAX_REGISTER_SIZE];
   int i;
 
-  buf[0] = 'p';
-  bin2hex((char *) &regnum, &buf[1], sizeof(regnum));
-  buf[9] = 0;
+  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;