GNU bug report logs - #79403
30.1; M-x gdb startup problem with (eq gdb-debuginfod-enable-setting 'ask)

Previous Next

Package: emacs;

Reported by: Gustav HÃ¥llberg <gustav <at> gmail.com>

Date: Sun, 7 Sep 2025 15:18:01 UTC

Severity: normal

Found in version 30.1

Full log


View this message in rfc822 format

From: Gustav HÃ¥llberg <gustav <at> gmail.com>
To: 79403 <at> debbugs.gnu.org
Subject: bug#79403: 30.1; M-x gdb startup problem with (eq gdb-debuginfod-enable-setting 'ask)
Date: Sun, 7 Sep 2025 17:16:41 +0200
[Message part 1 (text/plain, inline)]
If gdb-debuginfod-enable-setting is set to 'ask, gdb-init-1 may be called
recursively, causing gdb-token-number (and other variables) to be reset in
the middle of startup.

This causes an "gdb-handle-reply: Wrong type argument: gdb-handler, nil"
error message and other "strange" behavior.

It triggers every time for me when attaching gdb to a running process:
"emacs -nw -q" and M-x gdb, "gdb -i=mi -p <some-pid>". I only tested it
with emacs 30.1 but the code seems to be the same at origin/master.

If you insert (when (> gdb-token-number 0) (edebug)) in the begining of
(gdb-init-1) you'll see what happens. Partial call trace:

  gdb-init-1()
   :
  gdb-update()
   :
  gdb-stopped(...)
   :
  gud-filter(...)
  read-from-minibuffer(...)
  y-or-n-p("Enable querying debuginfod servers for this session?")
   :
  gdb-init-1()
   :
  gdb-update()
  gdb("gdb -i=mi -p ...")

I don't know what the right fix is, but it doesn't seem right to wait for
user input in the middle of gdb-init-1.
[Message part 2 (text/html, inline)]

This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.