Add library load/unload catch points.

This commit is contained in:
Ernie Pasveer
2022-01-13 11:03:24 -06:00
parent ffca84a922
commit 384838e5b0
8 changed files with 61 additions and 631 deletions
+13
View File
@@ -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"}
+13 -1
View File
@@ -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();
}
}
+22 -2
View File
@@ -15,7 +15,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="catchpointTypeGroupBox">
<property name="title">
<string>Catchpoint Type</string>
</property>
@@ -30,6 +30,16 @@
</attribute>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="loadRadioButton">
<property name="text">
<string>Catch on library 'load'</string>
</property>
<attribute name="buttonGroup">
<string notr="true">typeButtonGroup</string>
</attribute>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="rethrowRadioButton">
<property name="text">
@@ -40,6 +50,16 @@
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="unloadRadioButton">
<property name="text">
<string>Catch on library 'unload'</string>
</property>
<attribute name="buttonGroup">
<string notr="true">typeButtonGroup</string>
</attribute>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="catchRadioButton">
<property name="text">
@@ -69,7 +89,7 @@
<item row="1" column="1">
<widget class="QLineEdit" name="nameLineEdit">
<property name="placeholderText">
<string>Exception name as a regular expression.</string>
<string>Exception/Library name as a regular expression.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
+9 -293
View File
@@ -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("}")) {
+1 -218
View File
@@ -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"
+1 -45
View File
@@ -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"
+1 -10
View File
@@ -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);
+1 -62
View File
@@ -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;