This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: possible inclusion of Jim's recent "p" packet fix in 6.3 branch?


Paul Schlie wrote:
Might it be possible to have Jim's "p packet formatting fix" patch:

http://sources.redhat.com/ml/gdb-patches/2004-10/msg00458.html

Also applied to the 6.3 branch in the near term, as it's fairly
critical for cross host platform interfacing?

(as well as any others recently approved that are viewed as
 likely critical for inclusion as well, would be helpful?)

Done.


Andrew
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.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.151
diff -p -u -r1.151 remote.c
--- remote.c	8 Oct 2004 20:29:54 -0000	1.151
+++ remote.c	5 Nov 2004 22:12:39 -0000
@@ -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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]