citrun

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

commit 54a7dd850eb0f5044c333fa3173d1ee6ad28c300
parent 0f70292c95b57ba43876040a41268b05017c6c83
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Sat, 19 Mar 2016 13:33:25 -0600

instrument: comments

Diffstat:
Minstrument/instrumenter.cxx | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/instrument/instrumenter.cxx b/instrument/instrumenter.cxx @@ -18,7 +18,6 @@ bool instrumenter::VisitVarDecl(VarDecl *d) { - // std::cout << "HERE" << std::endl; return true; } @@ -90,6 +89,9 @@ instrumenter::VisitFunctionDecl(FunctionDecl *f) return true; std::stringstream ss; + // On some platforms we need to depend directly on a symbol provided by + // the runtime. Normally this isn't needed because the runtime only + // depends on symbols in the isntrumented application. ss << "libscv_init();"; SourceLocation curly_brace(FuncBody->getLocStart().getLocWithOffset(1)); TheRewriter.InsertTextBefore(curly_brace, ss.str());