From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 637833858D39 for ; Sat, 20 Jan 2024 18:21:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 637833858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 637833858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705774881; cv=none; b=QKAUjL9jFet7e9JHgF18aJXwNHNT0E/d/m5VtcOQgUt90mk0XAgwPgbDyiXboqJ2MwJskwkNy9dRdrj9QBDQXllBsXRWICfAaKjyle2KSaDSe1w98YnJm/cF/GO7xQt43egMY4cPJA+fo3nT/vIRUSVjDTo8pbwy0jKXo4P/dUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705774881; c=relaxed/simple; bh=ZW5qVpguSGlkLQa2TReie60fbrRI9kq0wlhhmhdSoJU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=NOodem1rhHDvVaWULByYdV1SLbW4vTYSl4SYgooA5XRRXR5OCDnVJby/+ZSe8mmdNB9X2fdhzr+ybFZ5SkPjEANLQUh1iLciVvyHT+sGFUbDneOidpoEV0Xx2j/THuXgCx1lsUffGO1KYuRgCPdgh+Up7Dz4YUODe8/UPfMiHJk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5001a.ext.cloudfilter.net ([10.0.29.139]) by cmsmtp with ESMTPS id R7CtrqVDsoMN9RFy2rfAcM; Sat, 20 Jan 2024 18:21:18 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id RFy1ruAKlRT1bRFy1rfHRh; Sat, 20 Jan 2024 18:21:17 +0000 X-Authority-Analysis: v=2.4 cv=MKVzJeVl c=1 sm=1 tr=0 ts=65ac0f1d a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=20KFwNOVAAAA:8 a=P7k1pmRHHmPdbhLpfKsA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=QZlgBT8TYdjjw9nO1+a0OhTqY9w87MHczM2+LI/lEzQ=; b=DKdHjNVCSb5sXRZ3fA4QLV6N0H v0CcilVHXh92Yi1lAILQsnO8fyGF9ZGmYJZYuvSxlUfGF9uM5XJuje3CEgVPN4Zo7ZPfU2026MVYT 3GYcO/VN7lMQ0kB3ga9apCK1T; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:34016 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rRFy0-0048B5-2j; Sat, 20 Jan 2024 11:21:16 -0700 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , Hannes Domani , "gdb-patches@sourceware.org" Subject: Re: [PATCH 11/14] Remove redundant check from tui_refresh_frame_and_register_information References: <20231217-tui-regs-cleanup-v1-0-67bd0ea1e8be@tromey.com> <20231217-tui-regs-cleanup-v1-11-67bd0ea1e8be@tromey.com> <1463654062.4443004.1702920741907@mail.yahoo.com> <871qbj5bjk.fsf@tromey.com> <87ttoezdx9.fsf@redhat.com> X-Attribution: Tom Date: Sat, 20 Jan 2024 11:21:15 -0700 In-Reply-To: <87ttoezdx9.fsf@redhat.com> (Andrew Burgess's message of "Tue, 19 Dec 2023 10:26:10 +0000") Message-ID: <87h6j7vpb8.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rRFy0-0048B5-2j X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net (prentzel) [97.122.68.157]:34016 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNHfCuVFDHgzsNmCLM4hUqYk13lIRDcNAwIEV1mdCcjvdD/XgIxAr4SKqVC798+IgG35Sz7BCV0ziUpcOjrj7fXux9uHDRKL8OtqgBIc9B65J1jfivmI detkfwckoHhoTO7ufp6oTpAw6iAweFl+vwcoYCBCflnwCLoqldKYjfXCZUftyG4S54o4crJGrGfTGdLJExCkVPqj8iLf5h4Mr3o= X-Spam-Status: No, score=-3016.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Andrew" == Andrew Burgess writes: >> Yes, in the above, 'from_stack' is always true, so the value of >> 'frame_info_changed_p' is immaterial. Andrew> Except I think that's a bug in the original code. Andrew> As your previous patch points out we already hook the register changed Andrew> observer, so the only time that a register change will need this Andrew> function to refresh the register display is if the frame was changed. Andrew> If we're going to stop checking frame_info_changed_p then we might as Andrew> well stop hooking gdb::observers::register_changed and just rely on the Andrew> before prompt hook to update everything, right? I don't think that will work correctly, because the TUI register window shows changed registers in a special way. If we rely solely on the before-prompt hook, then any command at all will cause a redisplay that will erase the "changed" highlighting. This is why two phases are needed: the register window hooks into the various things that can cause a register change, and then this is checked before redisplay. The patch in question here just removes some code that checks if the frame changed. However, if the frame did change, from_stack is already set due to the context-changed observer. Tom