LldbEngine: Don't blocking wait for ready read

It doesn't seem that the blocking wait for ready read
is needed, as in case of Android plugin it always times out
without anything being read.

The wait was introduced in 59640aa7aa.

Delay the notification about successful start of debuged android
process until the tempDebugServerPath is found.

Change-Id: Id1f3e9df195d864f3fbf1ff57cb0f704d09657ef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Jarek Kobus
2024-09-16 16:30:29 +02:00
parent d9a136ae6e
commit ea77f3f02d
2 changed files with 10 additions and 7 deletions

View File

@@ -642,10 +642,14 @@ static ExecutableItem uploadDebugServerRecipe(RunnerStorage *storage, const QStr
*tempDebugServerPathStorage = tempDebugServerPath(iterator.iteration()); *tempDebugServerPathStorage = tempDebugServerPath(iterator.iteration());
return true; return true;
}; };
const auto onTempDebugServerPath = [tempDebugServerPathStorage] { const auto onTempDebugServerPath = [storage, tempDebugServerPathStorage] {
const bool tempDirOK = !tempDebugServerPathStorage->isEmpty(); const bool tempDirOK = !tempDebugServerPathStorage->isEmpty();
if (!tempDirOK) if (tempDirOK) {
emit storage->remoteProcessStarted(s_localDebugServerPort, storage->m_qmlServer,
storage->m_processPID);
} else {
qCDebug(androidRunWorkerLog) << "Can not get temporary file name"; qCDebug(androidRunWorkerLog) << "Can not get temporary file name";
}
return tempDirOK; return tempDirOK;
}; };
@@ -843,8 +847,10 @@ static ExecutableItem pidRecipe(RunnerStorage *storage)
if (ok) { if (ok) {
storage->m_processUser = processUser; storage->m_processUser = processUser;
qCDebug(androidRunWorkerLog) << "Process ID changed to:" << storage->m_processPID; qCDebug(androidRunWorkerLog) << "Process ID changed to:" << storage->m_processPID;
emit storage->remoteProcessStarted(s_localDebugServerPort, storage->m_qmlServer, if (!storage->m_useCppDebugger) {
storage->m_processPID); emit storage->remoteProcessStarted(s_localDebugServerPort, storage->m_qmlServer,
storage->m_processPID);
}
return DoneResult::Success; return DoneResult::Success;
} }
} }

View File

@@ -218,9 +218,6 @@ void LldbEngine::setupEngine()
void LldbEngine::handleLldbStarted() void LldbEngine::handleLldbStarted()
{ {
using namespace std::chrono_literals;
m_lldbProc.waitForReadyRead(1s);
showStatusMessage(Tr::tr("Setting up inferior...")); showStatusMessage(Tr::tr("Setting up inferior..."));
const DebuggerRunParameters &rp = runParameters(); const DebuggerRunParameters &rp = runParameters();