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

Jim Blandy jimb@redhat.com
Thu Dec 16 21:35:00 GMT 2004


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



More information about the Gdb-patches mailing list