[RFA]: Make gdb_do_one_event public and fix uiout setting for TUI

Stephane Carrez stcarrez@nerim.fr
Mon Aug 26 14:22:00 GMT 2002


Hi!

The TUI relies on the modification of the 'uiout' to switch correctly
between TUI mode and normal mode.  It installs its own ui-out function to
catch the output and redirect it in the appropriate curses window.
It installs gdb's normal ui-out function when using the plain terminal
(non-TUI mode).

Since 2001-09-07, the 'do_catch_errors' function preserve the 'uiout' (for safety
reasons I guess).  This breaks the TUI mode switching because the 'uiout' is
always restored to its origin.

To solve the problem it's necessary to update the 'uiout' according to the TUI
mode at the gdb top level.  The simplest way is to make TUI provide its own
command loop, install a 'command_loop_hook' and do its special 'uiout' management
there.  To do this we have everything except that 'gdb_do_one_event' is private.
(It makes sense to make it public, see 'XtAppProcessEvent' for example).

In short, I would like approval to make 'gdb_do_one_event' a public function.

Ok to commit?

	Stephane

gdb/ChangeLog

2002-08-27  Stephane Carrez  <stcarrez@nerim.fr>

	* event-loop.c (gdb_do_one_event): Make public.
	* event-loop.h (gdb_do_one_event): Declare.

tui/ChangeLog

2002-08-27  Stephane Carrez  <stcarrez@nerim.fr>

	* tui-hooks.c (tui_event_loop): New function.
	(tui_command_loop): New function to override gdb loop and make sure
	uiout is set according to TUI mode.
	(tui_command_loop): Install the specific TUI command hook.
	* tuiIO.c (tui_initialize_io): Initialize tui_old_uiout.
	(tui_uiout, tui_old_uiout): Make public.
	* tuiIO.h (tui_uiout, tui_old_uiout): Declare.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tui-event-loop.diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020826/bfd40339/attachment.ksh>


More information about the Gdb-patches mailing list