From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65837: 30.0.50; Debugger in non-main threads Date: Sat, 09 Sep 2023 14:14:20 +0300 Message-ID: <83bkebvbsj.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="942"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65837@debbugs.gnu.org To: Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 13:15:25 2023 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 1qevvx-000AeS-IC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 13:15:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qevva-0002OQ-C2; Sat, 09 Sep 2023 07:15:02 -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 1qevvY-0002Nt-7u for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 07:15:00 -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 1qevvX-0005vq-Dt for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 07:15:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qevva-0004K0-6Z for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 07:15: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: Sat, 09 Sep 2023 11:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65837 X-GNU-PR-Package: emacs Original-Received: via spool by 65837-submit@debbugs.gnu.org id=B65837.169425807816568 (code B ref 65837); Sat, 09 Sep 2023 11:15:02 +0000 Original-Received: (at 65837) by debbugs.gnu.org; 9 Sep 2023 11:14:38 +0000 Original-Received: from localhost ([127.0.0.1]:46285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qevvC-0004JA-Ec for submit@debbugs.gnu.org; Sat, 09 Sep 2023 07:14:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qevv9-0004Iw-Lw for 65837@debbugs.gnu.org; Sat, 09 Sep 2023 07:14:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qevv1-0005tI-Ff; Sat, 09 Sep 2023 07:14:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+vwqsYHJaxfo+YOcyzV1q992Sami1MHHurbuVC8oK8U=; b=JV2Pyi70h/oN zjZaUmnZh8Th0X8O5js2hkYOO/PQCkypPrsqSWiwtK1pCCjCyc05ylKwz2UT5dZ9x2iuI9eV0gEZm /ghd2uA1sV1Q9tgjx5ZA/4mb1+YIV/I84N/2ZFUjrrPWQKG99vJ3uZX8S738Ut77S5eA2oAK79Z0h bW3qzdrhrfaAzu0af7a+ND+4ZtDYnYHyhYXiy9ESspbXkHv+o0LcTA2tlMH3U7RdZcmKRqw9J3Y9/ hcwUoo6jBxd4hVxj3edTKcHvco1KgUMB7WM4flFoX0z0/XN8CsroH1bN6Z/ZqS8AW/XtBCaYw84Ag M7ttWREXh7qEbbpZ6xm2oQ==; In-Reply-To: (message from Helmut Eller on Sat, 09 Sep 2023 11:15:52 +0200) 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:269848 Archived-At: > From: Helmut Eller > Date: Sat, 09 Sep 2023 11:15:52 +0200 > > When the debugger is entered in a non-main thread, like so > > emacs -Q --eval '(make-thread (lambda() (debug)))' > > Then debugger-quit doesn't work as usual, instead it prints > > debugger-quit: No catch for tag: top-level, nil > > or it prints > > Back to top level > > but doesn't actually close the debugger window. > > Also, debugger-continue doesn't work as usual, instead it sometimes prints: > > debugger-continue: No catch for tag: exit, nil > > sometimes it prints: > > Continuing. > > without deleting the debugger window, sometimes it manages to leave the > debugger. > > If Emacs is started with "emacs -Q -nw" then the behaviour seems to be a > bit more uniform, but equally useless. Yes, error handling in non-main threads is generally rudimentary and barely useful. For example, if a thread signals an error, it simply silently exits and leaves the error form in a variable that can be accessed via thread-last-error. AFAIR, it is not trivial to improve the thread error handling significantly, but patches are welcome, of course.