Skip to content

Initial remote debugging support (LLDB)#2448

Open
hermansimensen wants to merge 1 commit into
beefytech:masterfrom
hermansimensen:remotedebug
Open

Initial remote debugging support (LLDB)#2448
hermansimensen wants to merge 1 commit into
beefytech:masterfrom
hermansimensen:remotedebug

Conversation

@hermansimensen
Copy link
Copy Markdown
Contributor

Adds the option to debug beef software on embedded platforms through the gdb-remote protocol.

It adds a button under the debug menu, "Connect to remote target". This is only available with the LLDB debugger, otherwise it will be greyed out.

Some things to note are:

  • I swapped out the liblldb.dll with the one from llvm's 22.1.5 github release because it is compiled with libxml2 support. This is important for reading target definition files from remote servers. Remote debugging can still work without this, depending on the platform, but will use a fallback solution that might result in incomplete register and thread information. I have not updated the build script to build liblldb with libxml2 because I don't know your stance on it.
  • Currently you have to supply an elf file to load/debug. The beef IDE cannot generate this file on its own, but I've created mine through a linker script specifically for the target I'm working from. I have not planned to implement this functionality.

I've tested the changes with an OpenOCD server, specifically this patch.

remotedebug

Adds the ability to debug beef software on embedded platforms through the gdb-remote protocol
@bfiete
Copy link
Copy Markdown
Collaborator

bfiete commented May 28, 2026

Some things have changed since this initial PR.

Now GDB support is added, and there are more ways to launch that to remote targets. I ended up encoding the remote target specifiers in the launchPath:

path@gdb_wsl - Launches GDB through WSL
path@gdb_ssh:server - Launch GDB through SSH connection
path@gdb:host:port - Connect to GDB server on host:port. Path is ignored and can be blank.

Those launchPath encodings also allow for the correct debugger to be selected by the IDE.

Also when buildng IDE UI's, make sure they scale properly with UI scale. You can test most easily with Ctrl+Plus, Ctrl+Minus, Ctrl+0. Generally you can just wrap GS!(x) around those hard-coded constants and it just works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants