Commit 1406bbee authored by Tobias Hunger's avatar Tobias Hunger

GccToolChain: Log what gets reported to code model

Change-Id: Ic6a0252f6109393a2aab8ea96db9a9b583c25394
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent d8b25ad1
......@@ -47,11 +47,16 @@
#include <QFileInfo>
#include <QFormLayout>
#include <QLineEdit>
#include <QLoggingCategory>
#include <QRegularExpression>
#include <algorithm>
#include <memory>
namespace {
Q_LOGGING_CATEGORY(gccLog, "qtc.pe.toolchain.gcc");
} // namespace
using namespace Utils;
namespace ProjectExplorer {
......@@ -430,6 +435,14 @@ ToolChain::PredefinedMacrosRunner GccToolChain::createPredefinedMacrosRunner() c
env.toStringList());
macroCache->insert(arguments, macros);
qCDebug(gccLog) << "Reporting macros to code model:";
for (const Macro &m : macros) {
qCDebug(gccLog) << compilerCommand.toUserOutput()
<< (lang == Constants::CXX_LANGUAGE_ID ? ": C++ [" : ": C [")
<< arguments.join(", ") << "]"
<< QString::fromUtf8(m.toByteArray());
}
return macros;
};
}
......@@ -611,6 +624,14 @@ ToolChain::SystemHeaderPathsRunner GccToolChain::createSystemHeaderPathsRunner()
env.toStringList());
headerCache->insert(arguments, paths);
qCDebug(gccLog) << "Reporting header paths to code model:";
for (const HeaderPath &hp : paths) {
qCDebug(gccLog) << compilerCommand.toUserOutput()
<< (languageId == Constants::CXX_LANGUAGE_ID ? ": C++ [" : ": C [")
<< arguments.join(", ") << "]"
<< hp.path();
}
return paths;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment