gdbsupport: make use of safe-ctype functions from libiberty
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 20 Nov 2020 17:23:03 +0000 (17:23 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 11 Dec 2020 22:04:28 +0000 (22:04 +0000)
commit966484941738b7a474fb7e4fe29eb5693fc9096c
tree122e6dd4b2f7f7fe516f85ffc5db8aa54948494f
parent94ba44a68dccb5fa2a0a40a52efebdd1faeae43d
gdbsupport: make use of safe-ctype functions from libiberty

Make use of the safe-ctype replacements for the standard ctype
character checking functions in gdbsupport/common-utils.cc.  The
gdbsupport library is included into both gdb and gdbserver, and on the
gdbserver side there are two targets, gdbserver itself, and also
libinproctrace.so.

libiberty was already being included in the gdbserver link command,
but was missing from the libinproctrace.so link.  As a result, after
changing gdbsupport/common-utils.cc to depend on libiberty,
libinproctrace.so would no longer link until I modified its link line.

gdbserver/ChangeLog:

* Makefile.in (IPA_LIB): Include libiberty library.

gdbsupport/ChangeLog:

* gdbsupport/common-utils.cc: Change 'ctype.h' include to
'safe-ctype.h'.
(extract_string_maybe_quoted): Use safe-ctype function versions.
(is_digit_in_base): Likewise.
(digit_to_int): Likewise.
(strtoulst): Likewise.
(skip_spaces): Likewise.
(skip_to_space): Likewise.
gdbserver/ChangeLog
gdbserver/Makefile.in
gdbsupport/ChangeLog
gdbsupport/common-utils.cc