Skip to content

Add suppport for "go to previous/next register write" in Windbg TTD #1123

Description

@xusheng6

Summary

During TTD analysis, one of the most common questions is "where was this
register last written?" WinDbg exposes this directly:

  • !tt br <reg> — travel to the previous/next position where a register changes value
  • dx @$curthread.TTD.PrevRegisterWrite("<reg>" [, <value>]) and the matching
    NextRegisterWrite(...) — return the position/value and can be seeked to

Today this requires dropping into the debugger console and typing the DDM
expression by hand. It'd be a nice workflow win to expose it as a first-class
action in the debugger UI.

Proposed UX

  • Right-click a register in the Registers view → Go to previous write /
    Go to next write, which seeks the TTD position.
  • Expose an equivalent in the debugger Python API (a helper wrapping
    PrevRegisterWrite/NextRegisterWrite + seek) so it's scriptable from BN.

Backend note

The primitive already exists in dbgeng — register-change navigation landed in
TTD ~1.11.x (April 2025 WinDbg release), via both !tt br and the
Prev/NextRegisterWrite DDM methods, hanging off @$curthread (per-thread).
So this is primarily plumbing a UI/API action to an existing capability.

Caveat worth documenting

These key on the register changing value, not on every architectural write —
a write of the same value the register already held won't be found. Worth
noting in the tooltip/docstring so it doesn't surprise anyone doing data-flow
work.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions