From 5993eec533f2127a0adc878e643834835a44dc50 Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Tue, 22 Jul 2014 15:55:22 +0200 Subject: [PATCH] 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 --- src/plugins/debugger/gdb/coregdbadapter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp index 1f9930c7c99..7515f54d24e 100644 --- a/src/plugins/debugger/gdb/coregdbadapter.cpp +++ b/src/plugins/debugger/gdb/coregdbadapter.cpp @@ -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'.