[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud 3630fef 121/140: keep history in attaching comm
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud 3630fef 121/140: keep history in attaching command-buffers ... |
Date: |
Sat, 25 May 2019 19:35:47 -0400 (EDT) |
branch: externals/realgud
commit 3630fef6619f9f191a58308d9e0f04a52bde564a
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
keep history in attaching command-buffers ...
track.el: using breakpoint locate-file function marks breakpoint now
send.el: fix bug in handling %U
---
realgud/common/attach.el | 7 ++-
realgud/common/send.el | 2 +-
realgud/common/track.el | 131 +++++++++++++++++++++++++++++------------------
3 files changed, 85 insertions(+), 55 deletions(-)
diff --git a/realgud/common/attach.el b/realgud/common/attach.el
index fdd538d..957df80 100644
--- a/realgud/common/attach.el
+++ b/realgud/common/attach.el
@@ -29,7 +29,7 @@
(declare-function realgud-srcbuf-init-or-update 'realgud-source)
(declare-function realgud-short-key-mode-setup 'realgud-shortkey)
-;; (defvar realgud:attach-cmdbuf-history nil "minibuffer command buffer
history list'.")
+(defvar realgud:attach-cmdbuf-history nil "attach command buffer history
list'.")
;;;###autoload
@@ -61,8 +61,7 @@
(list
(completing-read "Choose a realgud command buffer: "
(realgud:attach-list-command-buffers) nil t nil
- nil nil)))
- ;; realgud:attach-cmdbuf-history (car-safe
realgud:attach-cmdbuf-history))))
+ 'realgud:attach-cmdbuf-history nil)))
(if (stringp cmdbuf) (setq cmdbuf (get-buffer cmdbuf)))
(let* ((srcbuf (current-buffer))
(shortkey-mode?))
@@ -72,7 +71,7 @@
(unless (get-buffer-process (current-buffer))
(warn "Can't find a process for command buffer %s" (current-buffer)))
(setq shortkey-mode? (realgud-sget 'cmdbuf-info 'src-shortkey?)))
- ;; (add-to-list 'realgud:attach-cmdbuf-history (buffer-name cmdbuf))
+ (add-to-list 'realgud:attach-cmdbuf-history (buffer-name cmdbuf))
(realgud-cmdbuf-add-srcbuf srcbuf)
(realgud-srcbuf-init-or-update srcbuf cmdbuf)
(if shortkey-mode? (realgud-short-key-mode-setup 't)))
diff --git a/realgud/common/send.el b/realgud/common/send.el
index f1c6659..a6fb4ed 100644
--- a/realgud/common/send.el
+++ b/realgud/common/send.el
@@ -205,7 +205,7 @@ taken from current buffer, or OPT-BUFFER if non-nil. Some
((eq key ?U)
(if (string-match src-file-name "^file://")
- (setq src-file-name (substring 7)))
+ (setq src-file-name (substring src-file-name 7)))
(or (and src-file-name (expand-file-name src-file-name))
"*source-file-not-found-for-%X"))
diff --git a/realgud/common/track.el b/realgud/common/track.el
index f158d84..63cafa4 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015-2018 Free Software Foundation, Inc
+;; Copyright (C) 2015-2019 Free Software Foundation, Inc
;; Author: Rocky Bernstein <address@hidden>
@@ -520,6 +520,7 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
(file-group (realgud-loc-pat-file-group loc-pat))
(line-group (realgud-loc-pat-line-group loc-pat))
(text-group (realgud-loc-pat-text-group loc-pat))
+ (column-group (realgud-loc-pat-column-group loc-pat))
(ignore-re-file-list (or opt-ignore-re-file-list
(realgud-sget 'cmdbuf-info
'ignore-re-file-list)))
(callback-loc-fn (realgud-sget 'cmdbuf-info 'callback-loc-fn))
@@ -535,67 +536,97 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
(line-str (match-string line-group text))
(source-str (and text-group (match-string
text-group text)))
(lineno (string-to-number (or line-str "1")))
+ (column-str (and column-group (match-string
column-group text)))
+ (column (string-to-number (or column-str "1")))
(directory
(cond ((boundp 'starting-directory)
starting-directory)
(t nil)))
)
(cond (callback-loc-fn
- (setq found-func (funcall callback-loc-fn text
+ (if (setq found-loc (funcall callback-loc-fn text
filename lineno
source-str
- cmd-mark directory))
- (setq loc-pat-list nil))
-
- ('t
+ cmd-mark directory
column))
+ ;; FIXME: dry with code in
realgud-track-bp-file-line
+ (let ((bp-list (realgud-sget 'cmdbuf-info
'bp-list))
+ srcbuf)
+
+ ;; Add src buffer mentioned and set it
possibly to go into shortkey mode
+ (setq srcbuf (realgud-loc-goto found-loc))
+ (realgud-cmdbuf-add-srcbuf srcbuf cmdbuf)
+ (realgud-srcbuf-init-or-update srcbuf
cmdbuf)
+ (with-current-buffer srcbuf
+ (realgud-short-key-mode-setup
+ (or realgud-short-key-on-tracing?
shortkey-mode?)
+ ))
+
+ ;; Add breakpoint to list of breakpoints
+ (with-current-buffer-safe (marker-buffer
(realgud-loc-marker found-loc))
+ (realgud-bp-add-info found-loc))
+
+ (unless (member found-loc bp-list)
+ (realgud-cmdbuf-info-bp-list= (cons
found-loc bp-list)))
+ )
+ (setq loc-pat-list nil)))
+ (t
(unless line-str
(message "line number not found -- using 1"))
- (if (and filename lineno)
- (let* ((directory
- (cond ((boundp 'starting-directory)
starting-directory)
- (t nil)))
- (srcbuf)
- (loc-or-error
- (realgud:file-loc-from-line
- filename lineno
- cmd-mark
- source-str
- (string-to-number bp-num)
- nil directory
- )))
- (if (stringp loc-or-error)
- (progn
- (message loc-or-error)
- ;; set to return nil
- (setq found-loc nil)
- (setq loc-pat-list nil))
- ;; else
- (let ((loc loc-or-error)
- (bp-list (realgud-sget
'cmdbuf-info 'bp-list)))
-
- ;; Add src buffer mentioned and set it
possibly to go into shortkey mode
- (setq srcbuf (realgud-loc-goto loc))
- (realgud-cmdbuf-add-srcbuf srcbuf
cmdbuf)
- (realgud-srcbuf-init-or-update srcbuf
cmdbuf)
- (with-current-buffer srcbuf
- (realgud-short-key-mode-setup
- (or realgud-short-key-on-tracing?
shortkey-mode?)
- ))
-
- ;; Add breakpoint to list of
breakpoints
- (with-current-buffer-safe
(marker-buffer (realgud-loc-marker loc))
-
(realgud-bp-add-info loc))
-
- (unless (member loc bp-list)
- (realgud-cmdbuf-info-bp-list= (cons
loc bp-list)))
-
- ;; Set to return location
- (setq found-loc loc-or-error)
- (setq loc-pat-list nil))
- )))
- )))
+ (if (setq found-loc
+ (realgud-track-bp-file-line cmd-mark
cmdbuf filename lineno source-str bp-num directory column shortkey-mode?))
+ (setq loc-pat-list nil)))
+
+ )
+ )
))))
found-loc)
+ )))
+
+(defun realgud-track-bp-file-line(cmd-mark cmdbuf filename lineno source-str
bp-num directory column shortkey-mode?)
+ (if (and filename lineno)
+ (let* ((directory
+ (cond ((boundp 'starting-directory) starting-directory)
+ (t nil)))
+ (srcbuf)
+ (found-loc nil)
+ (loc-or-error
+ (realgud:file-loc-from-line
+ filename lineno
+ cmd-mark
+ source-str
+ (string-to-number bp-num)
+ nil directory
+ )))
+ (if (stringp loc-or-error)
+ (progn
+ (message loc-or-error)
+ ;; set to return nil
+ (setq found-loc nil))
+ ;; else
+ (let ((loc loc-or-error)
+ (bp-list (realgud-sget 'cmdbuf-info 'bp-list)))
+
+ ;; Add src buffer mentioned and set it possibly to go into shortkey
mode
+ (setq srcbuf (realgud-loc-goto loc))
+ (realgud-cmdbuf-add-srcbuf srcbuf cmdbuf)
+ (realgud-srcbuf-init-or-update srcbuf cmdbuf)
+ (with-current-buffer srcbuf
+ (realgud-short-key-mode-setup
+ (or realgud-short-key-on-tracing? shortkey-mode?)
+ ))
+
+ ;; Add breakpoint to list of breakpoints
+ (with-current-buffer-safe (marker-buffer (realgud-loc-marker loc))
+ (realgud-bp-add-info loc))
+
+ (unless (member loc bp-list)
+ (realgud-cmdbuf-info-bp-list= (cons loc bp-list)))
+
+ ;; Set to return location
+ (setq found-loc loc-or-error)
+ ))
+ found-loc
)))
+
(defun realgud-track-bp-delete(text &optional cmd-mark cmdbuf
ignore-re-file-list)
"Do regular-expression matching to see if a breakpoint has been
deleted inside string TEXT. Return a list of breakpoint locations
- [elpa] externals/realgud 36782d6 108/140: Merge pull request #226 from Apteryks/master, (continued)
- [elpa] externals/realgud 36782d6 108/140: Merge pull request #226 from Apteryks/master, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 296a802 106/140: Hoist syntax-checking kbd command, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 4548392 100/140: Add alternate breakpoint match regexp..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud dd8909a 110/140: add key 'h' for cmd-until-here: continue until the current line, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud cf993af 114/140: change pdb to python -m pdb., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 565ac78 112/140: Adjust for v8 tracebacks inside a debugger console, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 2ae8fbf 111/140: Merge pull request #230 from cranechu/master, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud fa2d601 120/140: cl-seq -> cl-lib, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 5631fa2 115/140: Fix wiki links in README, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud a6783f5 129/140: Add breakpoint buffer tracking to source window, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 3630fef 121/140: keep history in attaching command-buffers ...,
Rocky Bernstein <=
- [elpa] externals/realgud 2a46513 134/140: Some small tweaks, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 2987c80 136/140: Compile linting, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 06d73e1 130/140: remake and gdb breakpoint buffers + add to menu, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 096bd87 088/140: Merge pull request #212 from realgud/filter-lists, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 4d9c31b 119/140: Improve realgud:attach-cmd-buffer..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 79c982d 124/140: Add a comment, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 0821db0 137/140: Get ready for release 1.4.6, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud c5d52ff 131/140: Add breakpoint-all regexps for most debuggers, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 7c0acdc 140/140: Another pass over function declarations, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 807c066 128/140: Initialize more debuggers with breakpoint buffer information, Rocky Bernstein, 2019/05/25