This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: Recognize 'x' in response to 'p' packet
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 02 Dec 2004 19:22:44 -0500
- Subject: 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;
}