Debugger: Fix "Run in Terminal" with lldb

Previously lldb never actually attached to the process running
in the terminal, but started its own copy.

Since the process is interrupted by the terminal stub already,
code was added to automatically continue the process.

"Start and break on main" and "Run in Terminal" also did not work
together and are now fixed.

Change-Id: Iaeb6e7dd0f511f3bf195ab5d0008856b310615d9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-03-07 17:30:23 +01:00
parent 4f8ad43c1e
commit cdfe9462af
3 changed files with 11 additions and 1 deletions

View File

@@ -279,8 +279,8 @@ void LldbEngine::handleLldbStarted()
? QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID)
: QString::fromLatin1("Attaching to %1").arg(attachedPID);
showMessage(msg, LogMisc);
cmd2.arg("startmode", DebuggerStartMode::AttachToLocalProcess);
cmd2.arg("attachpid", attachedPID);
} else {
cmd2.arg("startmode", rp.startMode);
// it is better not to check the start mode on the python sid (as we would have to duplicate the