diff options
| author | R. Bernstein <rocky@users.noreply.github.com> | 2026-04-11 18:16:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-11 18:16:42 -0400 |
| commit | 34a9065d1695c3b4bfbae076440397ad24bc8faf (patch) | |
| tree | 69f529ef80636faec6aed6ad71023b92b70e61bb | |
| parent | e391200705804aa035627672f5ae62d3c3113b16 (diff) | |
| parent | d89c93a50de153933e49b3cfb6c6d3ac8d330172 (diff) | |
Merge pull request #328 from pestctrl/fix-gdb-delete-bpexternals/realgud
Fix breakpoint tracking for gdb
| -rw-r--r-- | realgud/common/track.el | 9 | ||||
| -rw-r--r-- | realgud/debugger/gdb/gdb.el | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/realgud/common/track.el b/realgud/common/track.el index 1e0547c..76dcbd3 100644 --- a/realgud/common/track.el +++ b/realgud/common/track.el @@ -687,8 +687,7 @@ of the breakpoints found in command buffer." (bp-num-strs (split-string bp-nums-str "[^0-9]+" t)) (bp-nums (mapcar #'string-to-number bp-num-strs)) (info realgud-cmdbuf-info) - (all-bps (realgud-cmdbuf-info-bp-list info)) - (found-locs nil)) + (all-bps (realgud-cmdbuf-info-bp-list info))) (dolist (loc all-bps) (when (memq (realgud-loc-num loc) bp-nums) (push loc found-locs) @@ -696,9 +695,9 @@ of the breakpoints found in command buffer." (realgud-cmdbuf-info-bp-list= (remove loc (realgud-cmdbuf-info-bp-list info))))) (setq current-pos (match-end 0)))) - ;; Match-end returns 0 when the whole string was matched. - ;; Setting current-pos to nil exits the loop - (if (= current-pos 0) (setq current-pos nil)) + ;; Match-end returns 0 when the whole string was matched. + ;; Setting current-pos to nil exits the loop + (if (= current-pos 0) (setq current-pos nil)) ;; return the locations found-locs)))))) diff --git a/realgud/debugger/gdb/gdb.el b/realgud/debugger/gdb/gdb.el index c3eb111..7f442ea 100644 --- a/realgud/debugger/gdb/gdb.el +++ b/realgud/debugger/gdb/gdb.el @@ -66,7 +66,7 @@ This should be an executable on your path, or an absolute file name." "set filename-display absolute" ;; gdb doesn't print a confirmation that a breakpoint was deleted successfully by default. ;; This event listener adds a status message for every deleted breakpoint. - (realgud-command "python gdb.events.breakpoint_deleted.connect(lambda b: print(f\"Deleted breakpoint {b.number}\"))" nil nil nil) + "python gdb.events.breakpoint_deleted.connect(lambda b: print(f\"Deleted breakpoint {b.number}\"))" ) "List of commands to be executed right after command buffer setup.") |
