Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

DbgEngTTDAdapter::Start() never queries IDebugDataSpaces2, leaving it null for the whole TTD session

未关闭
#1,141 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@xusheng6 已经在做这个了。

开始于 2026年7月24日。

  • #1142 来自 @xusheng6 —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
cpp

调研方向

Start in core/adapters/dbgengadapter.cpp at ConnectToDebugServerInternal() and GetMemoryMap(), then locate DbgEngTTDAdapter::Start() and Reset(). Add the interface queries and cleanup described in the issue, preserve the existing live-debug behavior, and verify that both interfaces are available for TTD; the payload notes that an in-tree build has not yet been done.

由索引模型根据 Issue 内容生成。

描述

DbgEngTTDAdapter::Start() creates its own IDebugClient7 and queries the interfaces it needs, but it omits IDebugDataSpaces2. The base class only ever queries that interface in DbgEngAdapter::ConnectToDebugServerInternal() (core/adapters/dbgengadapter.cpp:333), and the TTD adapter never goes through that path — it opens the trace with OpenDumpFile() instead.

Result: m_debugDataSpaces2 stays nullptr for the entire TTD session, and any code that depends on it silently does nothing rather than failing visibly.

The reachable consequence today is DbgEngAdapter::GetMemoryMap(), which begins with:

if (!this->m_debugDataSpaces2)
    return {};

so under TTD it returns an empty map without ever calling into dbgeng. That surfaces as the empty memory map widget in #1132 — though note that issue is not fixed by this: IDebugDataSpaces2::QueryVirtual is also unimplemented for TTD replay targets, so the walk fails even with a valid interface pointer (see the analysis in https://github.com/Vector35/debugger/issues/1132#issuecomment-5072450325). This is the separate, latent half of that investigation, worth fixing on its own so the interface is available when something needs it and so the null-pointer path stops masking real behavior.

Fix

Query IDebugDataSpaces2 in DbgEngTTDAdapter::Start() (and release it in Reset()). Also adds IDebugDataSpaces4, which unlike QueryVirtual does work on TTD traces — GetValidRegionVirtual, GetNextDifferentlyValidOffsetVirtual and GetOffsetInformation all function there and are useful for validating an address range — wired on both the live-debug and TTD paths.

Verification

No behavior change is expected for live DbgEng debugging (that path already queried IDebugDataSpaces2; IDebugDataSpaces4 is additive). Under TTD, m_debugDataSpaces2/4 become non-null.

Both QueryInterface(__uuidof(IDebugDataSpaces2), ...) and IDebugDataSpaces4 were confirmed to return S_OK against a TTD trace using the pinned WinDbg's dbgeng.dll (TTD 1.01.11, release 1.11.592.0) in a standalone harness. Note QUERY_DEBUG_INTERFACE throws on failure, so this matters: both interfaces have existed since the earliest dbgeng versions we support, and both were observed available.

Not yet built in-tree.

主要语言
C++
星标
334
派生
33
平均合并
3 天 21 小时
30 天内合并 PR
5

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Vector35/debugger 的其他 Issue

查看 Vector35/debugger 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。