Update Debugging with LLDB

SonicSwordcane 2025-01-19 22:57:44 +00:00
parent a58654e79c
commit 1a1c1e7f48
1 changed files with 5 additions and 3 deletions

@ -2,7 +2,9 @@
Lemur can be used as a server for the gdb/lldb debuggers. If you're a homebrew developer, this gives you a rich source-level debugging experience for your C, C++, Rust, or assembly games. If you're reverse-engineering commercial games, it does a passable job at debugging ROMs without source code.
## Setting up LLDB
## Setup
### Setting up LLDB
To debug Virtual Boy games, you need a version of gdb or lldb built to target the Virtual Boy. The llvm-v810 compiler comes with a working version of lldb. At this time, there is no compatible version of gdb, so just use lldb.
@ -14,7 +16,7 @@ To debug Virtual Boy games, you need a version of gdb or lldb built to target th
* For command-line debugging, you'll need the lldb executable from `llvm-v810/bin/lldb` (or `llvm-v810/bin/lldb.exe` on Windows).
* For IDE integration, you'll need the lldb-dap executable from `llvm-v810/bin/lldb-dap` (or `llvm-v810/bin/lldb-dap.exe` on Windows).
## Compiling with debug info
### Compiling with debug info
To use source-level debugging, you must compile debug info into your game. To do this, simply add `-g` to your `CFLAGS`.
@ -26,7 +28,7 @@ Note that VUEngine Studio uses an older version of v810-gcc, so source-level deb
This debug info will be added to your game's `.elf` file, but stripped from the final `.vb` file. This means compiling with `-g` won't make your ROM bigger or slower.
## Running the server
### Running the server
To run the server, you can go to "Tools > GDB Server" and click Start. It will run on port 8080 by default. You can also pass `--debug-port 8080` on the command line, to run the server as soon as the app starts. Your game will be paused until the debugger connects.