aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/regcache.c
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/gdbserver/regcache.c
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/gdbserver/regcache.c')
-rw-r--r--gdb/gdbserver/regcache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
index f51e498..6e5aa08 100644
--- a/gdb/gdbserver/regcache.c
+++ b/gdb/gdbserver/regcache.c
@@ -207,8 +207,7 @@ registers_to_string (struct regcache *regcache, char *buf)
{
if (regcache->register_status[i] == REG_VALID)
{
- convert_int_to_ascii (registers, buf,
- register_size (tdesc, i));
+ bin2hex (registers, buf, register_size (tdesc, i));
buf += register_size (tdesc, i) * 2;
}
else
@@ -419,8 +418,8 @@ collect_register (struct regcache *regcache, int n, void *buf)
void
collect_register_as_string (struct regcache *regcache, int n, char *buf)
{
- convert_int_to_ascii (register_data (regcache, n, 1), buf,
- register_size (regcache->tdesc, n));
+ bin2hex (register_data (regcache, n, 1), buf,
+ register_size (regcache->tdesc, n));
}
void