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

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

[elpa] externals/realgud-trepan-ni 0d613f1 21/25: Fix up backtrace regex


From: Rocky Bernstein
Subject: [elpa] externals/realgud-trepan-ni 0d613f1 21/25: Fix up backtrace regexps
Date: Thu, 23 May 2019 02:14:24 -0400 (EDT)

branch: externals/realgud-trepan-ni
commit 0d613f1bbeb9903a7d3018bea59e9680b8f0cf40
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Fix up backtrace regexps
---
 compute-lispdir.sh   |  4 ++--
 realgud-trepan-ni.el |  5 +++--
 trepan-ni/init.el    | 32 +++++++++++++++++---------------
 3 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/compute-lispdir.sh b/compute-lispdir.sh
index 220befd..c46a66a 100755
--- a/compute-lispdir.sh
+++ b/compute-lispdir.sh
@@ -24,7 +24,7 @@ done
 for dir in $list ; do
     if [[ -d $dir ]] ; then
        case $dir in
-           */emacs/2[34]\.[0-9]/site-lisp)
+           */emacs/2[3-6]\.[0-9]/site-lisp)
                ((DEBUG)) && echo "versioned site lisp: $dir"
                echo "$dir"
                exit 0
@@ -35,7 +35,7 @@ done
 for dir in $list ; do
     if [[ -d $dir ]] ; then
        case $dir in
-           */emacs/2[34]\.[0-9]/site-lisp)
+           */emacs/2[3-6]\.[0-9]/site-lisp)
                ((DEBUG)) && echo "versioned site lisp: $dir"
                echo "$dir"
                exit 0
diff --git a/realgud-trepan-ni.el b/realgud-trepan-ni.el
index ff3b14f..a39d9e2 100644
--- a/realgud-trepan-ni.el
+++ b/realgud-trepan-ni.el
@@ -26,14 +26,15 @@
 
 ;;; Commentary:
 
-;; realgud support for the "node inspect" with V8 inspector support.
+;; realgud support for the "node inspect" with V8 inspector support using a
+;; gdb-style "trepan" debugger.
 ;; See https://nodejs.org/api/debugger.html and 
https://www.npmjs.com/package/trepan-ni
 ;;
 ;;; Code:
 
 ;; Press C-x C-e at the end of the next line configure the program in
 ;; for building via "make" to get set up.
-;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh" 
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory 
(locate-library "realgud.elc")) (file-name-directory (locate-library 
"load-relative.elc")) (file-name-directory (locate-library 
"loc-changes.elc"))))n
+;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh" 
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory 
(locate-library "realgud.elc")) (file-name-directory (locate-library 
"load-relative.elc")) (file-name-directory (locate-library "loc-changes.elc"))))
 
 (require 'load-relative)
 
diff --git a/trepan-ni/init.el b/trepan-ni/init.el
index 708afce..73b011a 100644
--- a/trepan-ni/init.el
+++ b/trepan-ni/init.el
@@ -35,7 +35,7 @@ realgud-loc-pat struct")
 (setf (gethash "loc" realgud:trepan-ni-pat-hash)
       (make-realgud-loc-pat
        :regexp (format
-               "\\(?:%s\\)*\\(?:break\\|exception\\|frame change\\) in 
\\(?:file://\\)?%s:%s"
+               "\\(?:%s\\)*\\(?:break\\|exception\\|Break on start\\) in 
\\(?:file://\\)?%s:%s"
                realgud:js-term-escape "\\([^:]+\\)"
                realgud:regexp-captured-num)
        :file-group 1
@@ -85,31 +85,31 @@ realgud-loc-pat struct")
        :num 1))
 
 
-(defconst realgud:trepan-ni-frame-start-regexp  "\\(?:^\\|\n\\)\\(?:##\|->\)")
+(defconst realgud:trepan-ni-frame-start-regexp  
"\\(?:^\\|\n\\)\\(?:##\\|->\\)")
 (defconst realgud:trepan-ni-frame-num-regexp    realgud:regexp-captured-num)
 (defconst realgud:trepan-ni-frame-module-regexp "[^ \t\n]+")
 (defconst realgud:trepan-ni-frame-file-regexp   "[^ \t\n]+")
 
-;; Regular expression that describes a trepan-ni location generally shown
 ;; Regular expression that describes a debugger "backtrace" command line.
 ;; For example:
 ;; #0 module.js:380:17
 ;; #1 dbgtest.js:3:9
 ;; #2 Module._compile module.js:456:26
-;; #3 Module._extensions..js module.js:474:10
-;; #4 Module.load module.js:356:32
-;; #5 Module._load module.js:312:12
-;; #6 Module.runMain module.js:497:10
-; ;#7 timers.js:110:15
+;;
+;; and with a newer node inspect:
+;;
+;; #0 file:///tmp/module.js:380:17
+;; #1 file:///tmp/dbgtest.js:3:9
+;; #2 Module._compile file:///tmpmodule.js:456:26
+
 (setf (gethash "debugger-backtrace" realgud:trepan-ni-pat-hash)
       (make-realgud-loc-pat
-       :regexp         (concat realgud:trepan-ni-frame-start-regexp
-                       realgud:trepan-ni-frame-num-regexp " "
-                       "\\(?:" realgud:trepan-ni-frame-module-regexp " \\)?"
-                       "\\(" realgud:trepan-ni-frame-file-regexp "\\)"
-                       ":"
+       :regexp         (format "%s %s\\(?: %s\\)? 
\\(?:file://\\)?\\(%s\\):%s:%s"
+                       realgud:trepan-ni-frame-start-regexp
+                       realgud:trepan-ni-frame-num-regexp
+                       realgud:trepan-ni-frame-module-regexp
+                       realgud:trepan-ni-frame-file-regexp
                        realgud:regexp-captured-num
-                       ":"
                        realgud:regexp-captured-num
                        )
        :num 1
@@ -165,12 +165,14 @@ trepan-ni command to use, like 'out'.")
 (setf (gethash "backtrace"  realgud:trepan-ni-command-hash) "backtrace")
 (setf (gethash "break"      realgud:trepan-ni-command-hash)
       "setBreakpoint('%X',%l)")
+(setf (gethash "clear"      realgud:trepan-ni-command-hash)
+      "clearBreakpoint('%X', %l)")
 (setf (gethash "continue"   realgud:trepan-ni-command-hash) "cont")
 (setf (gethash "delete"     realgud:trepan-ni-command-hash)
       "deleteBreakpoint(%p)")
 
 (setf (gethash "kill"       realgud:trepan-ni-command-hash) "kill")
-(setf (gethash "quit"       realgud:trepan-ni-command-hash) "")
+(setf (gethash "quit"       realgud:trepan-ni-command-hash) ".exit")
 (setf (gethash "finish"     realgud:trepan-ni-command-hash) "out")
 (setf (gethash "shell"      realgud:trepan-ni-command-hash) "repl")
 (setf (gethash "eval"       realgud:trepan-ni-command-hash) "eval('%s')")



reply via email to

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