[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud f41b7a7 017/140: When a breakpoint is seen, ad
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud f41b7a7 017/140: When a breakpoint is seen, add source... |
Date: |
Sat, 25 May 2019 19:35:22 -0400 (EDT) |
branch: externals/realgud
commit f41b7a7f8eac0be5c4d8780af1d461f9e51e9cad
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
When a breakpoint is seen, add source...
to list of source buffers seen. May also go into track mode.
gdb/core.el: simple typo
---
realgud/common/track.el | 130 +++++++++++++++++++++++--------------------
realgud/debugger/gdb/core.el | 2 +-
2 files changed, 72 insertions(+), 60 deletions(-)
diff --git a/realgud/common/track.el b/realgud/common/track.el
index 804c45d..f75efe9 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -41,6 +41,7 @@
:type 'symbolp
:group 'realgud)
+(declare-function buffer-killed? 'realgud-helper)
(declare-function fn-p-to-fn?-alias 'realgud-helper)
(declare-function realgud-bp-add-info 'realgud-bp)
(declare-function realgud-bp-del-info 'realgud-bp)
@@ -460,68 +461,79 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
(setq cmdbuf (or cmdbuf (current-buffer)))
(with-current-buffer cmdbuf
(unless (realgud:track-complain-if-not-in-cmd-buffer cmdbuf t)
- (let* ((loc-pat (realgud-cmdbuf-pat "brkpt-set")))
- (if loc-pat
- (let ((bp-num-group (realgud-loc-pat-num loc-pat))
- (loc-regexp (realgud-loc-pat-regexp loc-pat))
- (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))
- (ignore-file-re (realgud-loc-pat-ignore-file-re loc-pat))
- (callback-loc-fn (realgud-sget 'cmdbuf-info
'callback-loc-fn))
+ (let* ((loc-pat (realgud-cmdbuf-pat "brkpt-set"))
+ (shortkey-mode? (realgud-sget 'cmdbuf-info 'src-shortkey?)))
+ (if loc-pat
+ (let ((bp-num-group (realgud-loc-pat-num loc-pat))
+ (loc-regexp (realgud-loc-pat-regexp loc-pat))
+ (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))
+ (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)
- (let* ((bp-num (match-string bp-num-group text))
- (filename (match-string file-group text))
- (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")))
- )
- (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
- (let ((loc loc-or-error)
- (bp-list (realgud-sget
'cmdbuf-info 'bp-list)))
-
- ;; 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
- loc-or-error))))
- nil))))
- nil))
- nil))
+ (if loc-regexp
+ (if (string-match loc-regexp text)
+ (let* ((bp-num (match-string bp-num-group text))
+ (filename (match-string file-group text))
+ (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")))
+ )
+ (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)))
+ (srcbuf)
+ (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
+ (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
+ loc-or-error))))
+ nil))))
+ nil))
+ nil))
)
)
-)
+ )
(defun realgud-track-bp-delete(text &optional cmd-mark cmdbuf ignore-file-re)
"Do regular-expression matching to see if a breakpoint has been
diff --git a/realgud/debugger/gdb/core.el b/realgud/debugger/gdb/core.el
index 0c49a3c..38af051 100644
--- a/realgud/debugger/gdb/core.el
+++ b/realgud/debugger/gdb/core.el
@@ -124,7 +124,7 @@ Note that path elements have been expanded via
`expand-file-name'.
((equal "-i" arg)
(warn "realgud doesn't support the -i option; option ignored")
(setq args (cddr args)))
- ;; path-argument ooptions
+ ;; path-argument options
((member arg '("-cd" ))
(setq arg (pop args))
(nconc debugger-args
- [elpa] externals/realgud 8beb4f5 009/140: Merge pull request #182 from roymath/master, (continued)
- [elpa] externals/realgud 8beb4f5 009/140: Merge pull request #182 from roymath/master, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 211c01a 014/140: Fix misfeatures in install-from-git.sh..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 3f1b98f 010/140: (realgud:load-features) now features loaded, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 50dc7db 022/140: Info ..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud c7594f0 032/140: wrong 'let' syntax - caught thanks to the jodonnell's test!, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 37ba671 037/140: Comment better a track test, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud eeb4c2f 013/140: Bug in last commit., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 811e7b9 036/140: < -> <=. See comment before, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 2295d94 024/140: making eval print to the message area, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 83d471f 008/140: return the set of features removed, in realgud:unload-features(), Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud f41b7a7 017/140: When a breakpoint is seen, add source...,
Rocky Bernstein <=
- [elpa] externals/realgud 1f59502 021/140: Merge pull request #192 from dvzubarev/master, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud da2f39d 011/140: Improve Debugger Info org-mode buffer, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud ecc78f1 012/140: Fix up breakpoint display, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 4a7f6ef 019/140: Fix infinite loop in realgud:backtrace-init, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 081f7ed 018/140: Expand script path where appropriate, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 1180d9f 028/140: add eval at point and bind it to E in shortkey mode, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud f20f1e3 043/140: change E to put the thing at point in the eval buffer, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud e47abfb 044/140: Merge pull request #197 from jodonnell/eval-command, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud ce45b16 025/140: making join string not emacs 25 only, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud dc0e131 031/140: Guard against nil (realgud:get-command-name "eval"), Rocky Bernstein, 2019/05/25