X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fada-lang.c;h=f2514b1239589d9913c619540260a823c6eb19cc;hb=e39db4db7c553ae1c4aaf158cd0ebf3cf6d478fb;hp=1af09bc00ecc42f9c103b5fd6f3b34d22b6b3c0c;hpb=cb7de75eb33b2ceda391c903cac5e5ed63933b99;p=binutils-gdb.git diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 1af09bc00ec..f2514b12395 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -4744,8 +4744,7 @@ cache_symbol (const char *name, domain_enum domain, struct symbol *sym, return; h = msymbol_hash (name) % HASH_SIZE; - e = (struct cache_entry *) obstack_alloc (&sym_cache->cache_space, - sizeof (*e)); + e = XOBNEW (&sym_cache->cache_space, cache_entry); e->next = sym_cache->root[h]; sym_cache->root[h] = e; e->name = copy @@ -12805,11 +12804,9 @@ print_mention_exception (enum ada_exception_catchpoint_kind ex, case ada_catch_exception: if (c->excep_string != NULL) { - char *info = xstrprintf (_("`%s' Ada exception"), c->excep_string); - struct cleanup *old_chain = make_cleanup (xfree, info); - - uiout->text (info); - do_cleanups (old_chain); + std::string info = string_printf (_("`%s' Ada exception"), + c->excep_string); + uiout->text (info.c_str ()); } else uiout->text (_("all Ada exceptions"));