From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31671: 26.1; edebug-defun doesn't step if functions run in a separate thread Date: Tue, 05 Jun 2018 17:47:52 +0300 Message-ID: <83602xb887.fsf@gnu.org> References: <<87muwfsp4i.fsf@konghq.com>> <<83r2lmbidf.fsf@gnu.org>> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1528209965 7116 195.159.176.226 (5 Jun 2018 14:46:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Jun 2018 14:46:05 +0000 (UTC) Cc: raimon@konghq.com, 31671@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 05 16:46:01 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQDDk-0001j4-13 for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jun 2018 16:46:00 +0200 Original-Received: from localhost ([::1]:47277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQDFr-0002Bh-7t for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jun 2018 10:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQDFl-0002BS-ME for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2018 10:48:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQDFi-0000le-Fb for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2018 10:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQDFi-0000la-BU for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2018 10:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fQDFi-0001jj-5U for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2018 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jun 2018 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31671-submit@debbugs.gnu.org id=B31671.15282100736656 (code B ref 31671); Tue, 05 Jun 2018 14:48:02 +0000 Original-Received: (at 31671) by debbugs.gnu.org; 5 Jun 2018 14:47:53 +0000 Original-Received: from localhost ([127.0.0.1]:35278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQDFY-0001jI-RK for submit@debbugs.gnu.org; Tue, 05 Jun 2018 10:47:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQDFW-0001j0-CJ for 31671@debbugs.gnu.org; Tue, 05 Jun 2018 10:47:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQDFN-0000eU-TJ for 31671@debbugs.gnu.org; Tue, 05 Jun 2018 10:47:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQDFN-0000eP-OR; Tue, 05 Jun 2018 10:47:41 -0400 Original-Received: from [176.228.60.248] (port=3864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fQDFN-0002ic-5t; Tue, 05 Jun 2018 10:47:41 -0400 In-reply-to: (message from Drew Adams on Mon, 4 Jun 2018 10:23:58 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147015 Archived-At: > Date: Mon, 4 Jun 2018 10:23:58 -0700 (PDT) > From: Drew Adams > Cc: 31671@debbugs.gnu.org > > > The problem here is that Edebug enters recursive-editing (on the > > non-main thread which runs the function 'foo'), then waits for the > > user to press a key. While it waits, it releases the global lock, and > > the main thread starts running. So when you press a key, you are on a > > different thread, and 'throw' doesn't have a matching 'catch' (because > > that 'catch' is stored with the handlers of the thread which runs > > 'foo'. > > > > Not yet sure how to deal with this. Thoughts and ideas are welcome. > > Not really following this thread, and 100% unknowledgable > about Emacs threading. But somewhat curious: Does the same > problem exist for plain `debug' as for `edebug'? Yes. Modify the recipe like this, and you have the same problem with 'debug': emacs -Q Type: (defun foo () (message "Hi")) Eval the function to define it. M-x debug-on-entry RET foo RET M-: (make-thread 'foo) RET Type 'd' in the backtrace that Emacs presents.