AGENT SKILL

WinDbg TTD 时序反向调试分析

windbg-user-ttd-reverse-debugging-triage

当应用、服务或用户态驱动宿主程序有 TTD(Time Travel Debugging)录制,且需要追溯早期的调用、写入或对象生命周期时使用。不适用于内核回放,也不适用于从普通转储文件获取历史记录。

License 许可
MIT
最近更新
2026-11-09
Stars
★ 510
Forks
41

01 前言 Front Matter

name
windbg-user-ttd-reverse-debugging-triage
description
Use when an app, service, or user-mode driver host TTD recording is available and earlier calls, writes, or lifetimes matter. Not for kernel replay or history from a normal dump.

02 资源文件 1

03 SKILL.md 正文

TTD Reverse Debugging Triage

Load windbg-diagnostic-method first if it is not already loaded in this conversation, and apply it throughout for evidence ranking, hypothesis testing, confidence calibration, independent review, and report validation. This skill adds the bug-family-specific commands and evidence requirements.

Requirements and scope

Time Travel Debugging records a user-mode process for replay, including an authorized application, service, or user-mode driver host process. A dump alone contains no execution timeline. Confirm a valid recording and matching module symbols before attempting timeline queries. It does not record kernel execution or automatically include another process's server-side activity.

Recording can change timing, require substantial storage, and capture sensitive memory. Obtain authorization before capture. Check the installed recorder's help for supported target, architecture, and options. WinDbg's Launch executable (advanced) / Record with Time Travel Debugging flow can record a named test application without guessing a recorder command.

Workflow

1. Open and index the recording

Open the recorded .run file in WinDbg and load public Windows symbols and matching PDBs for your own binaries.

!tt.index
dx @$cursession.TTD

Confirm the timeline range. Indexing and data-model availability depend on WinDbg/TTD versions; consult the installed help if the command is unavailable.

2. Ask a bounded history question

dx @$cursession.TTD.Calls("MyModule!MyFunction")
dx @$cursession.TTD.Memory(<start-address>, <end-address>, "w")

Query the known function or exact memory range, then inspect relevant results and their timeline positions. An empty result can mean unmatched symbols, uninstrumented execution, or an out-of-range query, not proof of absence.

Use the call query to find allocation/free or module lifetime transitions and the memory query to locate candidate writes. Account for allocator reuse: the same virtual address may represent different objects over the recording.

3. Seek and inspect state

!tt <position>
k
r
g-

Seek to an actual position returned by the query. g- continues backward; use the installed reverse-step controls to refine the search. Capture the last-good and first-bad states, writer/caller stack, and ownership transition.

Do not equate the last write with the bug until you establish the object's identity, valid lifetime, intended invariant, and relevant cross-thread order.

4. Continue with a shipped investigation

Evidence Skill
Bad free/write or allocation-boundary violation windbg-user-heap-corruption-investigation
Growing allocation/reservation usage windbg-user-virtual-memory-exhaustion
Lock survives coroutine suspension windbg-user-mutex-held-across-co-await
Blocker or cross-process dependency at the selected moment windbg-user-wait-chain-analysis

For other user-mode families continue reasoning from the timeline rather than dispatching to absent skills. For a kernel crash use windbg-kernel-bugcheck-triage; TTD is not a kernel-history substitute.

Validation

Record the question, trace identity, timeline positions, relevant object lifetime, and source/stack evidence. Test alternatives and state recording boundaries. A reproducible timeline proves what occurred in that recording; it does not establish that instrumentation preserved all production timing.

References

Feedback

Follow FEEDBACK.md and report a reviewed summary to WinDbg-Feedback. Include windbg-user-ttd-reverse-debugging-triage and the package version from plugin.json; never automatically upload a recording or its memory/query contents.

04 同仓库更多 Skills

microsoft
microsoft/win-dev-skills

技能目录测试示例

sample-skill

用于测试目录工具的示例技能。在测试 CI 时使用。不用于实际工作。

软件开发工程师示例与演示技能
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 等待链阻塞分析

windbg-user-wait-chain-analysis

当应用、服务或用户态驱动宿主程序因锁、COM/RPC、I/O 或其他进程而无响应时,用于追踪阻塞链。不适用于仅由异常栈导致的崩溃。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 虚拟内存耗尽分析

windbg-user-virtual-memory-exhaustion

当原生应用、服务或用户态驱动宿主程序分配失败时使用;用于区分虚拟地址(VA)耗尽、碎片化和提交内存(commit)压力。不适用于托管 .NET 堆增长、仅凭单个快照证明内存泄漏,或内存损坏场景。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 协程互斥锁挂起排查

windbg-user-mutex-held-across-co-await

当应用、服务或用户态驱动的 C++ 协程代码在挂起点持有线程关联锁,随后发生挂起或失败时使用。不适用于所有协程崩溃场景,也不用于锁的性能选型。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 用户态堆损坏排查

windbg-user-heap-corruption-investigation

当应用、服务或用户态驱动宿主程序堆分配失败,或 Application Verifier 检测到损坏时使用;可检查历史记录与内存边界。不适用于内核池损坏或普通的内存不足(OOM)。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

用户态异常崩溃分诊

windbg-user-exception-triage

当本机 C/C++ 应用程序、服务或用户模式驱动程序主机(包括 UMDF)在转储文件或 WinDbg 会话中因结构化异常崩溃时使用,包括托管进程内的本机故障。不适用于托管 .NET 异常、WinUI/XAML 应用错误或内核错误检查(bugcheck)。

软件开发工程师调试与故障排查
★ 510