Skip to content

Commit be039fd

Browse files
authored
Use expand-file-name for gdb-lldb targets (#487)
This allows to avoid `~` related issues when looking for the target program in a parent/cousin directory (such as out of source builds) Example : "Warning (emacs): Initialize request failed: Failed to load MI Debugger: /home/USER/project/src/bin/~/project/src/bin/target.rs: Aucun fichier ou dossier de ce type. (from file-exec-and-symbols "/home/USER/project/src/bin/~/project/src/bin/target.rs")"
1 parent 01d9297 commit be039fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dap-gdb-lldb.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Link: https://marketplace.visualstudio.com/items?itemName=webfreak.debug ."
4949
(dap--put-if-absent :dap-server-path dap-gdb-lldb-debug-program)
5050
(dap--put-if-absent :type "gdb")
5151
(dap--put-if-absent :cwd default-directory)
52-
(dap--put-if-absent :target (read-file-name "Select file to debug."))
52+
(dap--put-if-absent :target (expand-file-name (read-file-name "Select file to debug.")))
5353
(dap--put-if-absent :name "GDB Debug")))
5454

5555
(dap-register-debug-provider "gdb" 'dap-gdb-lldb--populate-gdb)
@@ -98,7 +98,7 @@ Link: https://marketplace.visualstudio.com/items?itemName=webfreak.debug ."
9898
(dap--put-if-absent :dap-server-path dap-gdb-lldb-path-lldb)
9999
(dap--put-if-absent :type "lldb")
100100
(dap--put-if-absent :cwd default-directory)
101-
(dap--put-if-absent :target (read-file-name "Select file to debug."))
101+
(dap--put-if-absent :target (expand-file-name (read-file-name "Select file to debug.")))
102102
(dap--put-if-absent :name "LLDB Debug")))
103103

104104
(dap-register-debug-provider "lldb" 'dap-gdb-lldb--populate-lldb)

0 commit comments

Comments
 (0)