From ac338b61e10eeb1498eb02fb91b5698a6a1a9d14 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 1 Jul 2024 15:28:31 +0800 Subject: [PATCH] Remove all places where the code checks for the view name "Debugger" --- core/debuggercontroller.cpp | 3 --- ui/breakpointswidget.cpp | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index 4fd1226..f7ea167 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -1390,9 +1390,6 @@ DbgRef DebuggerController::GetController(BinaryViewRef data) return controller; } - if (data->GetTypeName() == "Debugger") - return nullptr; - auto controller = new DebuggerController(data); g_debuggerControllers = (DbgRef*)realloc(g_debuggerControllers, sizeof(DbgRef) * (g_controllerCount + 1)); diff --git a/ui/breakpointswidget.cpp b/ui/breakpointswidget.cpp index cd9a21b..64d014b 100644 --- a/ui/breakpointswidget.cpp +++ b/ui/breakpointswidget.cpp @@ -346,7 +346,8 @@ void DebugBreakpointsWidget::add() return; bool isAbsoluteAddress = false; - if (view->GetTypeName() == "Debugger") + auto controller = DebuggerController::GetController(view); + if (controller->IsConnected()) isAbsoluteAddress = true; if (isAbsoluteAddress)