This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/4] Use scoped_restore in a couple of interp-related places


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]