| 150 | } |
| 151 | |
| 152 | void MIDebugJob::initializeStartupInfo(IExecutePlugin* execute, ILaunchConfiguration* launchConfiguration) |
| 153 | { |
| 154 | QString errorString; |
| 155 | const auto detectError = [&errorString, this](int errorCode) { |
| 156 | if (errorString.isEmpty()) { |
| 157 | return false; |
| 158 | } |
| 159 | setError(errorCode); |
| 160 | setErrorText(errorString); |
| 161 | return true; |
| 162 | }; |
| 163 | |
| 164 | auto executable = execute->executable(launchConfiguration, errorString).toLocalFile(); |
| 165 | if (detectError(InvalidExecutable)) { |
| 166 | return; |
| 167 | } |
| 168 | if (!QFileInfo{executable}.isExecutable()) { |
| 169 | setError(ExecutableIsNotExecutable); |
| 170 | setErrorText(i18n("'%1' is not an executable", executable)); |
| 171 | return; |
| 172 | } |
| 173 | |
| 174 | auto arguments = execute->arguments(launchConfiguration, errorString); |
| 175 | if (detectError(InvalidArguments)) { |
| 176 | return; |
| 177 | } |
| 178 | |
| 179 | QStringList terminal; |
| 180 | if (execute->useTerminal(launchConfiguration)) { |
| 181 | terminal = execute->terminal(launchConfiguration, errorString); |
| 182 | if (detectError(InvalidExternalTerminal)) { |
| 183 | return; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | m_startupInfo.reset(new InferiorStartupInfo{execute, launchConfiguration, std::move(executable), |
| 188 | std::move(arguments), std::move(terminal)}); |
| 189 | } |
| 190 | |
| 191 | MIExamineCoreJob::MIExamineCoreJob(MIDebuggerPlugin* plugin, CoreInfo coreInfo, QObject* parent) |
| 192 | : MIDebugJobBase(plugin, parent) |
nothing calls this directly
no test coverage detected