forked from qt-creator/qt-creator
Debugger: Transform DebuggerRunParameters::continueAfterAttach
Task-number: QTCREATORBUG-29168 Change-Id: I276abe8ec00fb83b427782feba7a282806ea4a99 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -122,7 +122,7 @@ public:
|
|||||||
rp.setStartMode(Debugger::AttachToRemoteServer);
|
rp.setStartMode(Debugger::AttachToRemoteServer);
|
||||||
rp.setCloseMode(KillAndExitMonitorAtClose);
|
rp.setCloseMode(KillAndExitMonitorAtClose);
|
||||||
rp.setUseContinueInsteadOfRun(true);
|
rp.setUseContinueInsteadOfRun(true);
|
||||||
worker->setContinueAfterAttach(true);
|
rp.setContinueAfterAttach(true);
|
||||||
rp.addSolibSearchDir("%{sysroot}/system/lib");
|
rp.addSolibSearchDir("%{sysroot}/system/lib");
|
||||||
|
|
||||||
auto debuggee = createQdbDeviceInferiorWorker(runControl, QmlDebuggerServices);
|
auto debuggee = createQdbDeviceInferiorWorker(runControl, QmlDebuggerServices);
|
||||||
|
@@ -158,7 +158,9 @@ public:
|
|||||||
}
|
}
|
||||||
QString deviceSymbolsRoot() const { return m_deviceSymbolsRoot; }
|
QString deviceSymbolsRoot() const { return m_deviceSymbolsRoot; }
|
||||||
|
|
||||||
bool continueAfterAttach = false;
|
void setContinueAfterAttach(bool on) { m_continueAfterAttach = on; }
|
||||||
|
bool continueAfterAttach() const { return m_continueAfterAttach; }
|
||||||
|
|
||||||
Utils::FilePath sysRoot;
|
Utils::FilePath sysRoot;
|
||||||
// iOS 17+
|
// iOS 17+
|
||||||
QString deviceUuid;
|
QString deviceUuid;
|
||||||
@@ -262,6 +264,7 @@ private:
|
|||||||
QString m_lldbPlatform;
|
QString m_lldbPlatform;
|
||||||
|
|
||||||
QString m_deviceSymbolsRoot;
|
QString m_deviceSymbolsRoot;
|
||||||
|
bool m_continueAfterAttach = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
@@ -1678,7 +1678,7 @@ void DebuggerPluginPrivate::attachToRunningApplication()
|
|||||||
rp.setStartMode(AttachToRemoteProcess);
|
rp.setStartMode(AttachToRemoteProcess);
|
||||||
rp.setCloseMode(DetachAtClose);
|
rp.setCloseMode(DetachAtClose);
|
||||||
rp.setUseContinueInsteadOfRun(true);
|
rp.setUseContinueInsteadOfRun(true);
|
||||||
debugger->setContinueAfterAttach(false);
|
rp.setContinueAfterAttach(false);
|
||||||
|
|
||||||
runControl->start();
|
runControl->start();
|
||||||
}
|
}
|
||||||
@@ -1747,7 +1747,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
|
|||||||
rp.setInferiorExecutable(device->filePath(processInfo.executable));
|
rp.setInferiorExecutable(device->filePath(processInfo.executable));
|
||||||
rp.setStartMode(AttachToLocalProcess);
|
rp.setStartMode(AttachToLocalProcess);
|
||||||
rp.setCloseMode(DetachAtClose);
|
rp.setCloseMode(DetachAtClose);
|
||||||
debugger->setContinueAfterAttach(contAfterAttach);
|
rp.setContinueAfterAttach(contAfterAttach);
|
||||||
|
|
||||||
runControl->start();
|
runControl->start();
|
||||||
|
|
||||||
|
@@ -108,11 +108,6 @@ void DebuggerRunTool::setSysRoot(const Utils::FilePath &sysRoot)
|
|||||||
m_runParameters.sysRoot = sysRoot;
|
m_runParameters.sysRoot = sysRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setContinueAfterAttach(bool on)
|
|
||||||
{
|
|
||||||
m_runParameters.continueAfterAttach = on;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerRunTool::setBreakOnMain(bool on)
|
void DebuggerRunTool::setBreakOnMain(bool on)
|
||||||
{
|
{
|
||||||
m_runParameters.breakOnMain = on;
|
m_runParameters.breakOnMain = on;
|
||||||
|
@@ -35,7 +35,6 @@ public:
|
|||||||
|
|
||||||
void setSysRoot(const Utils::FilePath &sysRoot);
|
void setSysRoot(const Utils::FilePath &sysRoot);
|
||||||
|
|
||||||
void setContinueAfterAttach(bool on);
|
|
||||||
void setBreakOnMain(bool on);
|
void setBreakOnMain(bool on);
|
||||||
void setUseTerminal(bool on);
|
void setUseTerminal(bool on);
|
||||||
void setUseDebugServer(Utils::ProcessHandle attachPid, bool essential, bool useMulti);
|
void setUseDebugServer(Utils::ProcessHandle attachPid, bool essential, bool useMulti);
|
||||||
|
@@ -4674,7 +4674,7 @@ void GdbEngine::handleLocalAttach(const DebuggerResponse &response)
|
|||||||
// receiving its '^done'.
|
// receiving its '^done'.
|
||||||
claimInitialBreakpoints();
|
claimInitialBreakpoints();
|
||||||
notifyEngineRunAndInferiorStopOk();
|
notifyEngineRunAndInferiorStopOk();
|
||||||
if (runParameters().continueAfterAttach)
|
if (runParameters().continueAfterAttach())
|
||||||
continueInferiorInternal();
|
continueInferiorInternal();
|
||||||
else
|
else
|
||||||
updateAll();
|
updateAll();
|
||||||
|
@@ -314,7 +314,7 @@ void LldbEngine::handleLldbStarted()
|
|||||||
|| rp.startMode() == AttachToRemoteServer)
|
|| rp.startMode() == AttachToRemoteServer)
|
||||||
? rp.remoteChannel() : QString()));
|
? rp.remoteChannel() : QString()));
|
||||||
QTC_CHECK(
|
QTC_CHECK(
|
||||||
!rp.continueAfterAttach
|
!rp.continueAfterAttach()
|
||||||
|| (rp.startMode() == AttachToRemoteProcess || rp.startMode() == AttachToLocalProcess
|
|| (rp.startMode() == AttachToRemoteProcess || rp.startMode() == AttachToLocalProcess
|
||||||
|| rp.startMode() == AttachToRemoteServer || rp.startMode() == AttachToIosDevice));
|
|| rp.startMode() == AttachToRemoteServer || rp.startMode() == AttachToIosDevice));
|
||||||
m_continueAtNextSpontaneousStop = false;
|
m_continueAtNextSpontaneousStop = false;
|
||||||
@@ -924,7 +924,7 @@ void LldbEngine::handleStateNotification(const GdbMi &item)
|
|||||||
} else if (newState == "enginerunfailed")
|
} else if (newState == "enginerunfailed")
|
||||||
notifyEngineRunFailed();
|
notifyEngineRunFailed();
|
||||||
else if (newState == "enginerunandinferiorrunok") {
|
else if (newState == "enginerunandinferiorrunok") {
|
||||||
if (runParameters().continueAfterAttach)
|
if (runParameters().continueAfterAttach())
|
||||||
m_continueAtNextSpontaneousStop = true;
|
m_continueAtNextSpontaneousStop = true;
|
||||||
notifyEngineRunAndInferiorRunOk();
|
notifyEngineRunAndInferiorRunOk();
|
||||||
} else if (newState == "enginerunandinferiorstopok") {
|
} else if (newState == "enginerunandinferiorstopok") {
|
||||||
|
@@ -949,7 +949,7 @@ void IosDebugSupport::start()
|
|||||||
const IosDeviceTypeAspect::Data *data = runControl()->aspectData<IosDeviceTypeAspect>();
|
const IosDeviceTypeAspect::Data *data = runControl()->aspectData<IosDeviceTypeAspect>();
|
||||||
QTC_ASSERT(data, reportFailure("Broken IosDeviceTypeAspect setup."); return);
|
QTC_ASSERT(data, reportFailure("Broken IosDeviceTypeAspect setup."); return);
|
||||||
rp.setDisplayName(data->applicationName);
|
rp.setDisplayName(data->applicationName);
|
||||||
setContinueAfterAttach(true);
|
rp.setContinueAfterAttach(true);
|
||||||
|
|
||||||
IosDevice::ConstPtr dev = std::dynamic_pointer_cast<const IosDevice>(device());
|
IosDevice::ConstPtr dev = std::dynamic_pointer_cast<const IosDevice>(device());
|
||||||
if (dev->type() == Ios::Constants::IOS_DEVICE_TYPE
|
if (dev->type() == Ios::Constants::IOS_DEVICE_TYPE
|
||||||
|
@@ -162,7 +162,7 @@ private:
|
|||||||
if (isCppDebugging()) {
|
if (isCppDebugging()) {
|
||||||
rp.setUseExtendedRemote(false);
|
rp.setUseExtendedRemote(false);
|
||||||
rp.setUseContinueInsteadOfRun(true);
|
rp.setUseContinueInsteadOfRun(true);
|
||||||
setContinueAfterAttach(true);
|
rp.setContinueAfterAttach(true);
|
||||||
rp.setRemoteChannel(runControl()->debugChannel());
|
rp.setRemoteChannel(runControl()->debugChannel());
|
||||||
rp.setSymbolFile(symbolFile);
|
rp.setSymbolFile(symbolFile);
|
||||||
|
|
||||||
|
@@ -1607,7 +1607,7 @@ void HeobData::processFinished()
|
|||||||
rp.setDisplayName(Tr::tr("Process %1").arg(m_data[1]));
|
rp.setDisplayName(Tr::tr("Process %1").arg(m_data[1]));
|
||||||
rp.setStartMode(AttachToLocalProcess);
|
rp.setStartMode(AttachToLocalProcess);
|
||||||
rp.setCloseMode(DetachAtClose);
|
rp.setCloseMode(DetachAtClose);
|
||||||
debugger->setContinueAfterAttach(true);
|
rp.setContinueAfterAttach(true);
|
||||||
rp.setInferiorExecutable(FilePath::fromString(Utils::imageName(m_data[1])));
|
rp.setInferiorExecutable(FilePath::fromString(Utils::imageName(m_data[1])));
|
||||||
|
|
||||||
connect(m_runControl, &RunControl::started, this, &HeobData::debugStarted);
|
connect(m_runControl, &RunControl::started, this, &HeobData::debugStarted);
|
||||||
|
Reference in New Issue
Block a user