-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lldb][lldb-vscode] Add example configuration for connecting to a remote gdbserver #68866
Conversation
…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.
@llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) ChangesThis 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. Full diff: https://github.com/llvm/llvm-project/pull/68866.diff 1 Files Affected:
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
|
…ote gdbserver (llvm#68866) 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. (cherry picked from commit 4606712)
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.