From ddfbf47abf949a615a7f8f2bb5eb999e4d39e996 Mon Sep 17 00:00:00 2001 From: Pietro Sami Date: Mon, 14 Oct 2024 20:26:18 +0200 Subject: [PATCH] small change, fixed shutdown while the machine has finished --- src/gdb/gdb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gdb/gdb.cc b/src/gdb/gdb.cc index 795dfca..b6a63af 100644 --- a/src/gdb/gdb.cc +++ b/src/gdb/gdb.cc @@ -289,9 +289,9 @@ std::string GDBServer::ReadData(const std::string &msg) { void *MachineStep(void *vargp) { - while (true) { + while (!(*killed_ptr)) { pthread_mutex_lock(&continue_mutex); - pthread_cond_wait(&continue_cond, &continue_mutex); + pthread_cond_wait(&continue_cond, &continue_mutex); pthread_mutex_unlock(&continue_mutex); if (*killed_ptr) {