gdbserver does not need xstrdup
authorTom Tromey <tromey@adacore.com>
Thu, 29 Aug 2019 14:45:06 +0000 (10:45 -0400)
committerTom Tromey <tromey@adacore.com>
Fri, 25 Oct 2019 14:22:44 +0000 (08:22 -0600)
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

gdb/gdbserver/ChangeLog
gdb/gdbserver/utils.c

index dcd62380b12a9449fdeba8369922ebe25f900f73..55394797dd3f0ec0de74fd2ec0717b4858a3a84b 100644 (file)
@@ -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.
index 79a7e80f6251fbc10c1b51f2493ccb1d8c127c44..6a0e7a7a0f9bc3c6c503341edddd6422a9dfe6e6 100644 (file)
@@ -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.  */
This page took 0.032208 seconds and 4 git commands to generate.