debugger: gracefully handle commands that might not produce output

This commit is contained in:
hjk
2009-12-11 16:59:34 +01:00
parent 2548779d1f
commit 1324a1c600
4 changed files with 60 additions and 23 deletions

View File

@@ -47,11 +47,12 @@
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
class QAction;
class QAbstractItemModel;
class QAction;
class QMainWindow;
class QMessageBox;
class QTimer;
class QWidget;
class QMainWindow;
QT_END_NAMESPACE
namespace Debugger {
@@ -177,6 +178,7 @@ private: ////////// Gdb Command Management //////////
Discardable = 2, // No need to wait for the reply before continuing inferior
RebuildModel = 4, // Trigger model rebuild when no such commands are pending any more
WatchUpdate = Discardable | RebuildModel,
NonCriticalResponse = 8, // We can live without recieving an answer
RunRequest = 16, // Callback expects GdbResultRunning instead of GdbResultDone
ExitRequest = 32, // Callback expects GdbResultExit instead of GdbResultDone
LosesChild = 64 // Auto-set inferior shutdown related states
@@ -233,6 +235,7 @@ private: ////////// Gdb Command Management //////////
void setTokenBarrier();
QHash<int, GdbCommand> m_cookieForToken;
int commandTimeoutTime() const;
QTimer *m_commandTimer;
QByteArray m_pendingConsoleStreamOutput;
@@ -476,7 +479,8 @@ private: ////////// Dumper Management //////////
private: ////////// Convenience Functions //////////
QString errorMessage(QProcess::ProcessError error);
void showMessageBox(int icon, const QString &title, const QString &text);
QMessageBox *showMessageBox(int icon, const QString &title, const QString &text,
int buttons = 0);
void debugMessage(const QString &msg);
QMainWindow *mainWindow() const;
};