Skip to content

Extract DbgTargetHost interface from WinDebugger - #2589

Open
M0n7y5 wants to merge 1 commit into
beefytech:masterfrom
M0n7y5:linux-dbg-host
Open

M0n7y5 wants to merge 1 commit into
beefytech:masterfrom
M0n7y5:linux-dbg-host

Conversation

@M0n7y5

@M0n7y5 M0n7y5 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Groundwork for running DbgModule and DbgExprEvaluator on Linux with LLDB providing process control, instead of re-implementing Beef semantics on top of LLDB's C++ expression parser.

  • DbgTargetHost: the debugger services DbgModule, DebugTarget and DbgExprEvaluator need (memory, registers, frames, call setup, hot-swap memory, instruction decode). WinDebugger implements it; 12 one-line overrides, everything else already existed.
  • Win32-free helpers moved out of WinDebugger.cpp unchanged: eval context, format parsing, visualizer lookup into DbgEvalSupport.cpp; FixupLineDataForSubprogram into DbgModule.
  • DbgModule, DebugTarget and DbgExprEvaluator no longer include WinDebugger.h; COFF keeps its Windows-only access.
  • Portability: GCC/Clang template fixes in MultiDictionary.h, constexpr ClassType, PE structs off Windows, POSIX MappedFile, one String-to-varargs bug.
  • CMake option BF_DBG_HOST (default OFF) compiles the layer on Linux; nothing calls it yet.

No behaviour change. Windows build and test suite pass (191/191); Linux suite passes (132/132).

DbgModule, DebugTarget and DbgExprEvaluator now reach the debugger only through DbgTargetHost, so they compile without WinDebugger.h and can be built on Linux (BF_DBG_HOST, off by default). Windows behaviour is unchanged.
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.

1 participant