GNU bug report logs - #70573
30.0.50; Setting gud-gud-lldb-command-name does not take effect

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Thu, 25 Apr 2024 17:58:09 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70573 in the body.
You can then email your comments to 70573 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Thu, 25 Apr 2024 17:58:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerd Möllmann <gerd.moellmann <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 25 Apr 2024 17:58:11 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Setting gud-gud-lldb-command-name does not take effect
Date: Thu, 25 Apr 2024 19:56:12 +0200
1. emacs -Q
2. (setq gud-gud-lldb-command-name "hansi")
3. M-x lldb RET

The new command name "hansi" is not used when prompting the user.

In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.4.0, NS
 appkit-2487.50 Version 14.4.1 (Build 23E224)) of 2024-04-23 built on
 pro2.fritz.box




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Thu, 25 Apr 2024 19:03:13 GMT) Full text and rfc822 format available.

Message #8 received at 70573 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 70573 <at> debbugs.gnu.org
Subject: Re: bug#70573: 30.0.50;
 Setting gud-gud-lldb-command-name does not take effect
Date: Thu, 25 Apr 2024 22:01:38 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Date: Thu, 25 Apr 2024 19:56:12 +0200
> 
> 
> 1. emacs -Q
> 2. (setq gud-gud-lldb-command-name "hansi")
> 3. M-x lldb RET
> 
> The new command name "hansi" is not used when prompting the user.

