diff options
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 8aeab04..f610e67 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -151,30 +151,6 @@ static VEC (sym_fns_ptr) *symtab_fns = NULL; int auto_solib_add = 1; -/* Make a null terminated copy of the string at PTR with SIZE characters in - the obstack pointed to by OBSTACKP . Returns the address of the copy. - Note that the string at PTR does not have to be null terminated, I.e. it - may be part of a larger string and we are only saving a substring. */ - -char * -obsavestring (const char *ptr, int size, struct obstack *obstackp) -{ - char *p = (char *) obstack_alloc (obstackp, size + 1); - /* Open-coded memcpy--saves function call time. These strings are usually - short. FIXME: Is this really still true with a compiler that can - inline memcpy? */ - { - const char *p1 = ptr; - char *p2 = p; - const char *end = ptr + size; - - while (p1 != end) - *p2++ = *p1++; - } - p[size] = 0; - return p; -} - /* Concatenate NULL terminated variable argument list of `const char *' strings; return the new string. Space is found in the OBSTACKP. Argument list must be terminated by a sentinel expression `(char *) |