mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user