aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-18 19:34:15 -0700
committerTom Tromey <tromey@redhat.com>2014-02-12 09:59:18 -0700
commite9371aff2d8c31adf23483aebe85018e11f534f3 (patch)
tree239a27ae3dcc7f1a7fe4c20e35d947359e0566aa /gdb/common
parent971dc0b89de28feaa5efade1f1f8675be223fabd (diff)
downloadgdb-e9371aff2d8c31adf23483aebe85018e11f534f3.zip
gdb-e9371aff2d8c31adf23483aebe85018e11f534f3.tar.gz
gdb-e9371aff2d8c31adf23483aebe85018e11f534f3.tar.bz2
replace convert_int_to_ascii with bin2hex
convert_int_to_ascii is identical to bin2hex. This removes the former. In this case I made the choice of which to keep on the basis that I consider the name bin2hex to be superior to convert_int_to_ascii. 2014-02-12 Tom Tromey <tromey@redhat.com> * common/rsp-low.h (convert_int_to_ascii): Don't declare. * common/rsp-low.c (convert_int_to_ascii): Remove. 2014-02-12 Tom Tromey <tromey@redhat.com> * ax.c (gdb_unparse_agent_expr): Use bin2hex, not convert_int_to_ascii. * regcache.c (registers_to_string, collect_register_as_string): Likewise. * remote-utils.c (look_up_one_symbol, relocate_instruction): Likewise. * server.c (process_serial_event): Likewise. * tracepoint.c (cmd_qtstatus, response_source, response_tsv) (cmd_qtbuffer, cstr_to_hexstr): Likewise.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/rsp-low.c16
-rw-r--r--gdb/common/rsp-low.h2
2 files changed, 0 insertions, 18 deletions
diff --git a/gdb/common/rsp-low.c b/gdb/common/rsp-low.c
index a7b0014..c7a00c1 100644
--- a/gdb/common/rsp-low.c
+++ b/gdb/common/rsp-low.c
@@ -172,22 +172,6 @@ bin2hex (const gdb_byte *bin, char *hex, int count)
return i;
}
-void
-convert_int_to_ascii (const unsigned char *from, char *to, int n)
-{
- int nib;
- int ch;
- while (n--)
- {
- ch = *from++;
- nib = ((ch & 0xf0) >> 4) & 0x0f;
- *to++ = tohex (nib);
- nib = ch & 0x0f;
- *to++ = tohex (nib);
- }
- *to++ = 0;
-}
-
int
remote_escape_output (const gdb_byte *buffer, int len,
gdb_byte *out_buf, int *out_len,
diff --git a/gdb/common/rsp-low.h b/gdb/common/rsp-low.h
index 2ef5e6d..e1944cf 100644
--- a/gdb/common/rsp-low.h
+++ b/gdb/common/rsp-low.h
@@ -42,8 +42,6 @@ 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);
-extern void convert_int_to_ascii (const unsigned char *from, char *to, int n);
-
/* Convert BUFFER, binary data at least LEN bytes long, into escaped
binary data in OUT_BUF. Set *OUT_LEN to the length of the data
encoded in OUT_BUF, and return the number of bytes in OUT_BUF