emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master bbab251 048/215: gdb: DRY captured number uses.


From: Rocky Bernstein
Subject: [elpa] master bbab251 048/215: gdb: DRY captured number uses.
Date: Sat, 30 Jul 2016 14:48:52 +0000 (UTC)

branch: master
commit bbab2517488fd964248f7721605ade64d0c355d7
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    gdb: DRY captured number uses.
---
 realgud.el                   |    4 ++--
 realgud/debugger/gdb/init.el |   11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/realgud.el b/realgud.el
index 7eb8146..9ae7c59 100644
--- a/realgud.el
+++ b/realgud.el
@@ -1,7 +1,7 @@
 ;;; realgud.el --- A modular front-end for interacting with external debuggers
 
 ;; Author: Rocky Bernstein
-;; Version: 1.1
+;; Version: 1.2
 ;; Package-Requires: ((load-relative "1.0") (list-utils "0.4.2") (loc-changes 
"1.1") (test-simple  "1.0"))
 ;; URL: http://github.com/rocky/emacs-dbgr
 ;; Compatibility: GNU Emacs 24.x
@@ -65,7 +65,7 @@
 ;;   remake         remake         GNU Make
 ;;   ruby-debug     rdebug         Ruby
 ;;   trepanning     trepan         trepanning debugger for a patched Ruby 1.9
-;;   trepanjs       trepanjs       trepanning debugger for node.js and V8
+;;   trepanjs       trepanjs       trepanning debugger for nodejs and V8
 ;;   trepan2        trepan2        trepanning debugger for Python 2.x
 ;;   trepan3k       trepan3k       trepanning debugger for Python 3.x
 ;;   zshdb          zshdb          Zsh
diff --git a/realgud/debugger/gdb/init.el b/realgud/debugger/gdb/init.el
index bfd948c..3dd8f5f 100644
--- a/realgud/debugger/gdb/init.el
+++ b/realgud/debugger/gdb/init.el
@@ -33,14 +33,14 @@ realgud-loc-pat struct")
 (declare-function make-realgud-loc "realgud-loc" (a b c d e f))
 
 (defconst realgud:gdb-frame-file-regexp
- "\\(.+\\):\\([0-9]+\\)")
+  (format "\\(.+\\):%s" realgud:regexp-captured-num))
 
 ;; regular expression that describes a gdb location generally shown
 ;; before a command prompt. NOTE: we assume annotate 1!
 (setf (gethash "loc" realgud:gdb-pat-hash)
       (make-realgud-loc-pat
-       :regexp (format "^%s:\\([0-9]+\\):beg:0x\\([0-9a-f]+\\)"
-                      realgud:gdb-frame-file-regexp)
+       :regexp (format "^%s:%s:beg:0x\\([0-9a-f]+\\)"
+                      realgud:gdb-frame-file-regexp 
realgud:regexp-captured-num)
        :file-group 1
        :line-group 2
        :char-offset-group 3))
@@ -53,7 +53,8 @@ realgud-loc-pat struct")
 ;;  regular expression that describes a "breakpoint set" line
 (setf (gethash "brkpt-set" realgud:gdb-pat-hash)
       (make-realgud-loc-pat
-       :regexp "^Breakpoint \\([0-9]+\\) at 0x\\([0-9a-f]*\\): file \\(.+\\), 
line \\([0-9]+\\).\n"
+       :regexp (format "^Breakpoint %s at 0x\\([0-9a-f]*\\): file \\(.+\\), 
line %s.\n"
+                      realgud:regexp-captured-num realgud:regexp-captured-num)
        :num 1
        :file-group 3
        :line-group 4))
@@ -62,7 +63,7 @@ realgud-loc-pat struct")
   "\\(?:^\\|\n\\)")
 
 (defconst realgud:gdb-frame-num-regexp
-  "#\\([0-9]+\\) ")
+  (format "#%s " realgud:regexp-captured-num))
 
 ;; Regular expression that describes a gdb "backtrace" command line.
 ;; For example:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]