From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Wed, 10 Jul 2024 05:46:35 +0300 Message-ID: References: <86frstfiop.fsf@gnu.org> <03b9a1c2-986d-40ea-bdd6-d13b419c9aa0@gutov.dev> <86v81i526t.fsf@gnu.org> <1f5f741f-d599-4051-8a34-27d349360eb8@gutov.dev> <86sewiztr2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13451"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 71866@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 10 04:47:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sRNMV-0003JH-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jul 2024 04:47:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRNMB-0007VZ-FG; Tue, 09 Jul 2024 22:46:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRNM8-0007VC-Si for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 22:46:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRNM8-0005QM-FC for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 22:46:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRNME-00071b-8s for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 22:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2024 02:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71866 X-GNU-PR-Package: emacs Original-Received: via spool by 71866-submit@debbugs.gnu.org id=B71866.172057961326979 (code B ref 71866); Wed, 10 Jul 2024 02:47:02 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 10 Jul 2024 02:46:53 +0000 Original-Received: from localhost ([127.0.0.1]:54593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRNM4-000713-HJ for submit@debbugs.gnu.org; Tue, 09 Jul 2024 22:46:53 -0400 Original-Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]:34859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRNM2-00070j-8X for 71866@debbugs.gnu.org; Tue, 09 Jul 2024 22:46:50 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C528C114031B; Tue, 9 Jul 2024 22:46:38 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 09 Jul 2024 22:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1720579598; x=1720665998; bh=Cv3JKnqtFRglcfxd7FtSN+n+rFjWweuuMct8MmicUXU=; b= SQcrMRUZK8jjzwan5Ng88OtsnClun3oBA0vulmbHEx//Ht5Fd7OcGn1POG+yE1cl DWf4JZHhsHWTyOcjcA/xWYkq3ouICfAsV3WZlISpcTGwSA/+7uqiDtaiQVuECSOR Cbb3lTYMQmZuqUJtiKH7iIWogj2ULkFkvpnW+N2i5usIFkXO3GIX0fgjuBegLxH9 sPd5MoVxmjNnJ4CiEtUupGPcT+spkXaJRCj0NrN3JB9Ndb8TcwsfRDsJP7DZ7PHs AHfFRgJ3cbL3P6rP4e3o75l4NAJ0TeoWqJsVYOIMdh/WeCSaz/OUV+thZ2jACJ+A hqbob8ls2e4rOrN0DLNWiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1720579598; x= 1720665998; bh=Cv3JKnqtFRglcfxd7FtSN+n+rFjWweuuMct8MmicUXU=; b=Y F8u5GwoZTWqwmePp+UjFqy1gIIEPW/bmdQ5jrDApRbED1sEARt+iIpqXg8tnBMs3 VO32E+mg2leJ0WrtL7xV2jTxgWCTD0VchMjl5xIvgMS1AhRA8yV2gVsgB62WcIO/ 0wiZXu7l0wqrhdWdWA/nN/sq7v6V37Vu/NBdw+EqGXosPG78oYRXIUbtKSxxQRcc WajjKV92iYr4NgWlNIPM95hpYu4NKS7fcsC2OxvOlsAEJVCtqkXDWgRwpgE06yOp 0QEw+HB7n1C8UDUQVKQUO6HIAEO6vuH0Lla6N/WFqPJ6bWJTlAGN8/tJT26Q8mxx +YtcBrAvd6iUUg/BluXVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrfedtgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Jul 2024 22:46:36 -0400 (EDT) Content-Language: en-US In-Reply-To: <86sewiztr2.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288661 Archived-At: On 09/07/2024 14:31, Eli Zaretskii wrote: >> Date: Tue, 9 Jul 2024 05:37:10 +0300 >> Cc: 71866@debbugs.gnu.org >> From: Dmitry Gutov >> >>> For starters, put a breakpoint in ns_draw_window_cursor and see if it >>> gets called in the scenario where you see the problem. >> >> Thank you. >> >> It does get called. Unfortunately, as soon as I put a breakpoint there, >> any attempt to switch to the Emacs window drops into the debugger again >> - and I have switch back to the terminal emulator to enter 'c RET' 20 >> times or so. > > I don't think I understand what you are trying to do. I thought you > needed to "switch to the Emacs window" just once: to trigger the > situation which you want to investigate. Once you trigger it, the > debugger will indeed kick in, but all you need to do next is step > through the code, so why do you care about switching to Emacs again? Somehow, the problem manifests when I switch between frames (two frames in the current repro) using C-` (bound to `other-frame'). But if I Alt-Tab to a different application and then Alt-Tab back to Emacs, then the glyph is rendered fine - even if the "problematic" frame gets selected. > If you want to trigger this situation several times, and be able to > activate and deactivate the breakpoint at will, I suggest the > following technique: > > . put a breakpoint in some function that is easy to invoke > interactively, but which otherwise is rarely called (my personal > favorite is Frecenter, which you can then trigger with C-l) > . put a breakpoint in ns_draw_window_cursor (or wherever you need), > but make it disabled (the GDB command is "disable N" where N is > the breakpoint number) > . when you are ready to trigger the issue, type C-l, which will > cause the debugger to kick in, and enable the breakpoint in > ns_draw_window_cursor > . continue Emacs, then trigger the ns_draw_window_cursor breakpoint > and investigate At this point the breakpoint will start hitting as soon as I switch to an Emacs frame. I guess what would be ideal is a breakpoint which won't hit until after I switch to another frame. > . when you are done investigating and want to, say, set a breakpoint > in some other place, do that, make the breakpoint disabled again > and continue Emacs > . when ready, type C-l again, enable the disabled breakpoint, and > repeat the above procedure > > Another, or perhaps complementary, technique is to define conditions > for breakpoints so that they trigger only when you want. For example, > if you want a breakpoint to trigger only for a specific frame or > window, find out the address of the corresponding struct window or > struct frame (assuming there are variables of these types in the same > scope as the breakpoint), then make the breakpoint conditioned on > those variables having (or not having) those specific values. The > usual method of finding out these addresses is the first time the > breakpoint triggers. Then you can do: > > (gdb) print f > $1 = (struct frame *) 0x1234567812345600 > (gdb) condition 3 f == 0x1234567812345600 > > This makes breakpoint 3 trigger only when struct frame variable f has > the value of this frame. So step 1 find out the address of the second frame, step 2 switch to first frame, step 3 enable a conditional breakpoint. Thank you, I'll try experimenting with that.