[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud 1f59502 021/140: Merge pull request #192 from d
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud 1f59502 021/140: Merge pull request #192 from dvzubarev/master |
Date: |
Sat, 25 May 2019 19:35:23 -0400 (EDT) |
branch: externals/realgud
commit 1f5950280608ad40a513dac8b69d1360217f2f81
Merge: 081f7ed 2fad0c4
Author: R. Bernstein <address@hidden>
Commit: GitHub <address@hidden>
Merge pull request #192 from dvzubarev/master
Fix infinite loop in realgud:backtrace-init
---
realgud/common/buffer/backtrace.el | 8 +++++---
test/test-bt-trepan2.el | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/realgud/common/buffer/backtrace.el
b/realgud/common/buffer/backtrace.el
index 2b68bb0..448927a 100644
--- a/realgud/common/buffer/backtrace.el
+++ b/realgud/common/buffer/backtrace.el
@@ -407,6 +407,8 @@ filename, line number, whether the frame is selected as
text properties."
;; FIXME: Remove hack that group 1 is always the frame indicator.
(frame-indicator
(substring stripped-string (match-beginning 1) (match-end 1)))
+ (whole-match-begin (match-beginning 0))
+ (whole-match-end (match-end 0))
(frame-num-pos)
)
@@ -462,12 +464,12 @@ filename, line number, whether the frame is selected as
text properties."
(when (and (stringp filename) (numberp line-num))
(let ((loc (realgud:file-loc-from-line filename line-num cmdbuf)))
- (put-text-property (match-beginning 0) (match-end 0)
+ (put-text-property whole-match-begin whole-match-end
'loc loc string)
))
- (put-text-property (match-beginning 0) (match-end 0)
+ (put-text-property whole-match-begin whole-match-end
'frame-num frame-num string)
- (setq last-pos (match-end 0))
+ (setq last-pos whole-match-end)
(if (string-match frame-indicator-re frame-indicator)
(setq selected-frame-num frame-num))
diff --git a/test/test-bt-trepan2.el b/test/test-bt-trepan2.el
index d3d3d0f..e1be16e 100644
--- a/test/test-bt-trepan2.el
+++ b/test/test-bt-trepan2.el
@@ -4,15 +4,19 @@
(require 'test-simple)
(require 'load-relative)
(load-file "./bt-helper.el")
+(load-file "./regexp-helper.el")
(load-file "../realgud/debugger/trepan2/init.el")
(declare-function setup-bt 'realgud-bt-helper)
+(declare-function setup-regexp-vars 'regexp-helper)
(declare-function __FILE__ 'load-relative)
(test-simple-start)
(eval-when-compile
(defvar temp-bt)
+ (defvar realgud-pat-bt)
+ (defvar realgud:trepan2-pat-hash)
)
(setq temp-bt
@@ -40,4 +44,34 @@
(get-text-property (point) 'face))
)
)
+
+
+(setup-regexp-vars realgud:trepan2-pat-hash)
+(setq realgud-pat-bt (gethash "debugger-backtrace"
+ realgud:trepan2-pat-hash))
+
+
+(let* ((triple
+ (realgud:backtrace-add-text-properties
+ realgud-pat-bt ""
+ "->0 gcd(a=3, b=5) called from file '/test/gcd.py' at line 28
+##1 <module> exec() '/test/gcd.py' at line 41"
+ "->"))
+ (string-with-props (car triple)))
+ (dolist (pair
+ '(
+ ("->0" . (0 . 28) )
+ ("##1" . (1 . 41) )
+ ))
+ (string-match (car pair) string-with-props)
+ (assert-equal (cddr pair)
+ (realgud-loc-line-number (get-text-property
+ (match-beginning 0) 'loc
+ string-with-props)))
+
+ (assert-equal (cadr pair)
+ (get-text-property
+ (match-beginning 0) 'frame-num
+ string-with-props))))
+
(end-tests)
- [elpa] externals/realgud 211c01a 014/140: Fix misfeatures in install-from-git.sh..., (continued)
- [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, 2019/05/25
- [elpa] externals/realgud 1f59502 021/140: Merge pull request #192 from dvzubarev/master,
Rocky Bernstein <=
- [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
- [elpa] externals/realgud c64a4fd 039/140: Merge branch 'print', Rocky Bernstein, 2019/05/25