diff options
author | Tom Tromey <tom@tromey.com> | 2017-11-10 14:42:35 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-04 12:12:16 -0600 |
commit | 862d101ada6b6e8496e545c0bcd801cf8b9a46c1 (patch) | |
tree | 212154d1a4e1f3cd6c97969c74afc52902d72258 /gdb | |
parent | cb7de75eb33b2ceda391c903cac5e5ed63933b99 (diff) | |
download | gdb-862d101ada6b6e8496e545c0bcd801cf8b9a46c1.zip gdb-862d101ada6b6e8496e545c0bcd801cf8b9a46c1.tar.gz gdb-862d101ada6b6e8496e545c0bcd801cf8b9a46c1.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/ada-lang.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1a86a21..730a357 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2018-05-04 Tom Tromey <tom@tromey.com> + * ada-lang.c (print_mention_exception): Use std::string. + +2018-05-04 Tom Tromey <tom@tromey.com> + * ada-lang.c (create_excep_cond_exprs): Update. (ada_exception_catchpoint_cond_string): Use std::string. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 1af09bc..7cbf1ec 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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")); |