citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit f9fad9867d923146e3bcd37cdfb4d90907988238
parent a6075ad7d2570fc1d7744768c37486c8243a68ab
Author: Kyle Milz <kyle@0x30.net>
Date:   Thu,  4 Aug 2016 18:59:58 -0600

src: log entire command line

Diffstat:
Msrc/inst_main.cc | 7+++++--
Mt/inst_log.t | 4++--
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/inst_main.cc b/src/inst_main.cc @@ -208,10 +208,13 @@ CitrunInst::process_cmdline() bool object_arg = false; bool compile_arg = false; - m_log << m_pfx << "Processing " << m_args.size() - << " command line arguments.\n"; + m_log << m_pfx << "Command line is '"; + for (auto &arg : m_args) + m_log << arg << " "; + m_log << "'.\n"; for (auto &arg : m_args) { + if (std::strcmp(arg, "-E") == 0) { m_log << m_pfx << "Preprocessor argument found\n"; exec_compiler(); diff --git a/t/inst_log.t b/t/inst_log.t @@ -51,7 +51,7 @@ cat <<EOF > citrun.log.good citrun-inst v0.0 () called as ''. PATH='' -Processing 5 command line arguments. +Command line is ''. Found source file ''. Object arg = 1, compile arg = 1 Added clangtool argument ''. @@ -64,7 +64,7 @@ Done. citrun-inst v0.0 () called as ''. PATH='' -Processing 4 command line arguments. +Command line is ''. Object arg = 1, compile arg = 0 Link detected, adding '' to command line. No source files found. Executing command line.