* remote.c (fetch_register_using_p): Construct 'p' packet in a
authorJim Blandy <jimb@codesourcery.com>
Wed, 27 Oct 2004 20:03:50 +0000 (20:03 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 27 Oct 2004 20:03:50 +0000 (20:03 +0000)
manner independent of the host byte order.

gdb/ChangeLog
gdb/remote.c

index 84022c0a7e5131e73c6d91b9fb30f6dc98763e99..62497183a58aba5ebac891464756db8dea25c94b 100644 (file)
@@ -1,3 +1,8 @@
+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-10-27  Mark Kettenis  <kettenis@gnu.org>
 
        * mips-tdep.c (id_delayed): Remove prototype.
 2004-10-27  Mark Kettenis  <kettenis@gnu.org>
 
        * mips-tdep.c (id_delayed): Remove prototype.
index c389c4a7f3b699fcfa11da5f7758e90c3bb51d97..5d1ac7f2eb02fc6e57a0d7ff95e2aa7c7e49e524 100644 (file)
@@ -3176,9 +3176,10 @@ fetch_register_using_p (int regnum)
   char regp[MAX_REGISTER_SIZE];
   int i;
 
   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;
   remote_send (buf, rs->remote_packet_size);
   if (buf[0] != 0 && buf[0] != 'E') {
      p = buf;
This page took 0.058239 seconds and 4 git commands to generate.