From cb6035a32dcf9fe9a1b54cd8deb4233f008d002a Mon Sep 17 00:00:00 2001 From: Karliss Date: Thu, 30 Jan 2025 15:05:13 +0200 Subject: [PATCH] Fix debug step over and out. The old code didn't make sense: capturing by reference function local variable in a lambda which will be executed as async task, checking result of async task before the task was even started. --- src/core/Cutter.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 2e5d953e..eb161d64 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -2422,17 +2422,13 @@ void CutterCore::stepOverDebug() return; } } else { - bool ret; asyncTask( - [&](RzCore *core) { - ret = rz_core_debug_step_over(core, 1); + [](RzCore *core) { + rz_core_debug_step_over(core, 1); rz_core_dbg_follow_seek_register(core); return nullptr; }, debugTask); - if (!ret) { - return; - } } emit debugTaskStateChanged(); @@ -2453,17 +2449,13 @@ void CutterCore::stepOutDebug() } emit debugTaskStateChanged(); - bool ret; asyncTask( - [&](RzCore *core) { - ret = rz_core_debug_step_until_frame(core); + [](RzCore *core) { + rz_core_debug_step_until_frame(core); rz_core_dbg_follow_seek_register(core); return nullptr; }, debugTask); - if (!ret) { - return; - } connect(debugTask.data(), &RizinTask::finished, this, [this]() { debugTask.clear(); @@ -2492,17 +2484,13 @@ void CutterCore::stepBackDebug() return; } } else { - bool ret; asyncTask( - [&](RzCore *core) { - ret = rz_core_debug_step_back(core, 1); + [](RzCore *core) { + rz_core_debug_step_back(core, 1); rz_core_dbg_follow_seek_register(core); return nullptr; }, debugTask); - if (!ret) { - return; - } } emit debugTaskStateChanged();