unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
@ 2024-12-02  7:04 Diancheng Wang
  2024-12-02 13:17 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Diancheng Wang @ 2024-12-02  7:04 UTC (permalink / raw)
  To: 74642

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: hide-current-line-indicator-kill-buffer.patch --]
[-- Type: text/x-diff, Size: 1041 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index b60e21ff0ae..110b9f5ed46 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -5278,6 +5278,7 @@ gdb-reset
               (setq gud-minor-mode nil)
               (kill-local-variable 'tool-bar-map)
               (kill-local-variable 'gdb-define-alist))))))
+  (gud-hide-current-line-indicator t)
   (setq gdb-disassembly-position nil)
   (setq overlay-arrow-variable-list
         (delq 'gdb-disassembly-position overlay-arrow-variable-list))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a4e611277e4..ffd4dd70762 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3017,7 +3017,8 @@ gud-reset
       (with-current-buffer buffer
 	(when gud-minor-mode
 	  (setq gud-minor-mode nil)
-	  (kill-local-variable 'tool-bar-map))))))
+	  (kill-local-variable 'tool-bar-map)))))
+    (gud-hide-current-line-indicator t))
 
 (defun gud-display-frame ()
   "Find and obey the last filename-and-line marker from the debugger.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-02  7:04 bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed Diancheng Wang
@ 2024-12-02 13:17 ` Eli Zaretskii
  2024-12-03  2:04   ` Diancheng Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-12-02 13:17 UTC (permalink / raw)
  To: Diancheng Wang; +Cc: 74642

> From: Diancheng Wang <diancheng_wang@163.com>
> Date: Mon, 02 Dec 2024 15:04:46 +0800
> 
> diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
> index b60e21ff0ae..110b9f5ed46 100644
> --- a/lisp/progmodes/gdb-mi.el
> +++ b/lisp/progmodes/gdb-mi.el
> @@ -5278,6 +5278,7 @@ gdb-reset
>                (setq gud-minor-mode nil)
>                (kill-local-variable 'tool-bar-map)
>                (kill-local-variable 'gdb-define-alist))))))
> +  (gud-hide-current-line-indicator t)
>    (setq gdb-disassembly-position nil)
>    (setq overlay-arrow-variable-list
>          (delq 'gdb-disassembly-position overlay-arrow-variable-list))
> diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
> index a4e611277e4..ffd4dd70762 100644
> --- a/lisp/progmodes/gud.el
> +++ b/lisp/progmodes/gud.el
> @@ -3017,7 +3017,8 @@ gud-reset
>        (with-current-buffer buffer
>  	(when gud-minor-mode
>  	  (setq gud-minor-mode nil)
> -	  (kill-local-variable 'tool-bar-map))))))
> +	  (kill-local-variable 'tool-bar-map)))))
> +    (gud-hide-current-line-indicator t))
>  
>  (defun gud-display-frame ()
>    "Find and obey the last filename-and-line marker from the debugger.

Thanks, but can you please describe the scenario in which the
indicator is not removed?  I guess I don't really understand what you
mean by "gdb buffer is killed": what I tried is simply end the
debugging session by typing "q RET" at the GDB prompt.  And that
removed the indicator.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-02 13:17 ` Eli Zaretskii
@ 2024-12-03  2:04   ` Diancheng Wang
  2024-12-03 12:32     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Diancheng Wang @ 2024-12-03  2:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 74642

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Diancheng Wang <diancheng_wang@163.com>
>> Date: Mon, 02 Dec 2024 15:04:46 +0800
>> 
>> diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
>> index b60e21ff0ae..110b9f5ed46 100644
>> --- a/lisp/progmodes/gdb-mi.el
>> +++ b/lisp/progmodes/gdb-mi.el
>> @@ -5278,6 +5278,7 @@ gdb-reset
>>                (setq gud-minor-mode nil)
>>                (kill-local-variable 'tool-bar-map)
>>                (kill-local-variable 'gdb-define-alist))))))
>> +  (gud-hide-current-line-indicator t)
>>    (setq gdb-disassembly-position nil)
>>    (setq overlay-arrow-variable-list
>>          (delq 'gdb-disassembly-position overlay-arrow-variable-list))
>> diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
>> index a4e611277e4..ffd4dd70762 100644
>> --- a/lisp/progmodes/gud.el
>> +++ b/lisp/progmodes/gud.el
>> @@ -3017,7 +3017,8 @@ gud-reset
>>        (with-current-buffer buffer
>>  	(when gud-minor-mode
>>  	  (setq gud-minor-mode nil)
>> -	  (kill-local-variable 'tool-bar-map))))))
>> +	  (kill-local-variable 'tool-bar-map)))))
>> +    (gud-hide-current-line-indicator t))
>>  
>>  (defun gud-display-frame ()
>>    "Find and obey the last filename-and-line marker from the debugger.
>
> Thanks, but can you please describe the scenario in which the
> indicator is not removed?  I guess I don't really understand what you
> mean by "gdb buffer is killed": what I tried is simply end the
> debugging session by typing "q RET" at the GDB prompt.  And that
> removed the indicator.

Hi,

Sorry for confusing. I mean killing GDB interactive buffer directly by
typing "C-k RET" when gdb is stopped on a source line. The indicator is
not removed.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-03  2:04   ` Diancheng Wang
@ 2024-12-03 12:32     ` Eli Zaretskii
  2024-12-04  8:22       ` Diancheng Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-12-03 12:32 UTC (permalink / raw)
  To: Diancheng Wang; +Cc: 74642

> From: Diancheng Wang <diancheng_wang@163.com>
> Cc: 74642@debbugs.gnu.org
> Date: Tue, 03 Dec 2024 10:04:30 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Thanks, but can you please describe the scenario in which the
> > indicator is not removed?  I guess I don't really understand what you
> > mean by "gdb buffer is killed": what I tried is simply end the
> > debugging session by typing "q RET" at the GDB prompt.  And that
> > removed the indicator.
> 
> Hi,
> 
> Sorry for confusing. I mean killing GDB interactive buffer directly by
> typing "C-k RET" when gdb is stopped on a source line. The indicator is
> not removed.

I guess you mean "C-x k RET"?

When I do that, Emacs asks me whether to kill the process associated
with the buffer, and if I say YES, the indicator does disappear
(sometimes after a second, which I guess is needed for Emacs to kill
the process).  Isn't that what you see?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-03 12:32     ` Eli Zaretskii
@ 2024-12-04  8:22       ` Diancheng Wang
  2024-12-04 13:41         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Diancheng Wang @ 2024-12-04  8:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 74642

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Diancheng Wang <diancheng_wang@163.com>
>> Cc: 74642@debbugs.gnu.org
>> Date: Tue, 03 Dec 2024 10:04:30 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Thanks, but can you please describe the scenario in which the
>> > indicator is not removed?  I guess I don't really understand what you
>> > mean by "gdb buffer is killed": what I tried is simply end the
>> > debugging session by typing "q RET" at the GDB prompt.  And that
>> > removed the indicator.
>> 
>> Hi,
>> 
>> Sorry for confusing. I mean killing GDB interactive buffer directly by
>> typing "C-k RET" when gdb is stopped on a source line. The indicator is
>> not removed.
>
> I guess you mean "C-x k RET"?

Yes, I mean "C-x k RET"

>
> When I do that, Emacs asks me whether to kill the process associated
> with the buffer, and if I say YES, the indicator does disappear

Yes, the steps are same with me.

> (sometimes after a second, which I guess is needed for Emacs to kill
> the process).  Isn't that what you see?

No, the indicator does not disappear after I killed "*gud-myprogram*" buffer.
By the way I started emacs using "emacs -Q". The attachment is my
running emacs information (the buffer content created by
report-emacs-bug)


[-- Attachment #2: emacs-info --]
[-- Type: application/octet-stream, Size: 3437 bytes --]





In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw3d scroll bars) of 2024-12-04 built on h4
Repository revision: d706be4b345f3e2d242c4f2ffb5e566845b2935d
Repository branch: master
System Description: TencentOS Server 3.2 (Final)

Configured using:
 'configure --with-native-compilation=yes --with-x-toolkit=lucid
 CC=/opt/rh/gcc-toolset-12/root/usr/bin/gcc
 CXX=/opt/rh/gcc-toolset-12/root/usr/bin/g++
 PKG_CONFIG_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11
XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cl-extra help-mode vc-git
diff-mode track-changes easy-mmode vc-dispatcher cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
files-x gdb-mi bindat cl-seq cl-loaddefs cl-lib gud compile
text-property-search comint subr-x ansi-osc ansi-color ring comp-run
comp-common rx term/xterm xterm byte-opt gv bytecomp byte-compile rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 176491 15021) (symbols 48 10668 0) (strings 32 47780 2626)
 (string-bytes 1 2900170) (vectors 16 22324)
 (vector-slots 8 222188 8765) (floats 8 53 15740)
 (intervals 56 2844 21) (buffers 984 19))

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-04  8:22       ` Diancheng Wang
@ 2024-12-04 13:41         ` Eli Zaretskii
  2024-12-04 19:11           ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-12-04 13:41 UTC (permalink / raw)
  To: Diancheng Wang; +Cc: 74642

> From: Diancheng Wang <diancheng_wang@163.com>
> Cc: 74642@debbugs.gnu.org
> Date: Wed, 04 Dec 2024 16:22:51 +0800
> 
> > I guess you mean "C-x k RET"?
> 
> Yes, I mean "C-x k RET"
> 
> >
> > When I do that, Emacs asks me whether to kill the process associated
> > with the buffer, and if I say YES, the indicator does disappear
> 
> Yes, the steps are same with me.
> 
> > (sometimes after a second, which I guess is needed for Emacs to kill
> > the process).  Isn't that what you see?
> 
> No, the indicator does not disappear after I killed "*gud-myprogram*" buffer.
> By the way I started emacs using "emacs -Q".

So did I.

> The attachment is my running emacs information (the buffer content
> created by report-emacs-bug)

Looks like some kind of regression in Emacs 31.  It works in Emacs 30.
If you could bisect to find the offending commit, it will be
appreciated.

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-04 13:41         ` Eli Zaretskii
@ 2024-12-04 19:11           ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2024-12-04 19:11 UTC (permalink / raw)
  To: diancheng_wang; +Cc: 74642

> Cc: 74642@debbugs.gnu.org
> Date: Wed, 04 Dec 2024 15:41:18 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Diancheng Wang <diancheng_wang@163.com>
> > Cc: 74642@debbugs.gnu.org
> > Date: Wed, 04 Dec 2024 16:22:51 +0800
> > 
> > > I guess you mean "C-x k RET"?
> > 
> > Yes, I mean "C-x k RET"
> > 
> > >
> > > When I do that, Emacs asks me whether to kill the process associated
> > > with the buffer, and if I say YES, the indicator does disappear
> > 
> > Yes, the steps are same with me.
> > 
> > > (sometimes after a second, which I guess is needed for Emacs to kill
> > > the process).  Isn't that what you see?
> > 
> > No, the indicator does not disappear after I killed "*gud-myprogram*" buffer.
> > By the way I started emacs using "emacs -Q".
> 
> So did I.
> 
> > The attachment is my running emacs information (the buffer content
> > created by report-emacs-bug)
> 
> Looks like some kind of regression in Emacs 31.  It works in Emacs 30.
> If you could bisect to find the offending commit, it will be
> appreciated.

Crystal ball says that the regression was caused by the change you
submitted (and I installed) in bug#73687.  It added a call to
gud-hide-current-line-indicator to gdb-starting and to gud-sentinel.
Could you try reverting those changes and see if that solves the
problem in Emacs 31?





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-12-04 19:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02  7:04 bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed Diancheng Wang
2024-12-02 13:17 ` Eli Zaretskii
2024-12-03  2:04   ` Diancheng Wang
2024-12-03 12:32     ` Eli Zaretskii
2024-12-04  8:22       ` Diancheng Wang
2024-12-04 13:41         ` Eli Zaretskii
2024-12-04 19:11           ` Eli Zaretskii

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).