Remove cleanup from print_mention_exception
This removes a cleanup from print_mention_exception by using string_printf. ChangeLog 2018-05-04 Tom Tromey <tom@tromey.com> * ada-lang.c (print_mention_exception): Use std::string.
This commit is contained in:
parent
cb7de75eb3
commit
862d101ada
2 changed files with 7 additions and 5 deletions
|
@ -12805,11 +12805,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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue