emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix M-x gdb when debugging over Tramp


From: Jim Porter
Subject: [PATCH] Fix M-x gdb when debugging over Tramp
Date: Wed, 7 Apr 2021 16:14:35 -0700

Here's a pair of patches (one against the latest git revision, and one against the emacs-27 branch) to fix debugging via M-x gdb over Tramp. There were two problems:

1) In `gdb-jsonify-buffer', when replacing the "fullname" with a Tramp path, the wildcard was greedy, resulting in only one "fullname" being replaced. 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. This fix isn't needed for Emacs 28, since `gdb-jsonify-buffer' was replaced with a more-accurate parser for GDB/MI.

2) In `gdb-frame-handler', `gdb-selected-file' needs to be the *local* file path, since that's what `gud-last-frame' expects. Without this, the overlay arrow for the current line in the source buffer won't show.

I've been running with these patches for a few months locally and haven't found any further issues. Note that I haven't filled out copyright assignment papers, but these patches are very small, so my understanding is that's not necessary. If you'd like me to fill them out, just let me know.

- Jim

Attachment: 0001-Emacs27-Fix-GDB-MI-usage-when-debugging-over-Tramp.patch
Description: Binary data

Attachment: 0001-Emacs28-Fix-GUD-overlay-arrows-in-gdb-mi-when-debugging-over.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]