debugger: add possibility to fake response packets to trigger error handling

Change-Id: Ieeb0daef594024b72e52c1180047835193e9341d
Reviewed-on: http://codereview.qt.nokia.com/340
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-06-06 18:17:51 +02:00
committed by hjk
parent 1ce1205666
commit 82272d9c22
2 changed files with 72 additions and 39 deletions

View File

@@ -80,6 +80,11 @@ enum DebuggingHelperState
};
enum GdbTestCase
{
GdbTestNoBoundsOfCurrentFunction = 1
};
class UpdateParameters
{
public:
@@ -389,6 +394,9 @@ private: ////////// Gdb Command Management //////////
Q_SLOT void commandTimeout();
void setTokenBarrier();
// Sets up an "unexpected result" for the following commeand.
void scheduleTestResponse(int testCase, const QByteArray &response);
QHash<int, GdbCommand> m_cookieForToken;
int commandTimeoutTime() const;
QTimer m_commandTimer;
@@ -413,7 +421,7 @@ private: ////////// Gdb Command Management //////////
private: ////////// Gdb Output, State & Capability Handling //////////
void handleResponse(const QByteArray &buff);
Q_SLOT void handleResponse(const QByteArray &buff);
void handleStopResponse(const GdbMi &data);
void handleResultRecord(GdbResponse *response);
void handleStop0(const GdbMi &data);
@@ -724,6 +732,9 @@ private: ////////// View & Data Stuff //////////
QString m_lastWinException;
int m_qFatalBreakpointNumber;
bool m_actingOnExpectedStop;
QHash<int, QByteArray> m_scheduledTestResponses;
QSet<int> m_testCases;
};
} // namespace Internal