forked from qt-creator/qt-creator
Debugger: Show output of debugger detection
... in tooltip of debugger path lineedit. Helps with cases where necessary libraries are missing. The tooltip is a bit hard to recognize, but as such cases now also are marked in red text there's at least some direct hint that something is not ok. Change-Id: Ic5da8dcb1921a98f91f6eed755fa87ce5feed698 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -151,7 +151,7 @@ static bool isUVisionExecutable(const QFileInfo &fileInfo)
|
||||
return baseName == "UV4";
|
||||
}
|
||||
|
||||
void DebuggerItem::reinitializeFromFile(const Environment &sysEnv)
|
||||
void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *error)
|
||||
{
|
||||
// CDB only understands the single-dash -version, whereas GDB and LLDB are
|
||||
// happy with both -version and --version. So use the "working" -version
|
||||
@@ -190,12 +190,14 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv)
|
||||
proc.setEnvironment(sysEnv);
|
||||
proc.setCommand({m_command, {version}});
|
||||
proc.runBlocking();
|
||||
const QString output = proc.allOutput().trimmed();
|
||||
if (proc.result() != QtcProcess::FinishedWithSuccess) {
|
||||
if (error)
|
||||
*error = output;
|
||||
m_engineType = NoEngineType;
|
||||
return;
|
||||
}
|
||||
m_abis.clear();
|
||||
const QString output = proc.allOutput().trimmed();
|
||||
if (output.contains("gdb")) {
|
||||
m_engineType = GdbEngineType;
|
||||
|
||||
@@ -263,6 +265,8 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv)
|
||||
m_engineType = PdbEngineType;
|
||||
return;
|
||||
}
|
||||
if (error)
|
||||
*error = output;
|
||||
m_engineType = NoEngineType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user