From 8743db6687c4b85566422ab3d4d768c17c752227 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 17 Aug 2023 22:26:02 +0800 Subject: [PATCH] gud-lldb --- README.org | 2 ++ config/gud-lldb.el | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.org b/README.org index 35f393b3..0471a61a 100644 --- a/README.org +++ b/README.org @@ -1272,6 +1272,8 @@ life easy and if [[https://github.com/junjiemars/nore][Nore]] already on your ma #+ATTR_HTML: :style text-align:left [[https://lldb.llvm.org/][lldb]] and [[https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/][cdb]] had been perfectly integrated. +- =gud-lldb= +- =gud-cdb= #+ATTR_HTML: :style display:none /screenshots/: diff --git a/config/gud-lldb.el b/config/gud-lldb.el index 7556e203..941e9c6a 100644 --- a/config/gud-lldb.el +++ b/config/gud-lldb.el @@ -159,10 +159,11 @@ Return absolute filename when FILENAME exists, otherwise nil." " else [random.randrange(0,x) for c in range(0,16)];"))) -(defun lldb-settings-init-file (dir) - "Make lldb's init file under DIR." - (save-str-to-file (lldb-init-statement) - (concat dir ".lldbinit-lldb"))) +(defun lldb-settings-init-file (&optional force) + "Make lldb's init file if FORCE or the init file does not exists." + (let ((file (expand-file-name "~/.lldbinit-lldb"))) + (when (or force (null (file-exists-p file))) + (save-str-to-file (lldb-init-statement) file)))) (defun lldb-script-apropos (ss) @@ -337,7 +338,7 @@ invoked." #'gud-lldb-marker-filter #'gud-lldb-find-file) - (lldb-settings-init-file default-directory) + (lldb-settings-init-file) (*lldb* (get-buffer (format "*gud-%s*" gud-target-name)))