Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Recognize 'x' in response to 'p' packet
@ 2004-12-03  0:22 Jim Blandy
  2004-12-16 21:35 ` Jim Blandy
  0 siblings, 1 reply; 17+ messages in thread
From: Jim Blandy @ 2004-12-03  0:22 UTC (permalink / raw)
  To: gdb-patches


2004-12-02  Jim Blandy  <jimb@redhat.com>

	* remote.c (fetch_register_using_p): Recognize 'x's for the value
	of the register as indicating that the register's value is not
	available.

Index: gdb/remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.152
diff -c -p -r1.152 remote.c
*** gdb/remote.c	27 Oct 2004 20:03:50 -0000	1.152
--- gdb/remote.c	3 Dec 2004 00:21:15 -0000
*************** fetch_register_using_p (int regnum)
*** 3189,3194 ****
--- 3189,3198 ----
  		error("fetch_register_using_p: early buf termination");
  		return 0;
  	}
+       if (p[0] == 'x' && p[1] == 'x')
+         /* Invalid register value.  */
+ 	regp[i++] = 0;		/* 'x' */
+       else
  	regp[i++] = fromhex (p[0]) * 16 + fromhex (p[1]);
          p += 2;
      }


^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: RFA: Recognize 'x' in response to 'p' packet
@ 2004-12-03  1:29 Paul Schlie
  2004-12-03  4:32 ` Steven Johnson
  2004-12-03 21:45 ` Michael Snyder
  0 siblings, 2 replies; 17+ messages in thread
From: Paul Schlie @ 2004-12-03  1:29 UTC (permalink / raw)
  To: gdb-patches

> Jim Blandy
> * remote.c (fetch_register_using_p): Recognize 'x's for the value
>   of the register as indicating that the register's value is not
>   available.

Out of curiosity, under what practical circumstances would the value of a
register not be accessible? (and if not, shouldn't an error be returned, as
opposed to an 'x' which is converted to a 0 anyway? Which I've noticed "g"
packets also assume?)




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-12-28  9:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-03  0:22 RFA: Recognize 'x' in response to 'p' packet Jim Blandy
2004-12-16 21:35 ` Jim Blandy
2004-12-17 22:20   ` Daniel Jacobowitz
2004-12-17 22:45     ` Jim Blandy
2004-12-18  1:24       ` Daniel Jacobowitz
2004-12-21 21:30         ` Jim Blandy
2004-12-23 16:43           ` Jim Blandy
2004-12-23 17:22             ` Daniel Jacobowitz
2004-12-28 13:15               ` Jim Blandy
2004-12-03  1:29 Paul Schlie
2004-12-03  4:32 ` Steven Johnson
2004-12-03  4:54   ` Paul Schlie
2004-12-03 13:57     ` Daniel Jacobowitz
2004-12-03 21:48       ` Michael Snyder
2004-12-03 21:45 ` Michael Snyder
2004-12-03 22:53   ` Paul Schlie
2004-12-03 23:44     ` Paul Schlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox