Skip to content

[lldb][lldb-vscode] Add example configuration for connecting to a remote gdbserver #68866

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

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions lldb/tools/lldb-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,38 @@ This loads the coredump file `/cores/123.core` associated with the program
}
```

### Connect to a Debug Server on the Current Machine

This connects to a debug server (e.g. `lldb-server`, `gdbserver`) on
the current machine, that is debugging the program `/tmp/a.out` and listening
locally on port `2345`.

```javascript
{
"name": "Local Debug Server",
"type": "lldb-vscode",
"request": "attach",
"program": "/tmp/a.out",
"attachCommands": ["gdb-remote 2345"],
}
```

### Connect to a Debug Server on Another Machine

This connects to a debug server running on another machine with hostname
`hostnmame`. Which is debugging the program `/tmp/a.out` and listening on
port `5678` of that other machine.

```javascript
{
"name": "Remote Debug Server",
"type": "lldb-vscode",
"request": "attach",
"program": "/tmp/a.out",
"attachCommands": ["gdb-remote hostname:5678"],
}
```

# Custom debugger commands

The `lldb-vscode` tool includes additional custom commands to support the Debug
Expand Down