diff options
author | Tom Tromey <tromey@adacore.com> | 2019-08-29 10:45:06 -0400 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-10-25 08:22:44 -0600 |
commit | 52c64cf72d40aace2d2fedca32e5c0373cd9a484 (patch) | |
tree | 586cc5a6e547af9d8a381681d8a76e53035603e8 /gdb/gdbserver | |
parent | PR25125, relaxation chooses wrong branch size (diff) | |
download | binutils-gdb-52c64cf72d40aace2d2fedca32e5c0373cd9a484.tar.gz binutils-gdb-52c64cf72d40aace2d2fedca32e5c0373cd9a484.tar.bz2 binutils-gdb-52c64cf72d40aace2d2fedca32e5c0373cd9a484.zip |
gdbserver does not need xstrdup
gdbserver has its own implementation of xstrdup. However, because
gdbserver links against libiberty now, I think this is not needed.
This patch removes it.
gdb/gdbserver/ChangeLog
2019-10-25 Tom Tromey <tromey@adacore.com>
* utils.c (xstrdup): Remove.
Change-Id: I2aa56d18d0f9af8e70a00dff431d2fda5705a5d5
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbserver/utils.c | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index dcd62380b12..55394797dd3 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2019-10-25 Tom Tromey <tromey@adacore.com> + + * utils.c (xstrdup): Remove. + 2019-10-23 Tom Tromey <tom@tromey.com> * configure, config.in: Rebuild. diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index 79a7e80f625..6a0e7a7a0f9 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -37,18 +37,6 @@ malloc_failure (long size) exit (1); } -/* Copy a string into a memory buffer. - If malloc fails, this will print a message to stderr and exit. */ - -char * -xstrdup (const char *s) -{ - char *ret = strdup (s); - if (ret == NULL) - malloc_failure (strlen (s) + 1); - return ret; -} - /* Print the system error message for errno, and also mention STRING as the file name for which the error was encountered. Then return to command level. */ |