This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: 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: 16 Dec 2004 16:12:00 -0500
- Subject: Re: RFA: Recognize 'x' in response to 'p' packet
- References: <vt2mzww8c2z.fsf@zenia.home>
Ping.
Jim Blandy <jimb@redhat.com> writes:
> 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;
> }