Commit 1610c14d authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

make direct call of handleStop1() more elegant

parent b84d2f32
......@@ -1110,8 +1110,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
}
if (isStoppedReason(reason) || reason.isEmpty()) {
QVariant var = QVariant::fromValue<GdbMi>(data);
// Don't load helpers on stops triggered by signals unless it's
// an intentional trap.
bool initHelpers = m_debuggingHelperState == DebuggingHelperUninitialized;
......@@ -1121,11 +1119,10 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
if (initHelpers) {
tryLoadDebuggingHelpers();
QVariant var = QVariant::fromValue<GdbMi>(data);
postCommand(_("p 4"), CB(handleStop1), var); // dummy
} else {
GdbResponse response;
response.cookie = var;
handleStop1(response);
handleStop1(data);
}
return;
}
......@@ -1153,7 +1150,11 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
void GdbEngine::handleStop1(const GdbResponse &response)
{
GdbMi data = response.cookie.value<GdbMi>();
handleStop1(response.cookie.value<GdbMi>());
}
void GdbEngine::handleStop1(const GdbMi &data)
{
QByteArray reason = data.findChild("reason").data();
if (m_modulesListOutdated) {
reloadModules();
......
......@@ -259,6 +259,7 @@ private:
void handleStart(const GdbResponse &response);
void handleStopResponse(const GdbMi &data);
void handleStop1(const GdbResponse &response);
void handleStop1(const GdbMi &data);
void handleStop2(const GdbResponse &response);
void handleStop2(const GdbMi &data);
void handleResultRecord(const GdbResponse &response);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment