diff options
author | Tom Tromey <tromey@redhat.com> | 2013-01-21 18:13:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-01-21 18:13:14 +0000 |
commit | 10f0c4bbfa440916bce5d7407fd2b7447db31ef6 (patch) | |
tree | 7c5ef827541308d1d7876de8ff93fdd280b694e1 /gdb/symfile.c | |
parent | 86f62fd71f25a7f64ff0f7747df29c3488269116 (diff) | |
download | gdb-10f0c4bbfa440916bce5d7407fd2b7447db31ef6.zip gdb-10f0c4bbfa440916bce5d7407fd2b7447db31ef6.tar.gz gdb-10f0c4bbfa440916bce5d7407fd2b7447db31ef6.tar.bz2 |
* symfile.h (obsavestring): Don't declare.
* symfile.c (obsavestring): Remove.
* ada-exp.y: Use obstack_copy0, not obsavestring.
* ada-lang.c: Use obstack_copy0, not obsavestring.
* coffread.c: Use obstack_copy0, not obsavestring.
* cp-namespace.c: Use obstack_copy0, not obsavestring.
* dbxread.c: Use obstack_copy0, not obsavestring.
* dwarf2read.c: Use obstack_copy0, not obsavestring.
* jit.c: Use obstack_copy0, not obsavestring.
* mdebugread.c: Use obstack_copy0, not obsavestring.
* psymtab.c: Use obstack_copy0, not obsavestring.
* stabsread.c: Use obstack_copy0, not obsavestring.
* xcoffread.c: Use obstack_copy0, not obsavestring.
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 *) |