dg icon indicating copy to clipboard operation
dg copied to clipboard

Does DG support Call graph with Function Pointer?

Open Marvinmw opened this issue 6 years ago • 7 comments

Does DG support Call graph with Function Pointer?

Marvinmw avatar Dec 09 '19 10:12 Marvinmw

Yes, it does. The relevant object is callGraph in the class PointerGraph.

mchalupa avatar Dec 11 '19 08:12 mchalupa

Yes, it does. The relevant object is callGraph in the class PointerGraph.

Thanks for your reply. I try using DG. But I am curious that what is LLVMNode? How do I mapy BasicBlock, Function in llvm libraryt to DG data type?

Marvinmw avatar Dec 11 '19 15:12 Marvinmw

It depends on what information about LLVM you need. If you need dependencies between instructions, you can use LLVMNode from the LLVMDependenceGraph. If you need information about pointers, you need to query pointer analysis, etc. So what information are you interested in?

mchalupa avatar Dec 12 '19 11:12 mchalupa

It depends on what information about LLVM you need. If you need dependencies between instructions, you can use LLVMNode from the LLVMDependenceGraph. If you need information about pointers, you need to query pointer analysis, etc. So what information are you interested in?

Thanks a lot. Now I want to use dg to develop in my project. Is there some way to configure it as the third library in my project?

Marvinmw avatar Dec 13 '19 10:12 Marvinmw

Sure, dg does not generate a cmake config file yet, but you can configure it manually, e.g., like here: https://github.com/staticafi/sbt-instrumentation/blob/master/CMakeLists.txt#L50 (or if you use autotools, you just need to set the right paths there).

mchalupa avatar Dec 13 '19 11:12 mchalupa

another possible source of information: https://github.com/staticafi/sbt-slicer/blob/master/CMakeLists.txt#L64

mchalupa avatar Dec 13 '19 11:12 mchalupa

another possible source of information: https://github.com/staticafi/sbt-slicer/blob/master/CMakeLists.txt#L64

thanks. I am trying.

Marvinmw avatar Dec 17 '19 13:12 Marvinmw