aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-21 18:13:14 +0000
committerTom Tromey <tromey@redhat.com>2013-01-21 18:13:14 +0000
commit10f0c4bbfa440916bce5d7407fd2b7447db31ef6 (patch)
tree7c5ef827541308d1d7876de8ff93fdd280b694e1 /gdb/ada-exp.y
parent86f62fd71f25a7f64ff0f7747df29c3488269116 (diff)
downloadgdb-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/ada-exp.y')
-rw-r--r--gdb/ada-exp.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 38ac317..e4bcfb3 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -880,7 +880,7 @@ write_object_renaming (const struct block *orig_left_context,
if (orig_left_context == NULL)
orig_left_context = get_selected_block (NULL);
- name = obsavestring (renamed_entity, renamed_entity_len, &temp_parse_space);
+ name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len);
ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
if (sym_info.sym == NULL)
error (_("Could not find renamed variable: %s"), ada_decode (name));
@@ -949,8 +949,8 @@ write_object_renaming (const struct block *orig_left_context,
end = renaming_expr + strlen (renaming_expr);
index_name =
- obsavestring (renaming_expr, end - renaming_expr,
- &temp_parse_space);
+ obstack_copy0 (&temp_parse_space, renaming_expr,
+ end - renaming_expr);
renaming_expr = end;
ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
@@ -1166,7 +1166,7 @@ write_ambiguous_var (const struct block *block, char *name, int len)
obstack_alloc (&temp_parse_space, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
- SYMBOL_LINKAGE_NAME (sym) = obsavestring (name, len, &temp_parse_space);
+ SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len);
SYMBOL_LANGUAGE (sym) = language_ada;
write_exp_elt_opcode (OP_VAR_VALUE);
@@ -1263,7 +1263,7 @@ write_var_or_type (const struct block *block, struct stoken name0)
encoded_name = ada_encode (name0.ptr);
name_len = strlen (encoded_name);
- encoded_name = obsavestring (encoded_name, name_len, &temp_parse_space);
+ encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len);
for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1)
{
int tail_index;