From: Tom Tromey Date: Sat, 1 Jun 2019 15:16:04 +0000 (-0600) Subject: Remove fromhex implementation from gdbreplay X-Git-Tag: binutils-2_33~1020 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88ed7edbc632245fad33145e723d27976b6732ca;p=external%2Fbinutils.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 e15395d..a769b15 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 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;