forked from qt-creator/qt-creator
lldb: change startup sequence to preload the binary
This commit is contained in:
@@ -147,11 +147,6 @@ void LldbEngineGuest::setupInferior(const QString &executable,
|
|||||||
notifyInferiorSetupFailed();
|
notifyInferiorSetupFailed();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
notifyInferiorSetupOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LldbEngineGuest::runEngine()
|
|
||||||
{
|
|
||||||
DEBUG_FUNC_ENTER;
|
DEBUG_FUNC_ENTER;
|
||||||
|
|
||||||
const char **argp = new const char *[m_arguments.count() + 1];
|
const char **argp = new const char *[m_arguments.count() + 1];
|
||||||
@@ -166,13 +161,12 @@ void LldbEngineGuest::runEngine()
|
|||||||
envp[i] = m_environment[i].data();
|
envp[i] = m_environment[i].data();
|
||||||
}
|
}
|
||||||
lldb::SBError err;
|
lldb::SBError err;
|
||||||
*m_process = m_target->Launch(argp, envp, NULL, NULL, false, err);
|
*m_process = m_target->Launch(argp, envp, NULL, NULL, true, err);
|
||||||
|
|
||||||
|
|
||||||
if (!err.Success()) {
|
if (!err.Success()) {
|
||||||
showMessage(QString::fromLocal8Bit(err.GetCString()));
|
showMessage(QString::fromLocal8Bit(err.GetCString()));
|
||||||
qDebug() << err.GetCString();
|
qDebug() << err.GetCString();
|
||||||
notifyEngineRunFailed();
|
notifyInferiorSetupFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -187,6 +181,13 @@ void LldbEngineGuest::runEngine()
|
|||||||
m_listener->StartListeningForEvents(m_process->GetBroadcaster(), UINT32_MAX);
|
m_listener->StartListeningForEvents(m_process->GetBroadcaster(), UINT32_MAX);
|
||||||
QMetaObject::invokeMethod(m_worker, "listen", Qt::QueuedConnection,
|
QMetaObject::invokeMethod(m_worker, "listen", Qt::QueuedConnection,
|
||||||
Q_ARG(lldb::SBListener *, m_listener));
|
Q_ARG(lldb::SBListener *, m_listener));
|
||||||
|
notifyInferiorSetupOk();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LldbEngineGuest::runEngine()
|
||||||
|
{
|
||||||
|
DEBUG_FUNC_ENTER;
|
||||||
|
m_process->Continue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LldbEngineGuest::shutdownInferior()
|
void LldbEngineGuest::shutdownInferior()
|
||||||
@@ -430,10 +431,13 @@ void LldbEngineGuest::addBreakpoint(BreakpointId id,
|
|||||||
bp.lineNumber = bp.lineNumber;
|
bp.lineNumber = bp.lineNumber;
|
||||||
bp.fileName = bp.fileName;
|
bp.fileName = bp.fileName;
|
||||||
notifyAddBreakpointOk(id);
|
notifyAddBreakpointOk(id);
|
||||||
|
showMessage(QLatin1String("[BB] ok."));
|
||||||
notifyBreakpointAdjusted(id, bp);
|
notifyBreakpointAdjusted(id, bp);
|
||||||
} else {
|
} else {
|
||||||
m_breakpoints.take(id);
|
m_breakpoints.take(id);
|
||||||
notifyAddBreakpointFailed(id);
|
showMessage(QLatin1String("[BB] failed. cant resolve yet"));
|
||||||
|
// notifyAddBreakpointFailed(id);
|
||||||
|
// notifyAddBreakpointOk(id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showMessage(QLatin1String("[BB] failed. dunno."));
|
showMessage(QLatin1String("[BB] failed. dunno."));
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
|||||||
break;
|
break;
|
||||||
case IPCEngineGuest::NotifyAddBreakpointOk:
|
case IPCEngineGuest::NotifyAddBreakpointOk:
|
||||||
{
|
{
|
||||||
|
attemptBreakpointSynchronization();
|
||||||
QDataStream s(payload);
|
QDataStream s(payload);
|
||||||
SET_NATIVE_BYTE_ORDER(s);
|
SET_NATIVE_BYTE_ORDER(s);
|
||||||
BreakpointId id;
|
BreakpointId id;
|
||||||
|
|||||||
Reference in New Issue
Block a user