Skip to content

Commit

Permalink
Add a way to disable function analysis update and use it to supress a…
Browse files Browse the repository at this point in the history
…nalysis update during debugger launch
  • Loading branch information
xusheng6 committed Aug 13, 2024
1 parent 705c3d4 commit 8edc178
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/debuggercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,9 @@ bool DebuggerController::CreateDebuggerBinaryView()
auto segment = data->GetSegmentAt(0);
m_zeroSegmentAddedByDebugger = segment == nullptr;
m_accessor = new DebuggerFileAccessor(data);
data->SetFunctionAnalysisUpdateDisabled(true);
data->GetMemoryMap()->AddRemoteMemoryRegion("debugger", 0, m_accessor);
data->SetFunctionAnalysisUpdateDisabled(false);
return true;
}

Expand Down Expand Up @@ -2522,11 +2524,17 @@ bool DebuggerController::IsTTD()

bool DebuggerController::RemoveDebuggerMemoryRegion()
{
return GetData()->GetMemoryMap()->RemoveMemoryRegion("debugger");
GetData()->SetFunctionAnalysisUpdateDisabled(true);
auto ret = GetData()->GetMemoryMap()->RemoveMemoryRegion("debugger");
GetData()->SetFunctionAnalysisUpdateDisabled(false);
return ret;
}


bool DebuggerController::ReAddDebuggerMemoryRegion()
{
return GetData()->GetMemoryMap()->AddRemoteMemoryRegion("debugger", 0, GetMemoryAccessor());
GetData()->SetFunctionAnalysisUpdateDisabled(true);
auto ret = GetData()->GetMemoryMap()->AddRemoteMemoryRegion("debugger", 0, GetMemoryAccessor());
GetData()->SetFunctionAnalysisUpdateDisabled(false);
return ret;
}

0 comments on commit 8edc178

Please sign in to comment.