Move savestring to common/common-utils.c, make gdbserver use it.
[deliverable/binutils-gdb.git] / gdb / common / common-utils.h
index 2abc6d1ff427b30aaef1d190bff6b114228afd90..9b659d8dacedfcea05b0ed15d780e69ddbd01995 100644 (file)
@@ -47,4 +47,10 @@ char *xstrvprintf (const char *format, va_list ap)
 int xsnprintf (char *str, size_t size, const char *format, ...)
      ATTRIBUTE_PRINTF (3, 4);
 
+/* Make a copy of the string at PTR with LEN characters
+   (and add a null character at the end in the copy).
+   Uses malloc to get the space.  Returns the address of the copy.  */
+
+char *savestring (const char *ptr, size_t len);
+
 #endif
This page took 0.034997 seconds and 4 git commands to generate.