unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Knut Anders Hatlen <knut.hatlen@oracle.com>
Cc: 69327@debbugs.gnu.org
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	[thread overview]
Message-ID: <868r3b1943.fsf@gnu.org> (raw)
In-Reply-To: <wjo88r3bpk1b.fsf@oracle.com> (message from Knut Anders Hatlen on Fri, 23 Feb 2024 10:12:25 +0000)

> From: Knut Anders Hatlen <knut.hatlen@oracle.com>
> 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 <eliz@gnu.org>
> 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=<optimized out>) at ../../src/process.c:6140
  #10686 0x000055555575462c in internal_condition_case_1 (bfun=bfun@entry=0x5555557a97a0 <read_process_output_call>, arg=XIL(0x7fffef130093), handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555557a96e0 <read_process_output_error_handler>) at ../../src/eval.c:1557
	  val = <optimized out>
	  c = 0x555555ebab70
  #10687 0x00005555557ac215 in read_and_dispose_of_process_output (coding=<optimized out>, 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 <http://gnu.org/licenses/gpl.html>\\nTh"..., p=0x5555561b66f8) at ../../src/process.c:6354

and here:

  #10679 0x00005555557a971b in read_process_output_error_handler (error_val=<optimized out>) at ../../src/process.c:6140
  #10680 0x000055555575462c in internal_condition_case_1 (bfun=bfun@entry=0x5555557a97a0 <read_process_output_call>, arg=XIL(0x7fffef12d703), handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555557a96e0 <read_process_output_error_handler>) at ../../src/eval.c:1557
	  val = <optimized out>
	  c = 0x555555ebab70
  #10681 0x00005555557ac215 in read_and_dispose_of_process_output (coding=<optimized out>, 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.





       reply	other threads:[~2024-02-23 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <wjo88r3bpk1b.fsf@oracle.com>
2024-02-23 15:41 ` Eli Zaretskii [this message]
2024-02-23 20:16   ` bug#69327: 29.2.50; Emacs crashes when running gdb with comint-prompt-read-only Knut Anders Hatlen
2024-02-24  8:40     ` Eli Zaretskii
2024-02-24 12:41       ` Knut Anders Hatlen
2024-02-24 13:14         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868r3b1943.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69327@debbugs.gnu.org \
    --cc=knut.hatlen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).