From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#40992: 27.0.90; Evaluating a function while using edebug breaks Date: Sun, 3 May 2020 11:55:04 +0000 Message-ID: <20200503115504.GC5721@ACM> References: <87sggkawmz.fsf@russet.org.uk> <20200501155630.GA22689@ACM> <20200501173306.GB22689@ACM> <87o8r7xgb8.fsf@gnus.org> <87sggjm3yb.fsf@gmail.com> <83wo5uu81f.fsf@gnu.org> <20200502133447.GC6832@ACM> <83tv0ysam1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121349"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 40992@debbugs.gnu.org, npostavs@gmail.com, phillip.lord@russet.org.uk To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 03 13:56:10 2020 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 1jVDE8-000VOb-MU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 May 2020 13:56:08 +0200 Original-Received: from localhost ([::1]:47558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVDE7-00080J-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 May 2020 07:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVDE1-00080B-Uq for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 07:56:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVDE1-00051D-KK for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 07:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVDE1-0003xM-Io for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 07:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 May 2020 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40992 X-GNU-PR-Package: emacs Original-Received: via spool by 40992-submit@debbugs.gnu.org id=B40992.158850690915142 (code B ref 40992); Sun, 03 May 2020 11:56:01 +0000 Original-Received: (at 40992) by debbugs.gnu.org; 3 May 2020 11:55:09 +0000 Original-Received: from localhost ([127.0.0.1]:54817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVDDB-0003wA-3M for submit@debbugs.gnu.org; Sun, 03 May 2020 07:55:09 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:51524 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jVDD9-0003vy-58 for 40992@debbugs.gnu.org; Sun, 03 May 2020 07:55:07 -0400 Original-Received: (qmail 50856 invoked by uid 3782); 3 May 2020 11:55:05 -0000 Original-Received: from acm.muc.de (p2E5D57CC.dip0.t-ipconnect.de [46.93.87.204]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 03 May 2020 13:55:04 +0200 Original-Received: (qmail 5972 invoked by uid 1000); 3 May 2020 11:55:04 -0000 Content-Disposition: inline In-Reply-To: <83tv0ysam1.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.io gmane.emacs.bugs:179574 Archived-At: Hello, everybody. On Sat, May 02, 2020 at 16:57:26 +0300, Eli Zaretskii wrote: > > Date: Sat, 2 May 2020 13:34:47 +0000 > > Cc: Noam Postavsky , larsi@gnus.org, > > 40992@debbugs.gnu.org, phillip.lord@russet.org.uk > > From: Alan Mackenzie > > Noam's fix, I think, will either leave stale highlights on what used to > > be breakpoints, or won't leave the highlights active whilst the > > debugging is still in progress. It might be the least bad fix, though. > If Noam's fix is incomplete, I still think reverting the feature on > emacs-27 is a better solution. We should continue working on this on > master until we find a better solution. OK. I've reverted the feature in the emacs-27 branch (with a directive not to merge to master). This should fix the bug in emacs-27. I've had two ideas about fixing this bug in master whilst leaving the breakpoint highlight feature in place: (i): (Please bear in mind it was ~04:30 when I thought this up. ;-) To each type of function (subr, byte-compile, lambda form, closure form) we add an extra field for a @dfn{function property list}, possibly optional. For dumped functions, the contents will be the index into a vector holding lots of function property lists. For functions in r/w storage, we have a property list directly. We will have functions like put-function-property, get-function-property, remove-function-properties. Having got this infrastructure, edebug will now store the 'edebug property on this function-property-list, and the problems we've had with the symbol-plist just evaporate. (ii) We devise a new (symbol-) property called something like 'ghost-edebug. When an instrumented function gets recompiled by C-M-x, etc., the previous contents of 'edebug get moved to 'ghost-edebug, and 'edebug gets a marker, as it currently does. Whilst manipulating the breakpoint highlights, edebug will use 'ghost-edebug when 'edebug holds a marker. The 'ghost-edebug property will be removed when the `hanoi' function is next instrumented. Maybe this will work. -- Alan Mackenzie (Nuremberg, Germany).