replace convert_ascii_to_int with hex2bin
convert_ascii_to_int is identical to hex2bin. This removes the former. 2014-02-12 Tom Tromey <tromey@redhat.com> * common/rsp-low.c (convert_ascii_to_int): Remove. * common/rsp-low.h (convert_ascii_to_int): Don't declare. 2014-02-12 Tom Tromey <tromey@redhat.com> * ax.c (gdb_parse_agent_expr): Use hex2bin, not convert_ascii_to_int. * regcache.c (registers_to_string): Likewise. * remote-utils.c (decode_M_packet): Likewise. * server.c (process_serial_event): Likewise.
This commit is contained in:
parent
ff0e980e6f
commit
a7191e8bd7
8 changed files with 18 additions and 19 deletions
|
@ -127,18 +127,6 @@ hex2bin (const char *hex, gdb_byte *bin, int count)
|
|||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
convert_ascii_to_int (const char *from, unsigned char *to, int n)
|
||||
{
|
||||
int nib1, nib2;
|
||||
while (n--)
|
||||
{
|
||||
nib1 = fromhex (*from++);
|
||||
nib2 = fromhex (*from++);
|
||||
*to++ = (((nib1 & 0x0f) << 4) & 0xf0) | (nib2 & 0x0f);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
bin2hex (const gdb_byte *bin, char *hex, int count)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue