added a detailed error description if ptrace is not permitted

Change-Id: I555fddcabdd2311e55907073c15d5627d3283a73
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
David Schulz
2012-01-02 10:42:01 +01:00
committed by hjk
parent 34933799fa
commit fad4599174
4 changed files with 34 additions and 3 deletions

View File

@@ -92,12 +92,20 @@ void AttachGdbAdapter::runEngine()
void AttachGdbAdapter::handleAttach(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
if (response.resultClass == GdbResultDone || response.resultClass == GdbResultRunning) {
switch (response.resultClass) {
case GdbResultDone:
case GdbResultRunning:
showMessage(_("INFERIOR ATTACHED"));
showMessage(msgAttachedToStoppedInferior(), StatusBar);
m_engine->handleInferiorPrepared();
//m_engine->updateAll();
} else {
break;
case GdbResultError:
if (response.data.findChild("msg").data() == "ptrace: Operation not permitted.") {
m_engine->notifyInferiorSetupFailed(DumperHelper::msgPtraceErr(startParameters().startMode));
break;
}
// if msg != "ptrace: ..." fall through
default:
QString msg = QString::fromLocal8Bit(response.data.findChild("msg").data());
m_engine->notifyInferiorSetupFailed(msg);
}