CoreGdbAdapter: call gdb with LC_ALL=C for untranslated output

- the string in the gdb output by which the exec file is identified is
  subject to localization. Overriding the LC_ALL variable fixes this.

Change-Id: If839ed1daec8cbc0b6a5fefcf28a4eef0423a645
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Thomas Otto
2014-07-22 15:55:22 +02:00
committed by hjk
parent 38f068efa7
commit 5993eec533

View File

@@ -100,8 +100,13 @@ QString readExecutableNameFromCore(const QString &debuggerCommand, const QString
args.append(QLatin1String("-batch"));
args.append(QLatin1String("-c"));
args.append(coreFile);
QProcess proc;
QStringList envLang = QProcess::systemEnvironment();
envLang.replaceInStrings(QRegExp(QLatin1String("^LC_ALL=.*")), QLatin1String("LC_ALL=C"));
proc.setEnvironment(envLang);
proc.start(debuggerCommand, args);
if (proc.waitForFinished()) {
QByteArray ba = proc.readAllStandardOutput();
// Core was generated by `/data/dev/creator-2.6/bin/qtcreator'.