Skip to content

Warn when TTD is used without the WinDbg/TTD package (Fixes #1103)#1143

Open
xusheng6 wants to merge 1 commit into
devfrom
test_1103_ttd_not_installed
Open

Warn when TTD is used without the WinDbg/TTD package (Fixes #1103)#1143
xusheng6 wants to merge 1 commit into
devfrom
test_1103_ttd_not_installed

Conversation

@xusheng6

Copy link
Copy Markdown
Member

Fixes #1103.

The debugger only loads the WinDbg/TTD copy that Binary Ninja downloads itself (or whatever debugger.x64dbgEngPath points at). A WinDbg installed from the Microsoft Store or the standalone installer looks like it should work, so the mistake only surfaced as an opaque Failed to initialize DbgEng at launch, or cannot find the path for the TTD recorder after the record dialog was already filled in.

New ui/ttdinstall.cpp resolves the replay engine (dbgeng.dll and friends) and the recorder (TTD.exe, TTDRecord.dll) the same way the adapters do, and distinguishes: never downloaded, debugger.x64dbgEngPath pointing somewhere wrong, and installed but not loaded yet (needs a restart, since the DLLs load at plugin init). Each message says a self-installed WinDbg cannot be used and offers a button that runs the installer.

The check runs before launching a DBGENG_TTD session and before the TTD record/attach dialogs open. DbgEngAdapter::GetDbgEngInstallHint() carries the same explanation into the core-side warning and launch error, so headless/Python users see it too. GlobalDebuggerUI::installTTD() moves verbatim to TTDInstall::RunInstaller() so the checks can invoke it, and ui/ttdrecord.cpp's duplicated path resolution is gone.

Testing

debuggercore builds clean. debuggerui does not link in my local setup for an unrelated pre-existing reason (ui/uinotification.h:43 overrides OnTokenDoubleClicked, which my binaryninja-api checkout predates), so I compiled each changed translation unit individually instead — all clean. The dialogs have not been exercised at runtime.

🤖 Generated with Claude Code

The debugger only loads the WinDbg/TTD copy that Binary Ninja downloads itself,
but a self-installed WinDbg looks like it should work, so the mistake surfaced
as an opaque "Failed to initialize DbgEng".

Check for the replay engine and the recorder before launching a DBGENG_TTD
session and before the TTD record/attach dialogs, and explain what is missing
with a button to install it. The core-side errors carry the same explanation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Let user know TTD will fail if they have not downloaded winding/TTD

1 participant