I happened across a spot that was still using obstack_alloc and
strcpy, rather than obstack_strdup. This patch makes the obvious fix.
gdb/ChangeLog
2020-02-19 Tom Tromey <tromey@adacore.com>
* ada-lang.c (cache_symbol): Use obstack_strdup.
+2020-02-19 Tom Tromey <tromey@adacore.com>
+
+ * ada-lang.c (cache_symbol): Use obstack_strdup.
+
2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
* configure: Regenerate.
struct ada_symbol_cache *sym_cache
= ada_get_symbol_cache (current_program_space);
int h;
- char *copy;
struct cache_entry *e;
/* Symbols for builtin types don't have a block.
e = XOBNEW (&sym_cache->cache_space, cache_entry);
e->next = sym_cache->root[h];
sym_cache->root[h] = e;
- e->name = copy
- = (char *) obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
- strcpy (copy, name);
+ e->name = obstack_strdup (&sym_cache->cache_space, name);
e->sym = sym;
e->domain = domain;
e->block = block;