forked from qt-creator/qt-creator
Debugger: Transform remaining fields of DebuggerRunParameters
Transform peripheralDescriptionFile and UVision-related. Task-number: QTCREATORBUG-29168 Change-Id: I360f9370be4e8d7c80f09374fbe7ed4be4a73ad5 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -151,7 +151,7 @@ bool GdbServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMessa
|
||||
rp.setRemoteChannel(channelString());
|
||||
rp.setUseContinueInsteadOfRun(true);
|
||||
rp.setUseExtendedRemote(useExtendedRemote());
|
||||
rp.peripheralDescriptionFile = m_peripheralDescriptionFile;
|
||||
rp.setPeripheralDescriptionFile(m_peripheralDescriptionFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -185,10 +185,10 @@ bool UvscServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMess
|
||||
ProcessRunData inferior;
|
||||
inferior.command.setExecutable(bin);
|
||||
DebuggerRunParameters &rp = runTool->runParameters();
|
||||
rp.peripheralDescriptionFile = peripheralDescriptionFile;
|
||||
rp.uVisionProjectFilePath = projFilePath;
|
||||
rp.uVisionOptionsFilePath = optFilePath;
|
||||
rp.uVisionSimulator = isSimulator();
|
||||
rp.setPeripheralDescriptionFile(peripheralDescriptionFile);
|
||||
rp.setUVisionProjectFilePath(projFilePath);
|
||||
rp.setUVisionOptionsFilePath(optFilePath);
|
||||
rp.setUVisionSimulator(isSimulator());
|
||||
rp.setInferior(inferior);
|
||||
rp.setSymbolFile(bin);
|
||||
rp.setStartMode(AttachToRemoteServer);
|
||||
|
@@ -244,13 +244,17 @@ public:
|
||||
int qtVersion() const { return m_qtVersion; }
|
||||
QString qtNamespace() const { return m_qtNamespace; };
|
||||
|
||||
// Common debugger constants.
|
||||
Utils::FilePath peripheralDescriptionFile;
|
||||
void setPeripheralDescriptionFile(const Utils::FilePath &path) { m_peripheralDescriptionFile = path; }
|
||||
Utils::FilePath peripheralDescriptionFile() const { return m_peripheralDescriptionFile; }
|
||||
|
||||
// UVSC-specific debugger constants.
|
||||
Utils::FilePath uVisionProjectFilePath;
|
||||
Utils::FilePath uVisionOptionsFilePath;
|
||||
bool uVisionSimulator = false;
|
||||
void setUVisionProjectFilePath(const Utils::FilePath &path) { m_uVisionProjectFilePath = path; }
|
||||
Utils::FilePath uVisionProjectFilePath() const { return m_uVisionProjectFilePath; }
|
||||
|
||||
void setUVisionOptionsFilePath(const Utils::FilePath &path) { m_uVisionOptionsFilePath = path; }
|
||||
Utils::FilePath uVisionOptionsFilePath() const { return m_uVisionOptionsFilePath; }
|
||||
|
||||
void setUVisionSimulator(bool on) { m_uVisionSimulator = on; }
|
||||
bool uVisionSimulator() const { return m_uVisionSimulator; }
|
||||
|
||||
private:
|
||||
DebuggerStartMode m_startMode = NoStartMode;
|
||||
@@ -339,6 +343,11 @@ private:
|
||||
|
||||
int m_qtVersion = 0;
|
||||
QString m_qtNamespace;
|
||||
|
||||
Utils::FilePath m_peripheralDescriptionFile; // Common debugger constant.
|
||||
Utils::FilePath m_uVisionProjectFilePath; // UVSC-specific debugger constant.
|
||||
Utils::FilePath m_uVisionOptionsFilePath; // UVSC-specific debugger constant.
|
||||
bool m_uVisionSimulator = false;
|
||||
};
|
||||
|
||||
namespace Internal {
|
||||
|
@@ -625,9 +625,9 @@ void PeripheralRegisterHandler::updateRegisterGroups()
|
||||
clear();
|
||||
|
||||
const DebuggerRunParameters &rp = m_engine->runParameters();
|
||||
if (!rp.peripheralDescriptionFile.exists())
|
||||
if (!rp.peripheralDescriptionFile().exists())
|
||||
return;
|
||||
m_peripheralRegisterGroups = availablePeripheralRegisterGroups(rp.peripheralDescriptionFile);
|
||||
m_peripheralRegisterGroups = availablePeripheralRegisterGroups(rp.peripheralDescriptionFile());
|
||||
}
|
||||
|
||||
void PeripheralRegisterHandler::updateRegister(quint64 address, quint64 value)
|
||||
|
@@ -514,8 +514,8 @@ void UvscEngine::updateAll()
|
||||
bool UvscEngine::configureProject(const DebuggerRunParameters &rp)
|
||||
{
|
||||
// Fetch patchs for the generated uVision project files.
|
||||
const FilePath optionsPath = rp.uVisionOptionsFilePath;
|
||||
const FilePath projectPath = rp.uVisionProjectFilePath;
|
||||
const FilePath optionsPath = rp.uVisionOptionsFilePath();
|
||||
const FilePath projectPath = rp.uVisionProjectFilePath();
|
||||
|
||||
showMessage("UVSC: LOADING PROJECT...");
|
||||
if (!optionsPath.exists()) {
|
||||
@@ -533,7 +533,7 @@ bool UvscEngine::configureProject(const DebuggerRunParameters &rp)
|
||||
}
|
||||
|
||||
showMessage("UVSC: SETTING PROJECT DEBUG TARGET...");
|
||||
m_simulator = rp.uVisionSimulator;
|
||||
m_simulator = rp.uVisionSimulator();
|
||||
if (!m_client->setProjectDebugTarget(m_simulator)) {
|
||||
handleSetupFailure(Tr::tr("Internal error: Unable to set the uVision debug target: %1.")
|
||||
.arg(m_client->errorString()));
|
||||
@@ -582,7 +582,7 @@ void UvscEngine::handleProjectClosed()
|
||||
m_loadingRequired = false;
|
||||
|
||||
const DebuggerRunParameters &rp = runParameters();
|
||||
const FilePath projectPath = rp.uVisionProjectFilePath;
|
||||
const FilePath projectPath = rp.uVisionProjectFilePath();
|
||||
|
||||
// This magic function removes specific files from the uVision
|
||||
// project directory. Without of this we can't enumerate the local
|
||||
|
Reference in New Issue
Block a user