From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id E5AF03864877 for ; Sat, 23 Jan 2021 17:54:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E5AF03864877 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x330.google.com with SMTP id c127so7134326wmf.5 for ; Sat, 23 Jan 2021 09:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=50ay4sAKLVxmsSK12mbJbIP4YLhH+/feh9TE+ygJtMs=; b=cJ21Erb0Ao3iyqBtl13il1Y2ClhJntbMVWbIF5Iic65V1+9cSsEaUaCUjvo7GDKwhu 6GgE3BNhD5kRPQssgNHoV8FAFGclSla+rtMzfYITk0VJ16Jku6Nb/sJYr94dUsN71IKd Q3+Xhp2YhJiJgD34SIeOldT40GqWZuxZ+93tgHX0aSXZGyxBh+TtH2Vd83I/8/eDIF3u AVOWDBpeaiOXGaMRJbk8DJTsNyjmpvJ5Zkp/6wAWymtKxz9Pl3qvdVt+D9tl6uK8m7mJ NnLQ8Kygk9Bit9o+iEzQlLZoNr/Cp0eNgv4MZUTYZ95b5tCNTkLjywQ520tfl0QTBH7/ QZ9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=50ay4sAKLVxmsSK12mbJbIP4YLhH+/feh9TE+ygJtMs=; b=aM1uRzpQX/pWCuiJSbqq1MOZW85jfstvS1Ws7+raWeiiScB7GSTym4JgZtpAmN0Oji Je5rvDtF7CZntD0X1EmbFfzKxhKKu9R9NiLtdOgk/RR66KXnD2Oa+uDaCa9LH+jwStQQ lzBzcmlNdYPCmfht3sMwEp46GpD4YOL9NqkiKdAz+yS22MV4F8Z2gR+WvvM86jkhK2nO W8Bi9pRx2HyzI0ZnQHt1jQoIAS6CuCwuJxWURe+8NS+8n//tx+Vr1n2bLL0XGJDvSht6 XIOEU+Vd4KyzHlWnNGyfqm/2Df7EJAafcU/SPq+fpMShJaJnwEqOx6EEQn5z5x50i00l xj6A== X-Gm-Message-State: AOAM5311p5IHcXo016yAuLT7CGRasEmLxOuTfwcU/3XBoBCs50YrDjB0 9tBbiLu0Z3iuCNaAFyphBBfBXYk+/HRuig== X-Google-Smtp-Source: ABdhPJyYU4Ld8Ir2431IG6mFHHItYJHWMTBqWCWebp3D6fBwI24DRV2uQEyUIaN16UHhnFh0hZTBLw== X-Received: by 2002:a7b:c246:: with SMTP id b6mr480551wmj.118.1611424484069; Sat, 23 Jan 2021 09:54:44 -0800 (PST) Received: from localhost (host109-154-20-185.range109-154.btcentralplus.com. [109.154.20.185]) by smtp.gmail.com with ESMTPSA id g192sm17275424wmg.18.2021.01.23.09.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jan 2021 09:54:43 -0800 (PST) Date: Sat, 23 Jan 2021 17:54:42 +0000 From: Andrew Burgess To: Hannes Domani Cc: "gdb-patches@sourceware.org" , Simon Marchi , Tom Tromey Subject: Re: [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Message-ID: <20210123175442.GC265215@embecosm.com> References: <20201229170227.821-1-ssbssa@yahoo.de> <20201229170227.821-2-ssbssa@yahoo.de> <20210115164811.GK265215@embecosm.com> <20210117113102.GM265215@embecosm.com> <2060671008.4946685.1610889581434@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <2060671008.4946685.1610889581434@mail.yahoo.com> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 17:51:58 up 45 days, 22:36, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 17:54:46 -0000 * Hannes Domani [2021-01-17 13:19:41 +0000]: > Am Sonntag, 17. Januar 2021, 12:31:05 MEZ hat Andrew Burgess Folgendes geschrieben: >=20 > > After further though I think there's an even better solution for this > > issue.=A0 See the patch below. >=20 > 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, a= nd the > tui_update_gdb_sizes call at the end of tui_enable dereferences TUI_CMD_W= IN. >=20 > Also, and I think your previous patch behaves the same, but I can no long= er use > the TuiWindows variables width/height/title inside my Window.close functi= on, > because at this point tui_active=3D=3Dfalse, so the assertion inside is_v= alid > fails. > This can be worked around by saving the values in some Window class membe= rs, > but it is more inconvenient. Hannes, Would you be able to give the version below a try please and let me know if you are still seeing any problems. This is much more like the first patch I posted. I honestly think the second approach is better, but it throws up so many other issues that would need to be resolved around the whole disable/enable transition, that I think going with the first approach is just going to be simpler. Anyway, I think this covers all the situations you've described so far, but let me know if you still see any issues. Thanks, Andrew