It looks like this part:

  (interactive (list (gud-query-cmdline 'lldb)))

is the culprit: the minor-mode, which is the argument to
gud-query-cmdline, should be 'gud-lldb, not 'lldb.  Here's my
evidence:

  (when (and gud-comint-buffer
	     (buffer-name gud-comint-buffer)
	     (get-buffer-process gud-comint-buffer)
	     (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gud-lldb)))

Btw, this line seems also to be confused wrt the name of
gud-minor-mode:

  (setq-local gud-minor-mode 'lldb)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Thu, 25 Apr 2024 19:27:09 GMT) Full text and rfc822 format available.

Message #11 received at 70573 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70573 <at> debbugs.gnu.org
Subject: Re: bug#70573: 30.0.50; Setting gud-gud-lldb-command-name does not
 take effect
Date: Thu, 25 Apr 2024 21:25:48 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Date: Thu, 25 Apr 2024 19:56:12 +0200
>> 
>> 
>> 1. emacs -Q
>> 2. (setq gud-gud-lldb-command-name "hansi")
>> 3. M-x lldb RET
>> 
>> The new command name "hansi" is not used when prompting the user.
>
> It looks like this part:
>
>   (interactive (list (gud-query-cmdline 'lldb)))
>
> is the culprit: the minor-mode, which is the argument to
> gud-query-cmdline, should be 'gud-lldb, not 'lldb.  Here's my
> evidence:
>
>   (when (and gud-comint-buffer
> 	     (buffer-name gud-comint-buffer)
> 	     (get-buffer-process gud-comint-buffer)
> 	     (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gud-lldb)))
>
> Btw, this line seems also to be confused wrt the name of
> gud-minor-mode:
>
>   (setq-local gud-minor-mode 'lldb)

I'm currently seriously confused by gud.el, I'm afraid. And I was
already confused when I tried to mimic gud-gdb here, which does

  (interactive (list (gud-query-cmdline 'gud-gdb)))

  (when (and gud-comint-buffer
	   (buffer-name gud-comint-buffer)
	   (get-buffer-process gud-comint-buffer)
	   (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdbmi)))
    (gdb-restore-windows)
    (error
     "Multiple debugging requires restarting in text command mode"))

  (gud-common-init command-line nil 'gud-gdb-marker-filter)
  (setq-local gud-minor-mode 'gdb)

Would you agree that the interactive form should use gud-lldb, but that
the setq-local is right? The setq-local is gud-gdb uses gdb, not
gud-gdb. Or am I confusing myself here?

(Sorry, it's probably too late in the evening for me, or I have compiled
too many LLVM versions today, or whatever.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Fri, 26 Apr 2024 06:30:08 GMT) Full text and rfc822 format available.

Message #14 received at 70573 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 70573 <at> debbugs.gnu.org
Subject: Re: bug#70573: 30.0.50; Setting gud-gud-lldb-command-name does not
 take effect
Date: Fri, 26 Apr 2024 09:29:21 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Cc: 70573 <at> debbugs.gnu.org
> Date: Thu, 25 Apr 2024 21:25:48 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > It looks like this part:
> >
> >   (interactive (list (gud-query-cmdline 'lldb)))
> >
> > is the culprit: the minor-mode, which is the argument to
> > gud-query-cmdline, should be 'gud-lldb, not 'lldb.  Here's my
> > evidence:
> >
> >   (when (and gud-comint-buffer
> > 	     (buffer-name gud-comint-buffer)
> > 	     (get-buffer-process gud-comint-buffer)
> > 	     (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gud-lldb)))
> >
> > Btw, this line seems also to be confused wrt the name of
> > gud-minor-mode:
> >
> >   (setq-local gud-minor-mode 'lldb)
> 
> I'm currently seriously confused by gud.el, I'm afraid. And I was
> already confused when I tried to mimic gud-gdb here, which does
> 
>   (interactive (list (gud-query-cmdline 'gud-gdb)))
> 
>   (when (and gud-comint-buffer
> 	   (buffer-name gud-comint-buffer)
> 	   (get-buffer-process gud-comint-buffer)
> 	   (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdbmi)))
>     (gdb-restore-windows)
>     (error
>      "Multiple debugging requires restarting in text command mode"))
> 
>   (gud-common-init command-line nil 'gud-gdb-marker-filter)
>   (setq-local gud-minor-mode 'gdb)

I don't think the complications of GDB should concern you.  AFAIU, the
above tries to handle the tricky situation where we have 2 GDB minor
modes: gdbmi and gud-gdb.  There's no such problem with LLDB, AFAIU.

So I think you should copy-cat the other minor modes, like gud-pdb,
which don't have these complications.

> Would you agree that the interactive form should use gud-lldb, but that
> the setq-local is right? The setq-local is gud-gdb uses gdb, not
> gud-gdb. Or am I confusing myself here?

I think both should use gud-lldb, at least that's my understanding.
Look at gud-query-cmdline, gud-val, and gud-symbol, and you will see
that they encode the command name as gud-MINORMODE-SYMBOL, where
SYMBOL is "command-name" in this case.  So if the command name's
symbol is gud-gud-lldb-command-name, then MINORMODE must be gud-lldb,
for this stuff to work.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Fri, 26 Apr 2024 06:45:03 GMT) Full text and rfc822 format available.

Message #17 received at 70573 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70573 <at> debbugs.gnu.org
Subject: Re: bug#70573: 30.0.50; Setting gud-gud-lldb-command-name does not
 take effect
Date: Fri, 26 Apr 2024 08:43:39 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Would you agree that the interactive form should use gud-lldb, but that
>> the setq-local is right? The setq-local is gud-gdb uses gdb, not
>> gud-gdb. Or am I confusing myself here?
>
> I think both should use gud-lldb, at least that's my understanding.
> Look at gud-query-cmdline, gud-val, and gud-symbol, and you will see
> that they encode the command name as gud-MINORMODE-SYMBOL, where
> SYMBOL is "command-name" in this case.  So if the command name's
> symbol is gud-gud-lldb-command-name, then MINORMODE must be gud-lldb,
> for this stuff to work.

Thanks. I'll try to come up with something later today.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70573; Package emacs. (Fri, 26 Apr 2024 10:32:03 GMT) Full text and rfc822 format available.

Message #20 received at 70573 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70573 <at> debbugs.gnu.org
Subject: Re: bug#70573: 30.0.50; Setting gud-gud-lldb-command-name does not
 take effect
Date: Fri, 26 Apr 2024 12:30:40 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Would you agree that the interactive form should use gud-lldb, but that
>>> the setq-local is right? The setq-local is gud-gdb uses gdb, not
>>> gud-gdb. Or am I confusing myself here?
>>
>> I think both should use gud-lldb, at least that's my understanding.
>> Look at gud-query-cmdline, gud-val, and gud-symbol, and you will see
>> that they encode the command name as gud-MINORMODE-SYMBOL, where
>> SYMBOL is "command-name" in this case.  So if the command name's
>> symbol is gud-gud-lldb-command-name, then MINORMODE must be gud-lldb,
>> for this stuff to work.
>
> Thanks. I'll try to come up with something later today.

Pushed a fix to master, and closing. I forgot to add the bug# to the
commit message, though, sorry.

What a wonderful confusion of mine :-/.




bug marked as fixed in version 30.1, send any further explanations to 70573 <at> debbugs.gnu.org and Gerd Möllmann <gerd.moellmann <at> gmail.com> Request was from Gerd Möllmann <gerd.moellmann <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 26 Apr 2024 10:32:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 May 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 8 days ago.

Previous Next


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