[PING] [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled

Andrew Burgess andrew.burgess@embecosm.com
Fri Jan 15 16:49:22 GMT 2021


* Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> [2021-01-14 16:14:48 +0000]:

> Ping.

I replied to the original thread:

  https://sourceware.org/pipermail/gdb-patches/2021-January/175122.html

Thanks,
Andrew


> 
> 
> Am Donnerstag, 31. Dezember 2020, 05:24:32 MEZ hat Simon Marchi <simon.marchi@polymtl.ca> Folgendes geschrieben:
> 
> > On 2020-12-29 12:02 p.m., Hannes Domani via Gdb-patches wrote:
> > > There seems to be no other way to determine if TUI is enabled, which is a
> > > problem in case the TUI is disabled, and you redraw the window contents
> > > based on some registered event.
> > > Then the TUI is redrawn, even though the TUI stays disabled, and the prompt
> > > is anywhere on the screen.
> > >
> > > gdb/ChangeLog:
> > >
> > > 2020-12-29  Hannes Domani  <ssbssa@yahoo.de>
> > >
> > >     * python/py-tui.c (gdbpy_tui_is_valid): Check tui_active as well.
> > > ---
> > >  gdb/python/py-tui.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
> > > index 87065eaf60..9c35778bcb 100644
> > > --- a/gdb/python/py-tui.c
> > > +++ b/gdb/python/py-tui.c
> > > @@ -356,7 +356,7 @@ gdbpy_tui_is_valid (PyObject *self, PyObject *args)
> > >  {
> > >    gdbpy_tui_window *win = (gdbpy_tui_window *) self;
> > >
> > > -  if (win->window != nullptr)
> > > +  if (tui_active && win->window != nullptr)
> > >      Py_RETURN_TRUE;
> > >    Py_RETURN_FALSE;
> >
> > >  }
> > >
> >
> > I think that makes sense, although I'd like Tom to confirm.


More information about the Gdb-patches mailing list