From 1e6e5f9d866d2bbd0db2d76fcb8494e4368a7699 Mon Sep 17 00:00:00 2001 From: Dman95 Date: Mon, 30 Mar 2015 22:13:28 +0300 Subject: [PATCH] Showing description of received signal has been added. --- debugger.cpp | 12 +++--------- debugger.h | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index b086e8ee..bc9c4a4a 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -312,11 +312,12 @@ void Debugger::processAction(QString output, QString error) QRegExp continuingMsg("Continuing.\r?\n"); QRegExp breakpointMsg("\r?\nBreakpoint \\d+, "); QRegExp threadMsg("\\[Switching to Thread [^\\]]*\\]\r?\n"); - QRegExp signalMsg("\r?\nProgram received signal.*"); + QRegExp signalMsg("\r?\n(Program received signal.*)"); msg.remove(continuingMsg); msg.remove(breakpointMsg); msg.remove(threadMsg); - msg.remove(signalMsg); + if (signalMsg.indexIn(msg) != -1) { + } emit printOutput(msg); } firstAction = false; @@ -370,13 +371,6 @@ void Debugger::processAction(QString output, QString error) } } - if (actionType == simplePrint) { - QRegExp signalMsg("\r?\nProgram received signal.*"); - output.remove(signalMsg); - emit printOutput(output); - return; - } - if (actionType == infoMemory) { bool isValid = false; if (output.indexOf(QString("No symbol")) == -1 && diff --git a/debugger.h b/debugger.h index 5e418d3a..5de51669 100644 --- a/debugger.h +++ b/debugger.h @@ -62,7 +62,7 @@ #include #endif -enum DebugActionType {ni, si, showLine, infoRegisters, infoMemory, anyAction, none, breakpoint, simplePrint}; +enum DebugActionType {ni, si, showLine, infoRegisters, infoMemory, anyAction, none, breakpoint}; class Debugger : public QObject {