From ff0e980e6f720fe49608a5a0a37be3a28258c9d7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 18 Jan 2014 19:41:08 -0700 Subject: replace unhexify with hex2bin unhexify and hex2bin are identical, so this removes unhexify. The particular choice of which to keep was made on the basis of parallelism with the earlier patch that removed hexify. 2014-02-12 Tom Tromey * common/rsp-low.h (unhexify): Don't declare. * common/rsp-low.c (unhexify): Remove. 2014-02-12 Tom Tromey * server.c (handle_query, handle_v_run): Use hex2bin, not unhexify. * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise. --- gdb/gdbserver/server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/gdbserver/server.c') diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index e582598..1ea1bde 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2025,7 +2025,8 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) return; } - if ((len % 2) != 0 || unhexify (mon, own_buf + 6, len / 2) != len / 2) + if ((len % 2) != 0 + || hex2bin (own_buf + 6, (gdb_byte *) mon, len / 2) != len / 2) { write_enn (own_buf); free (mon); @@ -2408,7 +2409,7 @@ handle_v_run (char *own_buf) { /* FIXME: Fail request if out of memory instead of dying. */ new_argv[i] = xmalloc (1 + (next_p - p) / 2); - unhexify (new_argv[i], p, (next_p - p) / 2); + hex2bin (p, (gdb_byte *) new_argv[i], (next_p - p) / 2); new_argv[i][(next_p - p) / 2] = '\0'; } -- cgit v1.1