This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/4] Use scoped_restore in a couple of interp-related places
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Fri, 25 May 2018 18:58:09 +0100
- Subject: Re: [RFA 1/4] Use scoped_restore in a couple of interp-related places
- References: <20180430051207.19979-1-tom@tromey.com> <20180430051207.19979-2-tom@tromey.com>
On 04/30/2018 06:12 AM, Tom Tromey wrote:
> While looking through the "interp" code I found a couple of spots that
> could use scoped_restore.
>
> ChangeLog
> 2018-04-29 Tom Tromey <tom@tromey.com>
>
> * cli/cli-interp.c (safe_execute_command): Ues scoped_restore.
Typo: "Ues" -> "Use".
> @@ -372,9 +371,6 @@ safe_execute_command (struct ui_out *command_uiout, const char *command,
> }
> END_CATCH
>
> - /* Restore the global builder. */
> - current_uiout = saved_uiout;
> -
I was a little worried about whether exception_print could use current_uiout,
but it seems not. So OK.
> /* FIXME: cagney/2005-01-13: This shouldn't be needed. Instead the
> caller should print the exception. */
> exception_print (gdb_stderr, e);
Thanks,
Pedro Alves