[panda-users] Obtaining LLVM bitcode from PANDA plugin

frank adkins brisngrfreak at hotmail.com
Wed Feb 18 10:06:04 EST 2015


Hi Federico!As far as I know, if you're just looking for a string representation then I've used the following:
1. to dump the IR straight to stdout:      tb->llvm_function->dump() 2. to do something more precise with it:      std::string some_string;      llvm::raw_string_ostream fcn_string(some_string);      auto current_func = tb->llvm_function;      fcn_string << *current_func;      std::cout << fcn_string.str() << std::endl; // whatever you want with a string representation
Both 1. and 2. require #include "llvm/IR/Function.h", while 2. also requires #include "llvm/Support/raw_ostream.h".
If you're looking for something else, then there are a number of different ostreams in that family that might suit your needs.
Hope that helps!-Frank 
Date: Tue, 17 Feb 2015 17:25:58 +0100
From: fox91 at anche.no
To: panda-users at mit.edu
Subject: [panda-users] Obtaining LLVM bitcode from PANDA plugin

Hi!
I would like to know if there is some code I can look at or maybe some
documentation about the translation from TCG to LLVM IR. My goal is to
basically dump the code that is executed for some specific basic blocks
from a plugin for later doing further analysis.
 
 
Cheers,
Federico
 
-- 
f.
 
https://github.com/volpino
 

_______________________________________________
panda-users mailing list
panda-users at mit.edu
http://mailman.mit.edu/mailman/listinfo/panda-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/panda-users/attachments/20150218/cdcdfa3e/attachment.htm


More information about the panda-users mailing list