From: Tom Tromey Date: Sat, 1 Jun 2019 15:16:04 +0000 (-0600) Subject: Remove fromhex implementation from gdbreplay X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88ed7edbc632245fad33145e723d27976b6732ca;p=binutils-gdb.git 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 * gdbreplay.c (fromhex): Remove. * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index e15395d6954..a769b15baf5 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2019-06-02 Tom Tromey + + * gdbreplay.c (fromhex): Remove. + * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o. + 2019-05-29 Tom Tromey * configure: Rebuild. diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index f5fc55034ee..71865508d7a 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 2800e7834df..f4fd5686ef7 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; @@ -288,26 +289,6 @@ remote_open (char *name) fflush (stderr); } -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) {