From 384838e5b09d1612dfea14ac41e7dd968e953493 Mon Sep 17 00:00:00 2001 From: Ernie Pasveer Date: Thu, 13 Jan 2022 11:03:24 -0600 Subject: [PATCH] Add library load/unload catch points. --- notes/README.catchpoints | 13 ++ src/SeerCatchpointCreateDialog.cpp | 14 +- src/SeerCatchpointCreateDialog.ui | 24 ++- src/SeerEditorManagerWidget.cpp | 302 +---------------------------- src/SeerEditorWidgetSourceArea.cpp | 219 +-------------------- src/SeerGdbWidget.cpp | 46 +---- src/SeerMainWindow.cpp | 11 +- src/SeerRunStatusIndicator.cpp | 63 +----- 8 files changed, 61 insertions(+), 631 deletions(-) diff --git a/notes/README.catchpoints b/notes/README.catchpoints index 94aaff0..cde427c 100644 --- a/notes/README.catchpoints +++ b/notes/README.catchpoints @@ -19,6 +19,19 @@ stopped-threads="all", core="5" +*stopped, + bkptno="4", + disp="keep", + reason="solib-event", + added=[library="/peak/rel/modules/SampVar/libSampVar.so"], + frame={addr="0x00007ffff7deb290", + func="dl_open_worker",args=[], + from="/lib64/ld-linux-x86-64.so.2", + arch="i386:x86-64"}, + thread-id="1", + stopped-threads="all", + core="1" + # Return status from '-catch-xxxx' command. ^done,bkpt={number="2",type="catchpoint",disp="keep",enabled="y",what="exception catch",catch-type="catch",thread-groups=["i1"],times="0"} ^done,bkpt={number="3",type="catchpoint",disp="keep",enabled="y",what="exception throw",catch-type="throw",thread-groups=["i1"],times="0"} diff --git a/src/SeerCatchpointCreateDialog.cpp b/src/SeerCatchpointCreateDialog.cpp index 68dd12b..0f2e5cf 100644 --- a/src/SeerCatchpointCreateDialog.cpp +++ b/src/SeerCatchpointCreateDialog.cpp @@ -31,6 +31,12 @@ void SeerCatchpointCreateDialog::setType (const QString& text) { }else if (text == "catch") { catchRadioButton->setChecked(true); + }else if (text == "load") { + loadRadioButton->setChecked(true); + + }else if (text == "unload") { + unloadRadioButton->setChecked(true); + }else{ throwRadioButton->setChecked(true); } @@ -47,6 +53,12 @@ QString SeerCatchpointCreateDialog::typeText () const { }else if (catchRadioButton->isChecked()) { return "catch"; + }else if (loadRadioButton->isChecked()) { + return "load"; + + }else if (unloadRadioButton->isChecked()) { + return "unload"; + }else{ return "throw"; } @@ -88,7 +100,7 @@ QString SeerCatchpointCreateDialog::catchpointText () const { if (nameEnabled()) { if (nameText() != "") { - catchpointParameters += " -r " + nameText(); + catchpointParameters += " " + nameText(); } } diff --git a/src/SeerCatchpointCreateDialog.ui b/src/SeerCatchpointCreateDialog.ui index 0346d50..5e9769a 100644 --- a/src/SeerCatchpointCreateDialog.ui +++ b/src/SeerCatchpointCreateDialog.ui @@ -15,7 +15,7 @@ - + Catchpoint Type @@ -30,6 +30,16 @@ + + + + Catch on library 'load' + + + typeButtonGroup + + + @@ -40,6 +50,16 @@ + + + + Catch on library 'unload' + + + typeButtonGroup + + + @@ -69,7 +89,7 @@ - Exception name as a regular expression. + Exception/Library name as a regular expression. true diff --git a/src/SeerEditorManagerWidget.cpp b/src/SeerEditorManagerWidget.cpp index 2326bc3..c589c3d 100644 --- a/src/SeerEditorManagerWidget.cpp +++ b/src/SeerEditorManagerWidget.cpp @@ -156,198 +156,7 @@ bool SeerEditorManagerWidget::editorHighlighterEnabled () const { void SeerEditorManagerWidget::handleText (const QString& text) { - if (text.startsWith("*stopped,reason=\"end-stepping-range\"")) { - - // *stopped, - // - // reason="end-stepping-range", - // - // frame={addr="0x0000000000400b45", - // func="main", - // args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd5b8"}], - // file="helloworld.cpp", - // fullname="/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp", - // line="7", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="6" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // If there is no file to open, just exit. - if (fullname_text == "") { - return; - } - - // Get the EditorWidget for the file. Create one if needed. - SeerEditorWidget* editorWidget = editorWidgetTab(fullname_text); - - if (editorWidget == 0) { - editorWidget = createEditorWidgetTab(fullname_text, file_text, text); - } - - // Push this tab to the top. - tabWidget->setCurrentWidget(editorWidget); - - // Give the EditorWidget the command text (read file, set line number, etc.). - editorWidget->sourceArea()->handleText(text); - - return; - - }else if (text.startsWith("*stopped,reason=\"breakpoint-hit\"")) { - - // *stopped, - // - // reason="breakpoint-hit", - // - // disp="del", - // bkptno="1", - // - // frame={addr="0x0000000000400b07", - // func="main", - // args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd5b8"}], - // file="helloworld.cpp", - // fullname="/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp", - // line="7", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="1" - - // Now parse the table and re-add the breakpoints. - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString reason_text = Seer::parseFirst(newtext, "reason=", '"', '"', false); - QString disp_text = Seer::parseFirst(newtext, "disp=", '"', '"', false); - QString bkptno_text = Seer::parseFirst(newtext, "bkptno=", '"', '"', false); - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - QString thread_id_text = Seer::parseFirst(newtext, "thread-id=", '"', '"', false); - QString stopped_threads_text = Seer::parseFirst(newtext, "stopped-threads=", '"', '"', false); - QString core_text = Seer::parseFirst(newtext, "core=", '"', '"', false); - - if (frame_text == "") { - return; - } - - QString addr_text = Seer::parseFirst(frame_text, "addr=", '"', '"', false); - QString func_text = Seer::parseFirst(frame_text, "func=", '"', '"', false); - QString args_text = Seer::parseFirst(frame_text, "args=", '[', ']', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - QString arch_text = Seer::parseFirst(frame_text, "arch=", '"', '"', false); - - // If there is no file to open, just exit. - if (fullname_text == "") { - return; - } - - // Get the EditorWidget for the file. Create one if needed. - SeerEditorWidget* editorWidget = editorWidgetTab(fullname_text); - - if (editorWidget == 0) { - editorWidget = createEditorWidgetTab(fullname_text, file_text, text); - } - - // Push this tab to the top. - tabWidget->setCurrentWidget(editorWidget); - - // Give the EditorWidget the command text (read file, set line number, etc.). - editorWidget->sourceArea()->handleText(text); - - // Ask for the breakpoint list to be resent, in case the encountered breakpoint was temporary. - if (disp_text == "del") { - emit refreshBreakpointsList(); - } - - return; - - }else if (text.startsWith("*stopped,reason=\"function-finished\"")) { - - // *stopped, - // - // reason="function-finished", - // - // frame={addr="0x0000000000400b40", - // func="main", - // args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd5b8"}], - // file="helloworld.cpp", - // fullname="/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp", - // line="11", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="6" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // If there is no file to open, just exit. - if (fullname_text == "") { - return; - } - - // Get the EditorWidget for the file. Create one if needed. - SeerEditorWidget* editorWidget = editorWidgetTab(fullname_text); - - if (editorWidget == 0) { - editorWidget = createEditorWidgetTab(fullname_text, file_text, text); - } - - // Push this tab to the top. - tabWidget->setCurrentWidget(editorWidget); - - // Give the EditorWidget the command text (read file, set line number, etc.). - editorWidget->sourceArea()->handleText(text); - - return; - - }else if (text.startsWith("*stopped,reason=\"location-reached\"")) { - - // *stopped, - // - // reason=\"location-reached\", - // - // frame={addr=\"0x0000000000400607\", - // func=\"main\", - // args=[], - // file=\"helloonefile.cpp\", - // fullname=\"/home/erniep/Development/Peak/src/Seer/helloonefile/helloonefile.cpp\", - // line=\"35\", - // arch=\"i386:x86-64\"}, - // - // thread-id=\"1\", - // stopped-threads=\"all\", - // core=\"1\" + if (text.startsWith("*stopped,")) { QString newtext = Seer::filterEscapes(text); // Filter escaped characters. @@ -382,112 +191,19 @@ void SeerEditorManagerWidget::handleText (const QString& text) { // Give the EditorWidget the command text (read file, set line number, etc.). editorWidget->sourceArea()->handleText(text); - return; + // Handle certain reasons uniquely. + QString reason_text = Seer::parseFirst(newtext, "reason=", '"', '"', false); - }else if (text.startsWith("*stopped,reason=\"signal-received\"")) { + if (reason_text == "breakpoint-hit") { + QString disp_text = Seer::parseFirst(newtext, "disp=", '"', '"', false); - // *stopped, - // - // reason=\"signal-received\", - // signal-name=\"SIGSEGV\", - // signal-meaning=\"Segmentation fault\", - // - // frame={addr=\"0x00007ffff712a420\", - // func=\"raise\", - // args=[], - // from=\"/lib64/libc.so.6\", - // arch=\"i386:x86-64\"}, - // - // thread-id=\"1\", - // stopped-threads=\"all\", - // core=\"6\" + // Ask for the breakpoint list to be resent, in case the encountered breakpoint was temporary. + if (disp_text == "del") { + emit refreshBreakpointsList(); + } - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; } - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // If there is no file to open, just exit. - if (fullname_text == "" || file_text == "") { - return; - } - - // Get the EditorWidget for the file. Create one if needed. - SeerEditorWidget* editorWidget = editorWidgetTab(fullname_text); - - if (editorWidget == 0) { - editorWidget = createEditorWidgetTab(fullname_text, file_text, text); - } - - // Push this tab to the top. - tabWidget->setCurrentWidget(editorWidget); - - // Give the EditorWidget the command text (read file, set line number, etc.). - editorWidget->sourceArea()->handleText(text); - - return; - - }else if (text.startsWith("*stopped,frame=")) { - - // *stopped, - // - // frame={addr="0x00007ff831151329", - // func="cfft", - // args=[{name="a",value="..."}, - // {name="n",value="512"}, - // {name="iflg",value="1"}], - // file="sssMathlib.f", - // fullname="/home/erniep/Development/Peak/src/Core/Math/sssMathlib.f", - // line="767", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="3" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // If there is no file to open, just exit. - if (fullname_text == "" || file_text == "") { - return; - } - - // Get the EditorWidget for the file. Create one if needed. - SeerEditorWidget* editorWidget = editorWidgetTab(fullname_text); - - if (editorWidget == 0) { - editorWidget = createEditorWidgetTab(fullname_text, file_text, text); - } - - // Push this tab to the top. - tabWidget->setCurrentWidget(editorWidget); - - // Give the EditorWidget the command text (read file, set line number, etc.). - editorWidget->sourceArea()->handleText(text); - return; }else if (text.startsWith("^done,BreakpointTable={") && text.endsWith("}")) { diff --git a/src/SeerEditorWidgetSourceArea.cpp b/src/SeerEditorWidgetSourceArea.cpp index a6c0c4a..20b5d89 100644 --- a/src/SeerEditorWidgetSourceArea.cpp +++ b/src/SeerEditorWidgetSourceArea.cpp @@ -1221,7 +1221,7 @@ bool SeerEditorWidgetSourceArea::highlighterEnabled () const { void SeerEditorWidgetSourceArea::handleText (const QString& text) { - if (text.startsWith("*stopped,reason=\"end-stepping-range\"")) { + if (text.startsWith("*stopped,")) { // *stopped, // @@ -1264,223 +1264,6 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { return; - }else if (text.startsWith("*stopped,reason=\"breakpoint-hit\"")) { - // *stopped, - // - // reason="breakpoint-hit", - // - // disp="del", - // bkptno="1", - // - // frame={addr="0x0000000000400b07", - // func="main", - // args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd5b8"}], - // file="helloworld.cpp", - // fullname="/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp", - // line="7", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="1" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // Read the file if it hasn't been read before or if we are reading a different file. - if (fullname_text != fullname()) { - open(fullname_text, file_text); - } - - // Set to the line number. - setCurrentLine(line_text.toInt()); - - return; - - }else if (text.startsWith("*stopped,reason=\"function-finished\"")) { - - // *stopped, - // - // reason="function-finished", - // - // frame={addr="0x0000000000400b40", - // func="main", - // args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd5b8"}], - // file="helloworld.cpp", - // fullname="/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp", - // line="11", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="6" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // Read the file if it hasn't been read before or if we are reading a different file. - if (fullname_text != fullname()) { - open(fullname_text, file_text); - } - - // Set to the line number. - setCurrentLine(line_text.toInt()); - - return; - - }else if (text.startsWith("*stopped,reason=\"location-reached\"")) { - - // *stopped, - // - // reason="location-reached", - // - // frame={addr=\"0x0000000000400607\", - // func=\"main\", - // args=[], - // file=\"helloonefile.cpp\", - // fullname=\"/home/erniep/Development/Peak/src/Seer/helloonefile/helloonefile.cpp\", - // line=\"35\", - // arch=\"i386:x86-64\"}, - // - // thread-id=\"1\", - // stopped-threads=\"all\", - // core=\"1\" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // Read the file if it hasn't been read before or if we are reading a different file. - if (fullname_text != fullname()) { - open(fullname_text, file_text); - } - - // Set to the line number. - setCurrentLine(line_text.toInt()); - - return; - - }else if (text.startsWith("*stopped,reason=\"signal-received\"")) { - - // *stopped, - // - // reason=\"signal-received\", - // signal-name=\"SIGSEGV\", - // signal-meaning=\"Segmentation fault\", - // - // frame={addr=\"0x00007ffff712a420\", - // func=\"raise\", - // args=[], - // from=\"/lib64/libc.so.6\", - // arch=\"i386:x86-64\"}, - // - // thread-id=\"1\", - // stopped-threads=\"all\", - // core=\"6\" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // Read the file if it hasn't been read before or if we are reading a different file. - if (fullname_text != fullname()) { - open(fullname_text, file_text); - } - - // Set to the line number. - setCurrentLine(line_text.toInt()); - - return; - - }else if (text.startsWith("*stopped,frame=")) { - - // *stopped, - // - // frame={addr="0x00007ff831151329", - // func="cfft", - // args=[{name="a",value="..."}, - // {name="n",value="512"}, - // {name="iflg",value="1"}], - // file="sssMathlib.f", - // fullname="/home/erniep/Development/Peak/src/Core/Math/sssMathlib.f", - // line="767", - // arch="i386:x86-64"}, - // - // thread-id="1", - // stopped-threads="all", - // core="3" - - QString newtext = Seer::filterEscapes(text); // Filter escaped characters. - - QString frame_text = Seer::parseFirst(newtext, "frame=", '{', '}', false); - - if (frame_text == "") { - return; - } - - QString fullname_text = Seer::parseFirst(frame_text, "fullname=", '"', '"', false); - QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); - QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; - - // Read the file if it hasn't been read before or if we are reading a different file. - if (fullname_text != fullname()) { - open(fullname_text, file_text); - } - - // Set to the line number. - setCurrentLine(line_text.toInt()); - - return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { // 10^done,value="1" diff --git a/src/SeerGdbWidget.cpp b/src/SeerGdbWidget.cpp index d35947c..dd6bb5b 100644 --- a/src/SeerGdbWidget.cpp +++ b/src/SeerGdbWidget.cpp @@ -316,53 +316,9 @@ void SeerGdbWidget::handleText (const QString& text) { if (text.startsWith("*running,thread-id=\"all\"")) { // Probably a better way to handle all these types of stops. - }else if (text.startsWith("*stopped,reason=\"breakpoint-hit\"")) { + }else if (text.startsWith("*stopped,")) { emit stoppingPointReached(); - }else if (text.startsWith("*stopped,reason=\"watchpoint-trigger\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"read-watchpoint-trigger\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"access-watchpoint-trigger\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"watchpoint-scope\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,hw-awpt={")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"end-stepping-range\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"function-finished\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"location-reached\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"signal-received\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"exited-normally\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"exited-signalled\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,reason=\"exited\"")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,frame=")) { - emit stoppingPointReached(); - - }else if (text.startsWith("*stopped,bkptno=")) { - if (text.contains("reason=\"breakpoint-hit\"")) { - emit stoppingPointReached(); - } - }else if (text.startsWith("=thread-group-started,")) { // =thread-group-started,id="i1",pid="30916" diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index e234dd3..123d582 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -463,20 +463,11 @@ void SeerMainWindow::handleText (const QString& text) { return; - }else if (text.startsWith("*stopped,frame=")) { - //*stopped,frame={addr=\"0x00007f0ee0d2d954\",func=\"rfft\",args=[{name=\"a\",value=\"...\"},... - //*stopped,frame={addr="0x00007f608ec49fc0",func="__pthread_clockjoin_ex",args=[],from="/lib64/libpthread.so.0",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3" - //*stopped,frame={addr="0x00007ff831151329",func="cfft",args=[{name="a",value="..."},{name="n",value="512"},{name="iflg",value="1"}],file="sssMathlib.f",fullname="/home/erniep/Development/Peak/src/Core/Math/sssMathlib.f",line="767",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3" - return; - - }else if (text.startsWith("*stopped,bkptno=")) { - return; - }else if (text.startsWith("^connected,frame=")) { //^connected,frame={level=\"0\",addr=\"0x00007f48351f80c1\",func=\"read\",args=[],from=\"/lib64/libc.so.6\",arch=\"i386:x86-64\"}" return; - }else if (text.startsWith("*stopped,reason=\"") || text.startsWith("*stopped,hw-awpt={")) { + }else if (text.startsWith("*stopped,")) { QString reason_text = Seer::parseFirst(text, "reason=", '"', '"', false); diff --git a/src/SeerRunStatusIndicator.cpp b/src/SeerRunStatusIndicator.cpp index 9f12d32..d8f1ddf 100644 --- a/src/SeerRunStatusIndicator.cpp +++ b/src/SeerRunStatusIndicator.cpp @@ -51,70 +51,9 @@ void SeerRunStatusIndicator::handleText (const QString& text) { // *running,thread-id="2" setRunStatus(SeerRunStatusIndicator::Running); - }else if (text.startsWith("*stopped,reason=\"breakpoint-hit\"")) { + }else if (text.startsWith("*stopped,")) { setRunStatus(SeerRunStatusIndicator::Stopped); - }else if (text.startsWith("*stopped,reason=\"watchpoint-trigger\"")) { - - // *stopped,reason="watchpoint-trigger", ... - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"read-watchpoint-trigger\"")) { - - // *stopped,reason="read-watchpoint-trigger", ... - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"access-watchpoint-trigger\"")) { - - // *stopped,reason="access-watchpoint-trigger", ... - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"watchpoint-scope\"")) { - - // "*stopped,reason="watchpoint-scope\",wpnum="3", ... - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,hw-awpt={")) { - - // ??? May need to parse this more. Look at the 'reason'. - // "*stopped,hw-awpt={number=\"3\",exp=\"j\"},reason=\"access-watchpoint-trigger\", - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"end-stepping-range\"")) { - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"function-finished\"")) { - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"location-reached\"")) { - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"signal-received\"")) { - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,bkptno=")) { - if (text.contains("reason=\"breakpoint-hit\"")) { - setRunStatus(SeerRunStatusIndicator::Stopped); - } - - }else if (text.startsWith("*stopped,frame=")) { - //*stopped,frame={addr=\"0x00007f0ee0d2d954\",func=\"rfft\",args=[{name=\"a\",value=\"...\"},... - //*stopped,frame={addr="0x00007f608ec49fc0",func="__pthread_clockjoin_ex",args=[],from="/lib64/libpthread.so.0",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3" - //*stopped,frame={addr="0x00007ff831151329",func="cfft",args=[{name="a",value="..."},{name="n",value="512"},{name="iflg",value="1"}],file="sssMathlib.f",fullname="/home/erniep/Development/Peak/src/Core/Math/sssMathlib.f",line="767",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3" - setRunStatus(SeerRunStatusIndicator::Stopped); - - }else if (text.startsWith("*stopped,reason=\"exited-normally\"")) { - setRunStatus(SeerRunStatusIndicator::Idle); - - }else if (text.startsWith("*stopped,reason=\"exited-signalled\"")) { - - // "*stopped,reason=\"exited-signalled\",signal-name=\"SIGSEGV\",signal-meaning=\"Segmentation fault\"" - setRunStatus(SeerRunStatusIndicator::Idle); - - }else if (text.startsWith("*stopped,reason=\"exited\"")) { - setRunStatus(SeerRunStatusIndicator::Idle); - - }else if (text.startsWith("^connected,frame=")) { //^connected,frame={level=\"0\",addr=\"0x00007f48351f80c1\",func=\"read\",args=[],from=\"/lib64/libc.so.6\",arch=\"i386:x86-64\"}" return;