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#69327: 29.2.50; Emacs crashes when running gdb with comint-prompt-read-only Date: Fri, 23 Feb 2024 17:41:16 +0200 Message-ID: <868r3b1943.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23395"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69327@debbugs.gnu.org To: Knut Anders Hatlen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 23 16:59:57 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 1rdXxs-0005pE-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Feb 2024 16:59:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdXxf-00063u-PZ; Fri, 23 Feb 2024 10:59:43 -0500 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 1rdXgB-0004U3-BW for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 10:41:39 -0500 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 1rdXgB-0005u8-32 for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 10:41:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdXgX-0001ek-P0 for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 10:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Feb 2024 15:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69327 X-GNU-PR-Package: emacs Original-Received: via spool by 69327-submit@debbugs.gnu.org id=B69327.17087029196351 (code B ref 69327); Fri, 23 Feb 2024 15:42:01 +0000 Original-Received: (at 69327) by debbugs.gnu.org; 23 Feb 2024 15:41:59 +0000 Original-Received: from localhost ([127.0.0.1]:48734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdXgR-0001eI-BK for submit@debbugs.gnu.org; Fri, 23 Feb 2024 10:41:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdXgL-0001do-G8 for 69327@debbugs.gnu.org; Fri, 23 Feb 2024 10:41:53 -0500 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 1rdXfr-0005tZ-UQ; Fri, 23 Feb 2024 10:41:19 -0500 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=tkx2wmJorMUvldAUEnA0yBgkTGvLPFKRJczI2IcIMus=; b=iel975BuoKr5 8MFtdiB9YxTM8u9AvjSzxavrAONcsUNk1gwVNp0wZIOmL1fjxXAj65/Eu/RxcAlHaYJ6s9Un09zVt FNdDN8Rg4VTYIb9Z81qgh/NFAiKAhhTug3K6M6P2+8mIkZN9yVtmq/VvAcbpVxY1WrQ+Gq9tsrKVo 4tZpHXlexE1BgSqqQhUoW2otkVP9eCDtO+zLCGvatg+YPB8lemgZpm66JtMVv4NB1p8+bkCb1UIbu phDK0R2aO7jYDlGyZxwiqM6g8HvkWqNIhzDdhgsvhSIXEXkHgaoAKE/zPgpxwzRDVhGSKt+15xBDO euAW9KMZnn98J0YuSaihaQ==; In-Reply-To: (message from Knut Anders Hatlen on Fri, 23 Feb 2024 10:12:25 +0000) 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:280501 Archived-At: > From: Knut Anders Hatlen > Date: Fri, 23 Feb 2024 10:12:25 +0000 > > Then run emacs -Q and evaluate: > > (progn > (setopt gdb-debuginfod-enable-setting nil > comint-prompt-read-only t) > (gdb "gdb -i=mi a.out") > (insert "r") > (comint-send-input) > (sit-for 2) > (gdb "gdb -i=mi b.out")) Does gdb-mi.el really support several debugging sessions in parallel? > According to git bisect, it has crashed since the > gdb-debuginfod-enable-setting option was introduced in: > > commit ab417c8a6eeb7df7ccce3e5f8416f48544a5174e > Author: Eli Zaretskii > Date: Tue Mar 7 14:39:27 2023 +0200 > > Fix problem with debuginfod queries in "M-x gdb" > > * lisp/progmodes/gdb-mi.el (gdb-debuginfod-enable-setting): New > defcustom. > (gdb-debuginfod-message): New function. > (gdb-init-1): Initialize gdb-debuginfod-enable. Ask the user > about debuginfod queries and display any error messages. > (Bug#61973) > > * etc/NEWS: Announce the change. Does replacing defvar with defvar-local for gdb-debuginfod-enable-setting helps to resolve the problem? If not, please tell what are the errors that Emacs wants to report, here: #10685 0x00005555557a971b in read_process_output_error_handler (error_val=) at ../../src/process.c:6140 #10686 0x000055555575462c in internal_condition_case_1 (bfun=bfun@entry=0x5555557a97a0 , arg=XIL(0x7fffef130093), handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555557a96e0 ) at ../../src/eval.c:1557 val = c = 0x555555ebab70 #10687 0x00005555557ac215 in read_and_dispose_of_process_output (coding=, nbytes=157, chars=0x7fffffffc420 "=cmd-param-changed,param=\"debuginfod enabled\",value=\"off\"\n~\"Reading symbols from b.out...\\n\"\n~\"(No debugging symbols found in b.out)\\n\"\n(gdb) \n1^done\n(gdb) \nater \\nTh"..., p=0x5555561b66f8) at ../../src/process.c:6354 and here: #10679 0x00005555557a971b in read_process_output_error_handler (error_val=) at ../../src/process.c:6140 #10680 0x000055555575462c in internal_condition_case_1 (bfun=bfun@entry=0x5555557a97a0 , arg=XIL(0x7fffef12d703), handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555557a96e0 ) at ../../src/eval.c:1557 val = c = 0x555555ebab70 #10681 0x00005555557ac215 in read_and_dispose_of_process_output (coding=, nbytes=14, chars=0x7fffffffae40 "1^done\n(gdb) \n", p=0x5555561b66f8) at ../../src/process.c:6354 I'm asking about the value of error_val with which read_process_output_error_handler is called in these two frames. It is possible that you will need to rebuild Emacs without optimizations, to be able to show these values. The error_val argument is a Lisp object, so please use the "pp" command to show it (if GDB says it doesn't know about "pp", you need to "source .gdbinit" where .gdbinit is the file that comes with the Emacs source tarball, in the 'src' directory). > When setting comint-prompt-read-only to nil, it seems to behave fine > regardless of which value gdb-debuginfod-enable-setting has. Why are you setting comint-prompt-read-only non-nil? Thanks.