[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud-lldb 8612d54 40/56: A number of fixes -
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud-lldb 8612d54 40/56: A number of fixes - |
Date: |
Thu, 23 May 2019 02:11:43 -0400 (EDT) |
branch: externals/realgud-lldb
commit 8612d543e4a5f4079b1b6f464de8c5afd4f56667
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
A number of fixes -
* Handle column-number fields in frame and breakpoint locations.
* Adjust for realgud interfaces that have changed in the last couple of
years
* Set EMACSLOADPATH more completely to include loc-changes and load-relative
* Update/add to test
---
lldb/core.el | 8 ++++----
lldb/init.el | 41 ++++++++++++++++++++++++++++-------------
realgud-lldb.el | 4 ++--
test/test-regexp-lldb.el | 6 ++++++
4 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/lldb/core.el b/lldb/core.el
index 621c23b..91838b8 100644
--- a/lldb/core.el
+++ b/lldb/core.el
@@ -47,7 +47,7 @@
value is associated filesystem string presumably in the
filesystem")
-(defun realgud:lldb-find-file(filename)
+(defun realgud:lldb-find-file(cmd-marker filename directory)
"A find-file specific for lldb. We use `global' to map a
name to a filename. Failing that
we will prompt for a mapping and save that in `realgud:lldb-file-remap' when
@@ -71,10 +71,10 @@ that works."
))
(defun realgud:lldb-loc-fn-callback(text filename lineno source-str
- ignore-file-re cmd-mark)
+ cmd-mark directory)
(realgud:file-loc-from-line filename lineno
- cmd-mark source-str nil
- ignore-file-re 'realgud:lldb-find-file))
+ cmd-mark source-str nil nil ))
+ ;; 'realgud:lldb-find-file directory))
(defun realgud:lldb-parse-cmd-args (orig-args)
"Parse command line ARGS for the annotate level and name of script to debug.
diff --git a/lldb/init.el b/lldb/init.el
index 586bc3a..4a23ca2 100644
--- a/lldb/init.el
+++ b/lldb/init.el
@@ -29,8 +29,19 @@ realgud-loc-pat struct")
(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
-(defconst realgud:lldb-frame-file-regexp
- (format "\\(.+\\):%s" realgud:regexp-captured-num))
+
+;; Handle both
+;; * line and column number as well as
+;; * line without column number.
+;; For example:
+;; SolidityParserError.cpp:102:35
+;; SolidityParserError.cpp:102
+;;
+;; Note the minimal-match regexp up to the first colon
+(defconst realgud:lldb-file-col-regexp
+ (format "\\(.+?\\):%s\\(?::%s\\)?"
+ realgud:regexp-captured-num
+ realgud:regexp-captured-num))
(defconst realgud:lldb-frame-start-regexp
"\\(?:^\\|\n\\)")
@@ -49,9 +60,10 @@ realgud-loc-pat struct")
(setf (gethash "loc" realgud:lldb-pat-hash)
(make-realgud-loc-pat
:regexp (format "^\\* thread #%s: .+ at %s, "
- realgud:regexp-captured-num
realgud:lldb-frame-file-regexp)
+ realgud:regexp-captured-num realgud:lldb-file-col-regexp)
:file-group 2
- :line-group 3))
+ :line-group 3
+ :column-group 4))
;; Top frame number
(setf (gethash "top-frame-num" realgud:lldb-pat-hash) 0)
@@ -67,12 +79,12 @@ realgud-loc-pat struct")
(make-realgud-loc-pat
:regexp (format "^%s.* at %s"
realgud:lldb-frame-num-regexp
- realgud:lldb-frame-file-regexp
+ realgud:lldb-file-col-regexp
)
:num 1
:file-group 2
- :line-group 3)
- )
+ :line-group 3
+ :column-group 4))
;; realgud-loc-pat that describes a lldb prompt
;; For example:
@@ -87,11 +99,13 @@ realgud-loc-pat struct")
;; Breakpoint 1: where = hello`main + 4 at hello.c:5, address =
0x00000000004004b4
(setf (gethash "brkpt-set" realgud:lldb-pat-hash)
(make-realgud-loc-pat
- :regexp (format "^Breakpoint %s: .* at \\(.+?\\):%s\\(?::[0-9]+\\)?, "
- realgud:regexp-captured-num realgud:regexp-captured-num)
+ :regexp (format "^Breakpoint %s: .* at %s, "
+ realgud:regexp-captured-num
+ realgud:lldb-file-col-regexp)
:num 1
:file-group 2
- :line-group 3))
+ :line-group 3
+ :column-group 4))
;; realgud-loc-pat that describes a lldb "backtrace" command line.
;; For example:
@@ -107,11 +121,12 @@ realgud-loc-pat struct")
:regexp (concat realgud:lldb-frame-start-regexp
realgud:lldb-frame-num-regexp
"\\(?:.\\|\\(?:[\n] \\)\\)+[ ]+at "
- realgud:lldb-frame-file-regexp
+ realgud:lldb-file-col-regexp
)
:num 1
:file-group 2
- :line-group 3)
+ :line-group 3
+ :column-group 4)
)
(setf (gethash "font-lock-keywords" realgud:lldb-pat-hash)
@@ -142,7 +157,7 @@ realgud-loc-pat struct")
(setf (gethash "clear" realgud:lldb-command-hash) "break clear %X:%l")
(setf (gethash "continue" realgud:lldb-command-hash) "process continue")
(setf (gethash "eval" realgud:lldb-command-hash) "print %s")
-(setf (gethash "finish" realgud:lldb-command-hash) "thread step out")
+(setf (gethash "finish" realgud:lldb-command-hash) "thread step-out")
(setf (gethash "quit" realgud:lldb-command-hash) "quit")
(setf (gethash "run" realgud:lldb-command-hash) "run")
(setf (gethash "step" realgud:lldb-command-hash) "thread step-in --count
%p")
diff --git a/realgud-lldb.el b/realgud-lldb.el
index 4d0398d..b8faade 100644
--- a/realgud-lldb.el
+++ b/realgud-lldb.el
@@ -6,7 +6,7 @@
;; URL: http://github.com/rocky/realgud-lldb
;; Compatibility: GNU Emacs 24.x
-;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016, 2019 Free Software Foundation, Inc
;; Author: Rocky Bernstein <address@hidden>
@@ -31,7 +31,7 @@
;; 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 ./autogen.sh" (file-name-directory
(locate-library "test-simple.elc")) (file-name-directory (locate-library
"realgud.elc"))))
+;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh"
(file-name-directory (locate-library "loc-changes.elc")) (file-name-directory
(locate-library "test-simple.elc")) (file-name-directory (locate-library
"load-relative.elc")) (file-name-directory (locate-library "realgud.elc"))))
(require 'load-relative)
diff --git a/test/test-regexp-lldb.el b/test/test-regexp-lldb.el
index 5b3782c..21cb4d6 100644
--- a/test/test-regexp-lldb.el
+++ b/test/test-regexp-lldb.el
@@ -9,6 +9,7 @@
(declare-function __FILE__ 'load-relative)
(declare-function prompt-match 'regexp-helper)
+(declare-function loc-match 'realgud-helper)
(test-simple-start)
@@ -130,6 +131,11 @@
bps-pat) test-text)
"extract breakpoint line number")
+(assert-equal "12"
+ (match-string (realgud-loc-pat-column-group
+ bps-pat) test-text)
+ "extract breakpoint line number")
+
(setq test-text "Breakpoint 2: where = solptest`main + 9 at /tmp/foo.c:63,
address = 0x00000001002380d9")
- [elpa] externals/realgud-lldb 40d36fb 47/56: Regexps for breakpoint buffer. Small tweaks, (continued)
- [elpa] externals/realgud-lldb 40d36fb 47/56: Regexps for breakpoint buffer. Small tweaks, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb b8c652c 55/56: Administrivia:, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 634eb8e 41/56: Add enable/disable, and backtrace commands, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 8adce8d 24/56: Make sure we load lldb, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 98bcbe4 54/56: Small tweak, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 4bfd53a 49/56: Emacs lint in preparation for Melpa release, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb dd1d4df 27/56: common.mk.in: avoid having to set ELCFLAGS, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 8faf094 01/56: 1st cut at an external lldb plugin for realgud., Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 55b33c7 43/56: Correct some function-call parameters, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb bda33d6 39/56: Bang on breakpoint locations, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 8612d54 40/56: A number of fixes -,
Rocky Bernstein <=
- [elpa] externals/realgud-lldb 09f927f 45/56: Update README.md - minimally working now., Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 2296cc4 52/56: Add load-relative and and cl-lib dependencies, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb c44882b 50/56: Add breakpoint helper, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 810eb0a 48/56: Get ready for melpa release 1.0.0, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 4afe1ca 51/56: Merge branch 'master' of github.com:realgud/realgud-lldb, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb d784d9c 56/56: Require 25+ now, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 48fb709 19/56: Remove ANSI schmutz. Inter-packaging woes, Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb bee815c 46/56: Add "frame" command. File name futzing., Rocky Bernstein, 2019/05/23
- [elpa] externals/realgud-lldb 2c9fbf9 28/56: Some cleanups, Rocky Bernstein, 2019/05/23