From 1a1c1e7f48cdd520a6844fb6cd92f952d4705220 Mon Sep 17 00:00:00 2001 From: SonicSwordcane Date: Sun, 19 Jan 2025 22:57:44 +0000 Subject: [PATCH] Update Debugging with LLDB --- Debugging-with-LLDB.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Debugging-with-LLDB.md b/Debugging-with-LLDB.md index 196b307..668747d 100644 --- a/Debugging-with-LLDB.md +++ b/Debugging-with-LLDB.md @@ -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.