Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hannes Domani via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Tom Tromey <tom@tromey.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled
Date: Mon, 18 Jan 2021 11:29:43 +0000 (UTC)	[thread overview]
Message-ID: <301383083.5492027.1610969383170@mail.yahoo.com> (raw)
In-Reply-To: <20210118103058.GR265215@embecosm.com>

 Am Montag, 18. Januar 2021, 11:31:00 MEZ hat Andrew Burgess <andrew.burgess@embecosm.com> Folgendes geschrieben:

> * Hannes Domani <ssbssa@yahoo.de> [2021-01-17 13:19:41 +0000]:
>
> >  Am Sonntag, 17. Januar 2021, 12:31:05 MEZ hat Andrew Burgess <andrew.burgess@embecosm.com> Folgendes geschrieben:
> >
> > > After further though I think there's an even better solution for this
> > > issue.  See the patch below.
> >
> > This version crashes for me when I disable and then re-enable TUI, because
> > tui_windows and tui_win_list are empty, not filled again in tui_enable, and the
> > tui_update_gdb_sizes call at the end of tui_enable dereferences
> > TUI_CMD_WIN.
>
> That's annoying.  I would have sworn I'd tested that.  Guess not.
> I'll take a look at this later today.  I guess something that's
> currently conditional will need to become unconditional so that the
> windows are recreated when the tui is enabled.
>
> >
> > Also, and I think your previous patch behaves the same, but I can no longer use
> > the TuiWindows variables width/height/title inside my Window.close function,
> > because at this point tui_active==false, so the assertion inside is_valid
> > fails.
>
> OK, I think this one should be easy enough to fix.
>
> Out of interest, what do you do with the width/height/title in the
> close method?  Given the window is about to vanish I'd have thought
> all you'd be doing at this point is internal object clean up?

I have all my TUI windows in a dictionary, with the window title as key.
And on Window.close I remove the window from the dictionary.


> > This can be worked around by saving the values in some Window class members,
> > but it is more inconvenient.
>
> I think my fix will mean you don't need to do this.

Thanks.


Hannes

  reply	other threads:[~2021-01-18 11:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201229170227.821-1-ssbssa.ref@yahoo.de>
2020-12-29 17:02 ` [PATCH 1/4] Fix wrong method name Hannes Domani via Gdb-patches
2020-12-29 17:02   ` [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Hannes Domani via Gdb-patches
2020-12-31  4:24     ` Simon Marchi via Gdb-patches
2021-01-15 16:48     ` Andrew Burgess
2021-01-15 17:22       ` Hannes Domani via Gdb-patches
2021-01-17 11:31       ` Andrew Burgess
2021-01-17 13:19         ` Hannes Domani via Gdb-patches
2021-01-18 10:30           ` Andrew Burgess
2021-01-18 11:29             ` Hannes Domani via Gdb-patches [this message]
2021-01-23 17:54           ` Andrew Burgess
2021-01-23 17:55             ` Andrew Burgess
2021-01-24 12:33               ` Hannes Domani via Gdb-patches
2021-02-06 19:38               ` Tom Tromey
2021-02-08 11:58                 ` Andrew Burgess
2021-02-08 19:19                   ` Tom Tromey
2021-01-18 17:19       ` Eli Zaretskii via Gdb-patches
2020-12-29 17:02   ` [PATCH 3/4] Add optional styled argument to gdb.execute Hannes Domani via Gdb-patches
2020-12-29 17:19     ` Eli Zaretskii via Gdb-patches
2020-12-31  4:28     ` Simon Marchi via Gdb-patches
2020-12-29 17:02   ` [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters Hannes Domani via Gdb-patches
2020-12-31  4:53     ` Simon Marchi via Gdb-patches
2020-12-31 14:01       ` Hannes Domani via Gdb-patches
2021-01-31  7:13     ` Joel Brobecker
2020-12-29 17:18   ` [PATCH 1/4] Fix wrong method name Eli Zaretskii via Gdb-patches
2020-12-29 17:39     ` Hannes Domani via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=301383083.5492027.1610969383170@mail.yahoo.com \
    --to=gdb-patches@sourceware.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=ssbssa@yahoo.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox