This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA]: Tui hooks and tui-out


> Hi!
> 
> The following patch contains two new files to replace the old tui hacks
> and use the existing gdb support:
> 
>  - the tui-hooks.c file defines several hooks (those used by Insight),
>    that are installed in tui-curses mode.  Most of them are un-installed
>    when we leave the curses-mode (and switch to gdb-default stdout mode).
> 
>  - the tui-out.c file is a specific ui-out, modeled on cli-out.c
>    (copied and sed s/cli_/tui_/).  It catches several fields to identify
>    the source line and file name.  The catching implementation is very
>    crude, needs to be improved, but works enough for tui interface.
> 
> Do you agree with this?
> 
> 	Stephane
> 
> 2001-07-17  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
> 
> * tui-hooks.c: New file, gdb hooks for tui.


FYI, GDB is moving away from ``hooks'' and towards gdb-events.  It is 
ment to eventually be an observer so that the TUI and anything else can 
monitor what GDB is up to.

Where there is a choice between a hook and a gdb-event, can you please 
use the latter.

> 	* tui-out.c: New file, image copied from cli-out.c.
> 	(tui_field_int): Identify "line" fields and keep track of them.
> 	(tui_field_string): Likewise for "file".
> 	(tui_out_new): Use flags = 0 to avoid printing the sources.


This is ok.

I guess you're using that to capture the stop source-and-line.  The 
model is going to be changed.  Instead:

	o	gdb-events notifies observers that
		the target has stopped

	o	the TUI (an observer) queries GDB for
		all relevant stop information

it should stop false source-and-line detection.  Your code will still be 
used, just slightly differently.

	Andrew




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