From f20b59d8acc4134caf163d1ce6b5cea00d2dc5f6 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Sat, 25 Jun 2022 03:15:13 +0200 Subject: [PATCH] Use API instead of `ar-` and `aets-` commands (#2980) --- src/core/Cutter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 8db7aa1b..bd7b8377 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -2146,13 +2146,15 @@ void CutterCore::stopDebug() currentlyRemoteDebugging = false; emit debugTaskStateChanged(); + CORE_LOCK(); if (currentlyEmulating) { cmdEsil("aeim-; aei-"); resetWriteCache(); - cmdEsil(".ar-; aets-"); + rz_core_debug_clear_register_flags(core); + rz_core_analysis_esil_trace_stop(core); currentlyEmulating = false; } else { - rz_core_debug_process_close(core()); + rz_core_debug_process_close(core); currentlyAttachedToPID = -1; }