|
From: | GNU bug Tracking System |
Subject: | bug#39408: closed (Breakpoints don't work with M-x gdb under TRAMP) |
Date: | Sat, 01 May 2021 10:00:05 +0000 |
Your message dated Sat, 01 May 2021 11:59:07 +0200 with message-id <87tunmai6s.fsf@gmx.de> and subject line Re: bug#39408: Breakpoints don't work with M-x gdb under TRAMP has caused the debbugs.gnu.org bug report #39408, regarding Breakpoints don't work with M-x gdb under TRAMP to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@gnu.org.) -- 39408: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39408 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems
--- Begin Message ---Subject: Breakpoints don't work with M-x gdb under TRAMP Date: Mon, 3 Feb 2020 21:07:05 +0200 *** Environment
- GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of
2019-09-23, modified by Debian
- The code looks identical on the relevant parts in Emacs git master
*** Steps to reproduce
1. Run emacs
$ emacs -q
2. Start remote debugging session
M-x gdb RET gdb -i=mi /ssh:vagrant@debug:/vagrant/hello
3. Set a breakpoint in *gud-hello* buffer
(gdb) break main
Breakpoint 1 at 0x1149: file hello.c, line 6.
4. Run the program to the breakpoint
(gdb) run
5. Switch back to source window
C-x b hello.c RET
6. Add another breakpoint
C-x C-a c-b
Emacs becomes unresponsive and the minibuffer is flooded with the
following error message:
~File /ssh:vagrant@debug:/vagrant/"/vagrant/hello.c" no longer exists!~*** Fix
1. Apply patch gdb-tramp-fix.diff
$ zcat /usr/share/emacs/26.1/lisp/progmodes/gdb-mi.el.gz >gdb-mi.el
$ zcat /usr/share/emacs/26.1/lisp/progmodes/gud.el.gz >gud.el
$ patch <gdb-tramp-fix.diff
2. run emacs with modified gdb-mi.el and gud.el
$ emacs -q -l el/gdb-mi.el -l el/gud.el
3. Setting breakpoints with C-x C-a C-b should work now
The changes in ~gdb-mi.el~ fix the problem with the "no longer exist"
error message.
The change in ~gud.el~ makes the fringe mark work a bit better and also
the source buffer to pop up when a break point is hit.
The problem seems to be that not all filename information goes through
(gdb-jsonify-buffer) but gdb-mi.el and gud.el read them directly from
gdb's buffers. These patches check wheter a gdb buffer is remote, and
wrap the file names accordingly.
There is probably a better way to fix the problem, but my knowledgeof gdb-mi.el is limited.
Relates to bug #23608.
*** Affected functions
(gdb-place-breakpoints)
(gdb-get-location)
(gdb-goto-breakpoint)
(gdb-frame-handler)
(gud-file-name)
*** References
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23608gdb-tramp-fix.diff
Description: Text Data
--- End Message ---
--- Begin Message ---Subject: Re: bug#39408: Breakpoints don't work with M-x gdb under TRAMP Date: Sat, 01 May 2021 11:59:07 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Version: 27.3 Jim Porter <jporterbugs@gmail.com> writes: > This is already fixed in Emacs 28 thanks to bug#44173 (a78c614), which > replaces the old GDB/MI parser (that converted the data to JSON first) > with a more-robust parser. Attached is a patch to fix this under Emacs > 27. > > The problem is that in `gdb-jsonify-buffer', when replacing the > "fullname" with a Tramp path, the wildcard was greedy, resulting in > only one "fullname" being replaced in the buffer. This had the effect > of rendering it impossible to have more than one breakpoint, as all > but the first breakpoint would have unmodified "fullname"s. Pushed to the emacs-27 branch. Closing the bug. Note: I don't know, whether there will be an Emacs 27.3. So the patch is pushed just in case of. Best regards, Michael.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |