mirror of
https://github.com/epasveer/seer.git
synced 2026-08-31 01:20:45 +08:00
Clean up some things for thread handling.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "SeerStackManagerWidget.h"
|
||||
#include "SeerUtl.h"
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtCore/QDebug>
|
||||
@@ -51,5 +52,58 @@ void SeerStackManagerWidget::handleRefreshToolButtonClicked () {
|
||||
stackFramesBrowserWidget()->refresh();
|
||||
stackArgumentsBrowserWidget()->refresh();
|
||||
stackLocalsBrowserWidget()->refresh();
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
void SeerStackManagerWidget::handleText (const QString& text) {
|
||||
|
||||
// Don't do any work if the widget is hidden.
|
||||
if (isHidden()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QApplication::setOverrideCursor(Qt::BusyCursor);
|
||||
|
||||
if (text.startsWith("^done,thread-ids={")) {
|
||||
|
||||
QString newtext = Seer::filterEscapes(text); // Filter escaped characters.
|
||||
|
||||
// ^done,thread-ids={
|
||||
// thread-id=\"1\",
|
||||
// thread-id=\"2\"
|
||||
// },
|
||||
// current-thread-id=\"1\",
|
||||
// number-of-threads=\"2\"
|
||||
|
||||
QString currentthreadid_text = Seer::parseFirst(newtext, "current-thread-id=", '"', '"', false);
|
||||
|
||||
groupBox->setTitle("Stack Info for Thread Id : " + currentthreadid_text);
|
||||
|
||||
}else if (text.startsWith("^error,msg=\"No registers.\"")) {
|
||||
|
||||
groupBox->setTitle("Stack Info");
|
||||
|
||||
}else{
|
||||
// Ignore others.
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void SeerStackManagerWidget::handleStoppingPointReached () {
|
||||
|
||||
// Don't do any work if the widget is hidden.
|
||||
if (isHidden()) {
|
||||
return;
|
||||
}
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
void SeerStackManagerWidget::refresh () {
|
||||
|
||||
emit refreshThreadFrames();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user