debugger: don't even attempt to load the python dumpers on Mac.

This commit is contained in:
hjk
2010-09-23 14:58:45 +02:00
parent 19a1210376
commit 5da888e73b
2 changed files with 24 additions and 22 deletions

View File

@@ -1545,19 +1545,24 @@ void GdbEngine::handleHasPython(const GdbResponse &response)
const GdbMi hasInferiorThreadList = data.findChild("hasInferiorThreadList");
m_hasInferiorThreadList = (hasInferiorThreadList.data().toInt() != 0);
} else {
m_hasPython = false;
if (m_gdbAdapter->dumperHandling()
== AbstractGdbAdapter::DumperLoadedByGdbPreload
&& checkDebuggingHelpersClassic()) {
QByteArray cmd = "set environment ";
cmd += Debugger::Constants::Internal::LD_PRELOAD_ENV_VAR;
cmd += ' ';
cmd += startParameters().startMode == StartRemoteGdb
? startParameters().remoteDumperLib
: qtDumperLibraryName().toLocal8Bit();
postCommand(cmd);
m_debuggingHelperState = DebuggingHelperLoadTried;
}
pythonDumpersFailed();
}
}
void GdbEngine::pythonDumpersFailed()
{
m_hasPython = false;
if (m_gdbAdapter->dumperHandling()
== AbstractGdbAdapter::DumperLoadedByGdbPreload
&& checkDebuggingHelpersClassic()) {
QByteArray cmd = "set environment ";
cmd += Debugger::Constants::Internal::LD_PRELOAD_ENV_VAR;
cmd += ' ';
cmd += startParameters().startMode == StartRemoteGdb
? startParameters().remoteDumperLib
: qtDumperLibraryName().toLocal8Bit();
postCommand(cmd);
m_debuggingHelperState = DebuggingHelperLoadTried;
}
}
@@ -4156,10 +4161,12 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr
"dyld \".*CFDataFormatters.*\" all "
"dyld \".*libobjc.*\" all "
"dyld \".*CarbonDataFormatters.*\" all");
// We know that we don't have Python on Mac.
pythonDumpersFailed();
} else {
loadPythonDumpers();
}
loadPythonDumpers();
QString scriptFileName = theDebuggerStringSetting(GdbScriptFile);
if (!scriptFileName.isEmpty()) {
if (QFileInfo(scriptFileName).isReadable()) {
@@ -4190,11 +4197,6 @@ void GdbEngine::loadPythonDumpers()
ConsoleCommand, CB(handleHasPython));
}
bool GdbEngine::checkDebuggingHelpers()
{
return !hasPython() && checkDebuggingHelpersClassic();
}
void GdbEngine::handleGdbError(QProcess::ProcessError error)
{
const QString msg = errorMessage(error);