diff options
author | Tom Tromey <tromey@redhat.com> | 2014-01-18 19:42:15 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-12 09:59:20 -0700 |
commit | a7191e8bd7f4188d608764389d5a73fcf4b0e8da (patch) | |
tree | 63564515ee08df78bb81f9e72d2853099396f941 /gdb/common | |
parent | ff0e980e6f720fe49608a5a0a37be3a28258c9d7 (diff) | |
download | gdb-a7191e8bd7f4188d608764389d5a73fcf4b0e8da.zip gdb-a7191e8bd7f4188d608764389d5a73fcf4b0e8da.tar.gz gdb-a7191e8bd7f4188d608764389d5a73fcf4b0e8da.tar.bz2 |
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.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/rsp-low.c | 12 | ||||
-rw-r--r-- | gdb/common/rsp-low.h | 2 |
2 files changed, 0 insertions, 14 deletions
diff --git a/gdb/common/rsp-low.c b/gdb/common/rsp-low.c index decd23c..ecaa69a 100644 --- a/gdb/common/rsp-low.c +++ b/gdb/common/rsp-low.c @@ -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) { diff --git a/gdb/common/rsp-low.h b/gdb/common/rsp-low.h index b793f15..9edf4dc 100644 --- a/gdb/common/rsp-low.h +++ b/gdb/common/rsp-low.h @@ -36,8 +36,6 @@ extern char *unpack_varlen_hex (char *buff, ULONGEST *result); extern int hex2bin (const char *hex, gdb_byte *bin, int count); -extern void convert_ascii_to_int (const char *from, unsigned char *to, int n); - extern int bin2hex (const gdb_byte *bin, char *hex, int count); /* Convert BUFFER, binary data at least LEN bytes long, into escaped |