From cd6b0cb7950eb42850ae26bf7e8336e7ea0d8aaa Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 14 Jan 2021 13:08:34 +0100 Subject: [PATCH] Debugger: Also ignore SIGSTOPs inside clone() when using a terminal Chances are high these are triggered by the process stub. There is a small chance for false positives here, but true SIGSTOPs by other external sources in these locations are very unlikely. Task-number: QTCREATORBUG-25073 Task-number: QTCREATORBUG-25082 Change-Id: I25478caf6803877f2f8cbb2edef68ae1183223a6 Reviewed-by: Christian Stenger --- src/plugins/debugger/gdb/gdbengine.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index e09cbae8fab..9aa72fbebcf 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1133,17 +1133,21 @@ void GdbEngine::handleStopResponse(const GdbMi &data) // Ignore signals from the process stub. const GdbMi frame = data["frame"]; - const QString func = frame["from"].data(); if (terminal() && data["reason"].data() == "signal-received" - && data["signal-name"].data() == "SIGSTOP" - && (func.endsWith("/ld-linux.so.2") - || func.endsWith("/ld-linux-x86-64.so.2"))) + && data["signal-name"].data() == "SIGSTOP") { - showMessage("INTERNAL CONTINUE AFTER SIGSTOP FROM STUB", LogMisc); - notifyInferiorSpontaneousStop(); - continueInferiorInternal(); - return; + const QString from = frame["from"].data(); + const QString func = frame["func"].data(); + if (from.endsWith("/ld-linux.so.2") + || from.endsWith("/ld-linux-x86-64.so.2") + || func == "clone") + { + showMessage("INTERNAL CONTINUE AFTER SIGSTOP FROM STUB", LogMisc); + notifyInferiorSpontaneousStop(); + continueInferiorInternal(); + return; + } } if (!m_onStop.isEmpty()) {