[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9df42fe 12/56: Towards tracking breakpoints more often
From: |
Rocky Bernstein |
Subject: |
[elpa] master 9df42fe 12/56: Towards tracking breakpoints more often |
Date: |
Sat, 27 May 2017 05:02:29 -0400 (EDT) |
branch: master
commit 9df42fe2a7166aa21e53471188a4dec464ef27b9
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Towards tracking breakpoints more often
file.el: Create and set a source-file marker in the list of breakpoint
track.el: Add source breakpoint annotations when we add the source-file
maker in the list of breakpoints
---
realgud/common/bp.el | 2 +-
realgud/common/file.el | 34 +++++++++++++++++++++-------------
realgud/common/track.el | 7 +++++--
3 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/realgud/common/bp.el b/realgud/common/bp.el
index a330945..8d426e3 100644
--- a/realgud/common/bp.el
+++ b/realgud/common/bp.el
@@ -166,7 +166,7 @@ highlighted with FACE."
"Add a breakpoint icon at POS according to breakpoint-display-style.
Use the fringe if available, and the margin otherwise. Record
breakpoint status ENABLE? and breakpoint number BP-NUM in
-overlay. BUF is the buffer that POS refers to; it detaults to
+overlay. BUF is the buffer that POS refers to; it defaults to
the current buffer."
(let* ((bp-text) (bp-face) (line-face) (margin-icon) (fringe-icon))
(realgud-set-bp-icons)
diff --git a/realgud/common/file.el b/realgud/common/file.el
index 257ffc3..2bcefde 100644
--- a/realgud/common/file.el
+++ b/realgud/common/file.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2010-2011, 2013-2014 Free Software Foundation, Inc
+;; Copyright (C) 2010-2011, 2013-2014, 2016 Free Software Foundation, Inc
;; Author: Rocky Bernstein <address@hidden>
@@ -113,18 +113,26 @@ problem as best as we can determine."
(realgud:file-column-from-string filename
line-number
source-text))
- ;; And you thought we'd never get around to
- ;; doing something other than validation?
- (loc (make-realgud-loc
- :num bp-num
- :cmd-marker cmd-marker
- :filename filename
- :line-number line-number
- :column-number column-number
- :source-text source-text
- :marker (make-marker)
- )))
- loc)
+ (source-buffer (find-file-noselect filename))
+ (loc)
+ (source-mark))
+
+ ;; And you thought we'd never get around to
+ ;; doing something other than validation?
+ (with-current-buffer source-buffer
+ (goto-char (point-min))
+ ;; FIXME also allow column number and byte
offset
+ (forward-line (1- line-number))
+ (setq source-mark (point-marker))
+ (make-realgud-loc
+ :num bp-num
+ :cmd-marker cmd-marker
+ :filename filename
+ :line-number line-number
+ :column-number column-number
+ :source-text source-text
+ :marker source-mark)
+ ))
;; else
(format "File %s has only %d lines. (Line %d
requested.)"
filename line-count line-number))
diff --git a/realgud/common/track.el b/realgud/common/track.el
index f4e34b5..17d0341 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -504,10 +504,13 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
;; set to return nil
nil)
;; else
- (progn
+ (let ((loc loc-or-error))
;; Add breakpoint to list of
breakpoints
+ (with-current-buffer (marker-buffer
(realgud-loc-marker loc))
+ (realgud-bp-add-info loc))
+
(realgud-cmdbuf-info-bp-list=
- (cons loc-or-error (realgud-sget
'cmdbuf-info 'bp-list)))
+ (cons loc (realgud-sget
'cmdbuf-info 'bp-list)))
;; Set to return location
loc-or-error))))
nil))))
- [elpa] master 1959804 10/56: Small docstring clarification, (continued)
- [elpa] master 1959804 10/56: Small docstring clarification, Rocky Bernstein, 2017/05/27
- [elpa] master 5faeb71 09/56: realgud:cmdbuf-buffers-describe shows field names, Rocky Bernstein, 2017/05/27
- [elpa] master 66abb81 14/56: Tidy code a little, Rocky Bernstein, 2017/05/27
- [elpa] master 2def5fc 20/56: Customizable "search for this (relative) bp file", Rocky Bernstein, 2017/05/27
- [elpa] master bbdeb4e 19/56: Fixes issue #33, Rocky Bernstein, 2017/05/27
- [elpa] master 7323aa7 04/56: Fix up "make dist", Rocky Bernstein, 2017/05/27
- [elpa] master 70f8b03 05/56: Hoist remove-ansi-schmutz above just js, Rocky Bernstein, 2017/05/27
- [elpa] master 7e1db94 07/56: file remapping changes, Rocky Bernstein, 2017/05/27
- [elpa] master cd61c06 15/56: Tidy a bit, Rocky Bernstein, 2017/05/27
- [elpa] master 447ab36 08/56: host removing ansi-schmutz to mode setting., Rocky Bernstein, 2017/05/27
- [elpa] master 9df42fe 12/56: Towards tracking breakpoints more often,
Rocky Bernstein <=
- [elpa] master 4246e34 17/56: Merge pull request #150 from realgud/breakpoint-display, Rocky Bernstein, 2017/05/27
- [elpa] master 0fd9f62 35/56: lint on test, Rocky Bernstein, 2017/05/27
- [elpa] master 52d6b82 23/56: Closer to getting column info used, Rocky Bernstein, 2017/05/27
- [elpa] master 7fac416 29/56: Increase flake8 message coverage..., Rocky Bernstein, 2017/05/27
- [elpa] master 20b8d5d 32/56: Use cl-lib names, Rocky Bernstein, 2017/05/27
- [elpa] master 4f57d25 27/56: Fixes PR review realgud/realgud#163, Rocky Bernstein, 2017/05/27
- [elpa] master f360ead 31/56: Allow nil as file parameter in realgud-exec-shell, Rocky Bernstein, 2017/05/27
- [elpa] master 4b0bde7 33/56: realgud-file-find-function is in realgud group, Rocky Bernstein, 2017/05/27
- [elpa] master c4c1bcc 18/56: Add flake8 pattern, Rocky Bernstein, 2017/05/27
- [elpa] master df6921b 37/56: Merge branch 'master' of github.com:realgud/realgud, Rocky Bernstein, 2017/05/27