diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-06-15 17:08:49 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-06-15 17:08:49 +0200 |
commit | 909c2cdaa78f5c33ce61a3b47e86f831025d0a02 (patch) | |
tree | 5172e07fec31ef80fcfc87f7261bee1c0942f644 /gdb/monitor.c | |
parent | 03aef70fecec83e109c65337a59600ad36def6bf (diff) | |
download | gdb-909c2cdaa78f5c33ce61a3b47e86f831025d0a02.zip gdb-909c2cdaa78f5c33ce61a3b47e86f831025d0a02.tar.gz gdb-909c2cdaa78f5c33ce61a3b47e86f831025d0a02.tar.bz2 |
Merge multiple hex conversions
gdb/ChangeLog
2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Merge multiple hex conversions.
* monitor.c: Include rsp-low.h.
(fromhex): Remove definition.
gdb/gdbserver/ChangeLog
2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Merge multiple hex conversions.
* gdbreplay.c (tohex): Rename to 'fromhex'.
(logchar): Use fromhex.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index 548dae3..c7f5fc7 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -54,6 +54,7 @@ #include "regcache.h" #include "gdbthread.h" #include "readline/readline.h" +#include "rsp-low.h" static char *dev_name; static struct target_ops *targ_ops; @@ -225,21 +226,6 @@ monitor_error (char *function, char *message, message, safe_string); } -/* Convert hex digit A to a number. */ - -static int -fromhex (int a) -{ - if (a >= '0' && a <= '9') - return a - '0'; - else if (a >= 'a' && a <= 'f') - return a - 'a' + 10; - else if (a >= 'A' && a <= 'F') - return a - 'A' + 10; - else - error (_("Invalid hex digit %d"), a); -} - /* monitor_vsprintf - similar to vsprintf but handles 64-bit addresses This function exists to get around the problem that many host platforms |