DbgEngTTDAdapter::Start() never queries IDebugDataSpaces2, leaving it null for the whole TTD session
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- cpp
- Bereich
- devtools, reverse-engineering
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C++
- Sterne
- 335
- Forks
- 33
- Ø Merge
- 3 T. 1 Std.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Vector35/debugger
-
bug Effort: Trivial
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug Effort: Trivial Impact: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
Maintainer antworten meist innerhalb von 1 Tag
-
Effort: Trivial enhancement UI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Vector35/debugger#1148 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Vector35/debugger
Ähnliche Issues
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
rocketride-org/rocketride-server#2705 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
ROCm/rocm-systems#13754 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
neutralinojs/neutralinojs#1861 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
raspberrypi/libpisp#80 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
nanoporetech/pod5-file-format#198 ·