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]

RFA: Recognize 'x' in response to 'p' packet


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;
      }


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