aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-01 09:16:04 -0600
committerTom Tromey <tom@tromey.com>2019-06-02 12:23:02 -0600
commit88ed7edbc632245fad33145e723d27976b6732ca (patch)
tree18edd0e72aa68782d366436dcc2d1f52efb664c9 /gdb/gdbserver
parent96605592395fc57e531de249883ccf6fafed540f (diff)
downloadgdb-88ed7edbc632245fad33145e723d27976b6732ca.zip
gdb-88ed7edbc632245fad33145e723d27976b6732ca.tar.gz
gdb-88ed7edbc632245fad33145e723d27976b6732ca.tar.bz2
Remove fromhex implementation from gdbreplay
gdbreplay had its own implementation of fromhex. This patch changes it to use the one in common/. gdb/gdbserver/ChangeLog 2019-06-02 Tom Tromey <tom@tromey.com> * gdbreplay.c (fromhex): Remove. * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/Makefile.in1
-rw-r--r--gdb/gdbserver/gdbreplay.c21
3 files changed, 7 insertions, 20 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index e15395d..a769b15 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-02 Tom Tromey <tom@tromey.com>
+
+ * gdbreplay.c (fromhex): Remove.
+ * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
+
2019-05-29 Tom Tromey <tromey@adacore.com>
* configure: Rebuild.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index f5fc550..7186550 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -291,6 +291,7 @@ GDBREPLAY_OBS = \
common/cleanups.o \
common/common-exceptions.o \
common/common-utils.o \
+ common/rsp-low.o \
common/errors.o \
common/netstuff.o \
common/print-utils.o \
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 2800e78..f4fd568 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -49,6 +49,7 @@
#endif
#include "common/netstuff.h"
+#include "common/rsp-low.h"
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
@@ -289,26 +290,6 @@ remote_open (char *name)
}
static int
-fromhex (int ch)
-{
- if (ch >= '0' && ch <= '9')
- {
- return (ch - '0');
- }
- if (ch >= 'A' && ch <= 'F')
- {
- return (ch - 'A' + 10);
- }
- if (ch >= 'a' && ch <= 'f')
- {
- return (ch - 'a' + 10);
- }
- fprintf (stderr, "\nInvalid hex digit '%c'\n", ch);
- fflush (stderr);
- exit (1);
-}
-
-static int
logchar (FILE *fp)
{
int ch;