diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index 67e40506..277e1328 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -624,6 +624,13 @@ void DebuggerController::HandleInitialBreakpoint() if (!liveView) return; + // The bvt does not set the arch and platform for the created binary view. We must set them explicitly. + // TODO: in the future, when we add support for using the debugger without a base binary view (i.e., the m_data in + // this code), we will need to either read these info from the adapter backends, or make a UI to allow the user to + // inform us the values. + liveView->SetDefaultArchitecture(m_data->GetDefaultArchitecture()); + liveView->SetDefaultPlatform(m_data->GetDefaultPlatform()); + SetLiveView(liveView); DetectLoadedModule(); NotifyStopped(DebugStopReason::InitialBreakpoint); diff --git a/core/debuggerstate.cpp b/core/debuggerstate.cpp index 86992966..3c65d36b 100644 --- a/core/debuggerstate.cpp +++ b/core/debuggerstate.cpp @@ -856,7 +856,7 @@ void DebuggerState::UpdateCaches() bool DebuggerState::GetRemoteBase(uint64_t& address) { - return m_modules->GetModuleBase(GetExecutablePath()); + return m_modules->GetModuleBase(GetExecutablePath(), address); } diff --git a/ui/ui.cpp b/ui/ui.cpp index 394fd308..78571484 100644 --- a/ui/ui.cpp +++ b/ui/ui.cpp @@ -1094,7 +1094,7 @@ void DebuggerUI::updateUI(const DebuggerEvent& event) if (newFrame) { m_context->closeTab(m_context->getTabForFile(fileContext)); - navigateDebugger(address); + navigateToCurrentIP(); QCoreApplication::processEvents(); } }