[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud-lldb bee815c 46/56: Add "frame" command. File n
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud-lldb bee815c 46/56: Add "frame" command. File name futzing. |
Date: |
Thu, 23 May 2019 02:11:47 -0400 (EDT) |
branch: externals/realgud-lldb
commit bee815c69fb31656fb400e352ac0fe043c35c284
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Add "frame" command. File name futzing.
---
lldb/core.el | 26 +++++++++++++++++---------
lldb/init.el | 43 +++++++++++++++++++++++--------------------
2 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/lldb/core.el b/lldb/core.el
index 5dba2b7..8abc61f 100644
--- a/lldb/core.el
+++ b/lldb/core.el
@@ -48,21 +48,14 @@
filesystem")
(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
-that works."
+ "A find-file specific for lldb. We will prompt for a mapping and save that in
+`realgud:lldb-file-remap' when that works."
(let ((resolved-filename filename)
- (global-output)
(remapped-filename (gethash filename realgud:lldb-file-remap)))
(cond
((and remapped-filename (stringp remapped-filename)
(file-exists-p remapped-filename)) remapped-filename)
((file-exists-p filename) filename)
- ((and (setq resolved-filename (shell-command-to-string (format "global -P
%s" filename)))
- (stringp resolved-filename)
- (file-exists-p (setq resolved-filename (realgud:strip
resolved-filename))))
- (puthash filename resolved-filename realgud:lldb-file-remap))
('t
(setq resolved-filename
(buffer-file-name
@@ -70,6 +63,21 @@ that works."
(puthash filename resolved-filename realgud:lldb-file-remap)))
))
+(defun realgud:cmd-lldb-break()
+ "Set a breakpoint storing mapping between a file and its basename"
+ (let* ((resolved-filename (realgud-expand-format "%X"))
+ (cmdbuf (realgud-get-cmdbuf))
+ (filename (file-name-nondirectory resolved-filename)))
+
+ ;; Save mapping from basename to long name so that we know what's
+ ;; up in a "Breakpoint set at" message
+ (puthash filename resolved-filename realgud:lldb-file-remap)
+
+ ;; Run actual command
+ (realgud:cmd-break)
+ ))
+
+
;; FIXME: setting a breakpoint should add a[ file-to-basename mapping
;; so that when this is called it can look up the short name and
;; remap it.
diff --git a/lldb/init.el b/lldb/init.el
index 236632a..86a5b06 100644
--- a/lldb/init.el
+++ b/lldb/init.el
@@ -152,26 +152,29 @@ realgud-loc-pat struct")
"Hash key is command name like 'continue' and the value is
the lldb command to use, like 'process continue'")
-(setf (gethash "backtrace" realgud:lldb-command-hash) "bt")
-(setf (gethash "break" realgud:lldb-command-hash) "b %X:%l")
-(setf (gethash "delete" realgud:lldb-command-hash) "break delete %p")
-(setf (gethash "clear" realgud:lldb-command-hash) "break clear %X:%l")
-(setf (gethash "continue" realgud:lldb-command-hash) "process continue")
-(setf (gethash "delete" realgud:lldb-command-hash) "*not-implemented*")
;; Or rather don't know what the equvalent is
-(setf (gethash "delete_all" realgud:lldb-command-hash) "*not-implemented*")
-(setf (gethash "disable" realgud:lldb-command-hash) "break disable %p")
-(setf (gethash "disable_all" realgud:lldb-command-hash) "break disable")
-(setf (gethash "down" realgud:lldb-command-hash) "down %p")
-(setf (gethash "enable" realgud:lldb-command-hash) "break enable %p")
-(setf (gethash "enable_all" realgud:lldb-command-hash) "break enable")
-(setf (gethash "eval" realgud:lldb-command-hash) "print %s")
-(setf (gethash "finish" realgud:lldb-command-hash) "thread step-out")
-(setf (gethash "quit" realgud:lldb-command-hash) "quit")
-(setf (gethash "restart" realgud:lldb-command-hash) "run")
-(setf (gethash "step" realgud:lldb-command-hash) "thread step-in
--count %p")
-(setf (gethash "shell" realgud:lldb-command-hash) "platform shell %s")
-(setf (gethash "until" realgud:lldb-command-hash) "thread until %l")
-(setf (gethash "up" realgud:lldb-command-hash) "up %p")
+(setf (gethash "backtrace" realgud:lldb-command-hash) "bt")
+(setf (gethash "break" realgud:lldb-command-hash) "b %X:%l")
+(setf (gethash "lldb-break" realgud:lldb-command-hash) "b %X:%l")
+(setf (gethash "delete" realgud:lldb-command-hash) "break delete %p")
+(setf (gethash "clear" realgud:lldb-command-hash) "break clear
%X:%l")
+(setf (gethash "continue" realgud:lldb-command-hash) "process continue")
+(setf (gethash "delete" realgud:lldb-command-hash)
"*not-implemented*") ;; Or rather don't know what the equvalent is
+(setf (gethash "delete_all" realgud:lldb-command-hash)
"*not-implemented*")
+(setf (gethash "disable" realgud:lldb-command-hash) "break disable %p")
+(setf (gethash "disable_all" realgud:lldb-command-hash) "break disable")
+(setf (gethash "down" realgud:lldb-command-hash) "down %p")
+(setf (gethash "enable" realgud:lldb-command-hash) "break enable %p")
+(setf (gethash "enable_all" realgud:lldb-command-hash) "break enable")
+(setf (gethash "eval" realgud:lldb-command-hash) "print %s")
+(setf (gethash "finish" realgud:lldb-command-hash) "thread step-out")
+(setf (gethash "frame" realgud:lldb-command-hash) "frame select %p")
+(setf (gethash "info-breakponts" realgud:lldb-command-hash) "break list")
+(setf (gethash "quit" realgud:lldb-command-hash) "quit")
+(setf (gethash "restart" realgud:lldb-command-hash) "run")
+(setf (gethash "step" realgud:lldb-command-hash) "thread step-in
--count %p")
+(setf (gethash "shell" realgud:lldb-command-hash) "platform shell
%s")
+(setf (gethash "until" realgud:lldb-command-hash) "thread until %l")
+(setf (gethash "up" realgud:lldb-command-hash) "up %p")
(setf (gethash "lldb" realgud-command-hash) realgud:lldb-command-hash)
(setf (gethash "lldb" realgud-pat-hash) realgud:lldb-pat-hash)
- [elpa] externals/realgud-lldb 55b33c7 43/56: Correct some function-call parameters, (continued)
- [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, 2019/05/23
- [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 <=
- [elpa] externals/realgud-lldb 2c9fbf9 28/56: Some cleanups, Rocky Bernstein, 2019/05/23