This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/61] More TUI refactorings
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 17 Jul 2019 13:41:31 +0100
- Subject: Re: [PATCH 00/61] More TUI refactorings
- References: <20190704170311.15982-1-tom@tromey.com>
On 7/4/19 6:02 PM, Tom Tromey wrote:
> Here is another series of TUI cleanups. It covers several things.
>
> I made an attempt to remove most of the uses of the TUI_*_WIN globals,
> and to remove explicit checks of window types. I think this is
> important if we want to be able to easily add new types of windows:
> the core code should be able to manipulate windows without regard to
> their exact contents.
>
> This transformation isn't complete, but this series takes it pretty
> far, with many of the remaining uses being in the layout code (mainly
> tui-layout.c, but also other files) -- which, if we're going to add
> new windows types, is going to need to be rewritten anyhow. (Also,
> even once this is all done, I suspect the command window will always
> be a singleton with special code here and there in the TUI anyhow.)
>
> This series also simplifies window creation and management. By the
> end of the series, init_and_make_win is completely gone, replaced with
> ordinary uses of "new" at the appropriate spots. These transforms
> make this code much simpler to understand, IMO.
>
> The TUI source code is also rearranged somewhat. In particular, by
> the end of the series, the declaration for a window class is in the
> appropriate .h file (that is, most are moved out of tui-data.h), and
> all the methods for a given class are grouped into a single .c file.
>
> A couple of small bugs have been fixed in this series. See the patch
> "Fix flushing bug in tui_puts_internal" and also "Remove deleted
> breakpoint from TUI display".
>
> Finally, the series contains a fair amount of trivia, just random
> little things I noticed while working on the code.
>
> In some cases this series introduces functions, only to remove them
> some patches later. This is a side effect of how I wrote the patches,
> but TBH I think it makes each individual patch more clear -- bundling
> the two patches together would make the result less obviously correct.
>
> I've tested this as well as I could. You may want to give it a try,
> though. It is on the "t/tui-rewrite" branch in my github.
I've tested it a bit, and didn't spot anything different.
I read through the series, and it all looked great to me.
I sent a few comments to individual patches pointing out
some tiny things.
Thanks for doing all of this. Impressive.
Pedro Alves