[LLVMdev] embedding trace functions to generate variable values

John Criswell criswell at illinois.edu
Wed Mar 6 08:31:08 PST 2013


On 3/6/13 4:39 AM, Vardhan Varma wrote:
>
> Hi,
>   This is my first post on this forum so please use soft batons (-;
>
>   I'm wondering if there is feature already  in LLVM or clang to embed
>   variable tracing instructions in the compiled output, so that on 
> execution
>   of the program, a dump of various variables values over time is 
> generated.
>
>   It's a little like the old unix program ctrace[1], but using LLVM, 
> instead
>   of rewriting C !
>
>
> [1] http://docs.oracle.com/cd/E24457_01/html/E22003/ctrace.1.html
> Thanx in advance,

No, I don't believe there is a tool quite like that in LLVM. However, we 
have a research prototype dynamic backwards slicing tool called Giri 
written with LLVM.  Giri instruments a program to record all basic block 
and loads/store executions in a trace file and can then use this trace 
to find all LLVM IR instructions that were executed in that execution of 
the program.

You could probably enhance Giri with additional features to do what you 
describe.

If you'd like a copy of Giri, please email the list.

-- John T.


>
> --Vardhan
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130306/9d6fbeb0/attachment.html>


More information about the llvm-dev mailing list