summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-21 18:13:10 +0000
committerTom Tromey <tromey@redhat.com>2013-01-21 18:13:10 +0000
commite33ba1936882d0d5ccae19c8358fa03bb3c62c03 (patch)
tree7a6fb27d36be8e0ef815e4f38e2e0eb519e06a53 /gdb/symfile.c
parent8c35b787fc999a2d05e584eb41afe3c02292f0e3 (diff)
downloadgdb-e33ba1936882d0d5ccae19c8358fa03bb3c62c03.tar.gz
* 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.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8aeab0479cc..f610e673b9d 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 *)