Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/adapters/dbgengadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ bool DbgEngAdapter::ConnectToDebugServerInternal(const std::string& connectionSt
QUERY_DEBUG_INTERFACE(IDebugControl7, &this->m_debugControl);
QUERY_DEBUG_INTERFACE(IDebugDataSpaces, &this->m_debugDataSpaces);
QUERY_DEBUG_INTERFACE(IDebugDataSpaces2, &this->m_debugDataSpaces2);
QUERY_DEBUG_INTERFACE(IDebugDataSpaces4, &this->m_debugDataSpaces4);
QUERY_DEBUG_INTERFACE(IDebugRegisters, &this->m_debugRegisters);
QUERY_DEBUG_INTERFACE(IDebugSymbols3, &this->m_debugSymbols);
QUERY_DEBUG_INTERFACE(IDebugSystemObjects, &this->m_debugSystemObjects);
Expand Down Expand Up @@ -424,6 +425,7 @@ void DbgEngAdapter::Reset()
SAFE_RELEASE(this->m_debugControl);
SAFE_RELEASE(this->m_debugDataSpaces);
SAFE_RELEASE(this->m_debugDataSpaces2);
SAFE_RELEASE(this->m_debugDataSpaces4);
SAFE_RELEASE(this->m_debugRegisters);
SAFE_RELEASE(this->m_debugSymbols);
SAFE_RELEASE(this->m_debugSystemObjects);
Expand Down
1 change: 1 addition & 0 deletions core/adapters/dbgengadapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ namespace BinaryNinjaDebugger {
IDebugControl7* m_debugControl {nullptr};
IDebugDataSpaces* m_debugDataSpaces {nullptr};
IDebugDataSpaces2* m_debugDataSpaces2 {nullptr};
IDebugDataSpaces4* m_debugDataSpaces4 {nullptr};
IDebugRegisters* m_debugRegisters {nullptr};
IDebugSymbols3* m_debugSymbols {nullptr};
IDebugSystemObjects* m_debugSystemObjects {nullptr};
Expand Down
7 changes: 7 additions & 0 deletions core/adapters/dbgengttdadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ bool DbgEngTTDAdapter::Start()

QUERY_DEBUG_INTERFACE(IDebugControl7, &this->m_debugControl);
QUERY_DEBUG_INTERFACE(IDebugDataSpaces, &this->m_debugDataSpaces);
// The TTD adapter opens a trace directly instead of going through
// DbgEngAdapter::ConnectToDebugServerInternal(), so these have to be queried here too, otherwise
// they stay null and everything built on them (e.g. GetMemoryMap()) silently does nothing.
QUERY_DEBUG_INTERFACE(IDebugDataSpaces2, &this->m_debugDataSpaces2);
QUERY_DEBUG_INTERFACE(IDebugDataSpaces4, &this->m_debugDataSpaces4);
QUERY_DEBUG_INTERFACE(IDebugRegisters, &this->m_debugRegisters);
QUERY_DEBUG_INTERFACE(IDebugSymbols3, &this->m_debugSymbols);
QUERY_DEBUG_INTERFACE(IDebugSystemObjects, &this->m_debugSystemObjects);
Expand Down Expand Up @@ -185,6 +190,8 @@ void DbgEngTTDAdapter::Reset()
// we should keep everything active.
SAFE_RELEASE(this->m_debugControl);
SAFE_RELEASE(this->m_debugDataSpaces);
SAFE_RELEASE(this->m_debugDataSpaces2);
SAFE_RELEASE(this->m_debugDataSpaces4);
SAFE_RELEASE(this->m_debugRegisters);
SAFE_RELEASE(this->m_debugSymbols);
SAFE_RELEASE(this->m_dataModelManager);
Expand Down