[Lldb-commits] [lldb] [lldb][lldb-vscode] Add example configuration for connecting to a rem… (PR #68866)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 12 02:13:18 PDT 2023
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/68866
…ote gdbserver
This can be used to have VS Code debug various emulators, remote systems, hardware probes, etc.
In my case I was doing this for the Gameboy Advance, https://github.com/stuij/gba-llvm-devkit/blob/main/docs/Debugging.md#debugging-using-visual-studio-code.
It's not very complex if you know LLDB well, but when using another plugin, CodeLLDB, I was very glad that they had an example for it. So we should have one too.
>From a7c0c715f8c355e548e27e7c538fb9fccaf0ce89 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Thu, 12 Oct 2023 10:04:52 +0100
Subject: [PATCH] [lldb][lldb-vscode] Add example configuration for connecting
to a remote gdbserver
This can be used to have VS Code debug various emulators, remote systems, hardware probes, etc.
In my case I was doing this for the Gameboy Advance,
https://github.com/stuij/gba-llvm-devkit/blob/main/docs/Debugging.md#debugging-using-visual-studio-code.
It's not very complex if you know LLDB well, but when using another plugin,
CodeLLDB, I was very glad that they had an example for it. So we should have one too.
---
lldb/tools/lldb-vscode/README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lldb/tools/lldb-vscode/README.md b/lldb/tools/lldb-vscode/README.md
index 6f930293126d53e..e5104adfda07942 100644
--- a/lldb/tools/lldb-vscode/README.md
+++ b/lldb/tools/lldb-vscode/README.md
@@ -212,6 +212,21 @@ This loads the coredump file `/cores/123.core` associated with the program
}
```
+### Connect to a Remote Debug Server
+
+This connects to a debug server (e.g. `lldb-server`, `gdbserver`) that is
+debugging the program `/tmp/a.out` and listening locally on port `2345`.
+
+```javascript
+{
+ "name": "Remote Debug Server",
+ "type": "lldb-vscode",
+ "request": "launch",
+ "program": "/tmp/a.out",
+ "launchCommands": ["gdb-remote 2345"],
+}
+```
+
# Custom debugger commands
The `lldb-vscode` tool includes additional custom commands to support the Debug
More information about the lldb-commits
mailing list