branch: master
commit 905216f843747e5bd9215aeb60e378eaf19d855d
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Bp tracking respects custom filename lookup ...
* track.el: use callback-loc-fn in realgud-track-bp-loc
* jdb/core.el: remove gud reference
* jdb/core.el: remove gud reference
* trepanjs.el: typo
---
realgud/common/track.el | 61 +++++++++++++++++++----------------
realgud/common/utils.el | 2 +-
realgud/debugger/jdb/core.el | 2 --
realgud/debugger/trepanjs/trepanjs.el | 2 +-
4 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/realgud/common/track.el b/realgud/common/track.el
index badb83f..f4e34b5 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -468,6 +468,7 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
(line-group (realgud-loc-pat-line-group loc-pat))
(text-group (realgud-loc-pat-text-group loc-pat))
(ignore-file-re (realgud-loc-pat-ignore-file-re loc-pat))
+ (callback-loc-fn (realgud-sget 'cmdbuf-info
'callback-loc-fn))
)
(if loc-regexp
(if (string-match loc-regexp text)
@@ -477,33 +478,39 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
(source-str (and text-group (match-string
text-group text)))
(lineno (string-to-number (or line-str "1")))
)
- (unless line-str
- (message "line number not found -- using 1"))
- (if (and filename lineno)
- (let* ((directory
- (cond ((boundp 'starting-directory)
starting-directory)
- (t nil)))
- (loc-or-error
- (realgud:file-loc-from-line
- filename lineno
- cmd-mark
- source-str
- (string-to-number bp-num)
- ignore-file-re nil directory
- )))
- (if (stringp loc-or-error)
- (progn
- (message loc-or-error)
- ;; set to return nil
- nil)
- ;; else
- (progn
- ;; Add breakpoint to list of breakpoints
- (realgud-cmdbuf-info-bp-list=
- (cons loc-or-error (realgud-sget
'cmdbuf-info 'bp-list)))
- ;; Set to return location
- loc-or-error)))
- nil)))
+ (cond (callback-loc-fn
+ (funcall callback-loc-fn text
+ filename lineno source-str
+ ignore-file-re cmd-mark))
+
+ ('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)))
+ (loc-or-error
+ (realgud:file-loc-from-line
+ filename lineno
+ cmd-mark
+ source-str
+ (string-to-number bp-num)
+ ignore-file-re nil directory
+ )))
+ (if (stringp loc-or-error)
+ (progn
+ (message loc-or-error)
+ ;; set to return nil
+ nil)
+ ;; else
+ (progn
+ ;; Add breakpoint to list of
breakpoints
+ (realgud-cmdbuf-info-bp-list=
+ (cons loc-or-error (realgud-sget
'cmdbuf-info 'bp-list)))
+ ;; Set to return location
+ loc-or-error))))
+ nil))))
nil))
nil))
)
diff --git a/realgud/common/utils.el b/realgud/common/utils.el
index f74d605..bc2eee0 100644
--- a/realgud/common/utils.el
+++ b/realgud/common/utils.el
@@ -50,7 +50,7 @@ prompts and interactive output with"
(add-to-list
'comint-preoutput-filter-functions
(lambda (output)
- (replace-regexp-in-string "\033\\[[0-9]+[GKJhl]" "" output)))
+ (replace-regexp-in-string "\033\\[[0-9]*[GKJhl]" "" output)))
)
diff --git a/realgud/debugger/jdb/core.el b/realgud/debugger/jdb/core.el
index 9199c23..34064e1 100644
--- a/realgud/debugger/jdb/core.el
+++ b/realgud/debugger/jdb/core.el
@@ -20,8 +20,6 @@
"realgud-")
(require-relative-list '("init") "realgud:jdb-")
-(declare-function gud-find-source 'gud)
-
(declare-function realgud:strip 'realgud-utils)
(declare-function realgud:expand-file-name-if-exists 'realgud-core)
(declare-function realgud-parse-command-arg 'realgud-core)
diff --git a/realgud/debugger/trepanjs/trepanjs.el
b/realgud/debugger/trepanjs/trepanjs.el
index ed2d033..3299c7c 100644
--- a/realgud/debugger/trepanjs/trepanjs.el
+++ b/realgud/debugger/trepanjs/trepanjs.el
@@ -26,7 +26,7 @@
(declare-function realgud:trepanjs-query-cmdline 'realgud:trepanjs-core)
(declare-function realgud:trepanjs-parse-cmd-args 'realgud:trepanjs-core)
-(declare-function realgud:-remove-ansi-schmutz 'realgud-utils)
+(declare-function realgud:remove-ansi-schmutz 'realgud-utils)
(declare-function realgud:run-debugger 'realgud:run)
;; This is needed, or at least the docstring part of it is needed to