From 27279c3663b20bf688f159aa1004f46291f58b7c Mon Sep 17 00:00:00 2001 From: Arvid Ephraim Picciani Date: Thu, 2 Dec 2010 12:31:50 +0100 Subject: [PATCH] lldb: change startup sequence to preload the binary --- .../debugger/lldb/guest/lldbengineguest.cpp | 22 +++++++++++-------- src/plugins/debugger/lldb/ipcenginehost.cpp | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/plugins/debugger/lldb/guest/lldbengineguest.cpp b/src/plugins/debugger/lldb/guest/lldbengineguest.cpp index d1e0986d746..85cba03cf92 100644 --- a/src/plugins/debugger/lldb/guest/lldbengineguest.cpp +++ b/src/plugins/debugger/lldb/guest/lldbengineguest.cpp @@ -147,11 +147,6 @@ void LldbEngineGuest::setupInferior(const QString &executable, notifyInferiorSetupFailed(); return; } - notifyInferiorSetupOk(); -} - -void LldbEngineGuest::runEngine() -{ DEBUG_FUNC_ENTER; const char **argp = new const char *[m_arguments.count() + 1]; @@ -166,13 +161,12 @@ void LldbEngineGuest::runEngine() envp[i] = m_environment[i].data(); } 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()) { showMessage(QString::fromLocal8Bit(err.GetCString())); qDebug() << err.GetCString(); - notifyEngineRunFailed(); + notifyInferiorSetupFailed(); } /* @@ -187,6 +181,13 @@ void LldbEngineGuest::runEngine() m_listener->StartListeningForEvents(m_process->GetBroadcaster(), UINT32_MAX); QMetaObject::invokeMethod(m_worker, "listen", Qt::QueuedConnection, Q_ARG(lldb::SBListener *, m_listener)); + notifyInferiorSetupOk(); +} + +void LldbEngineGuest::runEngine() +{ + DEBUG_FUNC_ENTER; + m_process->Continue(); } void LldbEngineGuest::shutdownInferior() @@ -430,10 +431,13 @@ void LldbEngineGuest::addBreakpoint(BreakpointId id, bp.lineNumber = bp.lineNumber; bp.fileName = bp.fileName; notifyAddBreakpointOk(id); + showMessage(QLatin1String("[BB] ok.")); notifyBreakpointAdjusted(id, bp); } else { m_breakpoints.take(id); - notifyAddBreakpointFailed(id); + showMessage(QLatin1String("[BB] failed. cant resolve yet")); +// notifyAddBreakpointFailed(id); +// notifyAddBreakpointOk(id); } } else { showMessage(QLatin1String("[BB] failed. dunno.")); diff --git a/src/plugins/debugger/lldb/ipcenginehost.cpp b/src/plugins/debugger/lldb/ipcenginehost.cpp index 70ec5013e97..c67f6915845 100644 --- a/src/plugins/debugger/lldb/ipcenginehost.cpp +++ b/src/plugins/debugger/lldb/ipcenginehost.cpp @@ -494,6 +494,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload) break; case IPCEngineGuest::NotifyAddBreakpointOk: { + attemptBreakpointSynchronization(); QDataStream s(payload); SET_NATIVE_BYTE_ORDER(s); BreakpointId id;