control-flow-graph

How to generate a Control Flow Graph from Assembly?

≯℡__Kan透↙ 提交于 2019-12-24 09:48:31
问题 For context, I'm attempting to write a decompiler from AVM2 (ActionScript Virtual machine 2) bytecode/assembly to high-level ActionScript 3 code. As far as I am aware, this requires me to analyze the assembly and generate resulting Control Flow Graph from this, in order to deduce structures such as loops, and conditional branching (if/else). Given some assembly like: 0 getlocal0 1 pushscope 2 findpropstrict {, private, }::trace 4 pushstring "one" 6 callproperty {, private, }::trace (1) 9 pop

Java Control Flow Graphs Library

旧街凉风 提交于 2019-12-21 20:22:25
问题 I need to manipulate control flow graphs for Java code in a project. What might be a good java library to generate control flow graphs in Java. So far I have found a couple eclipse plugins (heavily dependent on eclipse APIs) and standalone tools (cannot embed in my code). 回答1: A tool to do this stuff is Soot, and this questions is a duplicate of Tool for generating control flow in Java 回答2: Some examples: yFiles for Java (commercial) jGraph JUNG Grappa If not what you are looking for, then

generating CFG for whole source code with LLVM

笑着哭i 提交于 2019-12-21 15:47:38
问题 Does anyone from LLVM community know if there is a way to generate CFG for the whole input source code using opt -dot-cfg foo.ll(.bc) ? as this one generates the CFG per function thus the connections between functions will be ignored. It seems that the older analyze tool has depreciated. 回答1: I wonder if you found any way to get interprocedural CFG. I found that inlining call functions by other inliner passes might be helpful but I couldn't be able to get it to work yet. I've posted this

generating CFG for whole source code with LLVM

隐身守侯 提交于 2019-12-21 15:46:12
问题 Does anyone from LLVM community know if there is a way to generate CFG for the whole input source code using opt -dot-cfg foo.ll(.bc) ? as this one generates the CFG per function thus the connections between functions will be ignored. It seems that the older analyze tool has depreciated. 回答1: I wonder if you found any way to get interprocedural CFG. I found that inlining call functions by other inliner passes might be helpful but I couldn't be able to get it to work yet. I've posted this

Jump in the middle of basic block

拥有回忆 提交于 2019-12-11 05:49:08
问题 A basic block is defined as a sequence of (non-jump) instructions ending with a jump (direct or indirect) instruction. The jump target address should be the start of another basic block. Consider I have the following assembly code : 106ac: ba00000f blt 106f0 <main+0xb8> 106b0: e3099410 movw r9, #37904 ; 0x9410 106b4: e3409001 movt r9, #1 106b8: e79f9009 ldr r9, [pc, r9] 106bc: e3a06000 mov r6, #0 106c0: e1a0a008 mov sl, r8 106c4: e30993fc movw r9, #37884 ; 0x93fc 106c8: e3409001 movt r9, #1

How to retrieve a Control Flow Graph for python code?

≡放荡痞女 提交于 2019-12-09 19:23:08
问题 I would like to dump the Control Flow Graph of a given python code, similar to the option given by gcc compiler option: -fdump-tree-cfg for c code. I succeeded getting the AST (Abstract Syntax Trees) of a python code, but it seams quite complex and hassle to get the Control Flow Graph from AST phase. Is there an easier way to retrieve directly the Control Flow Graph of a python code? any suggestions? oh by the way I'm using python3.5 Thank you all! P.S I really don't know what kind of

How to retrieve a Control Flow Graph for python code?

眉间皱痕 提交于 2019-12-04 12:23:35
I would like to dump the Control Flow Graph of a given python code, similar to the option given by gcc compiler option: -fdump-tree-cfg for c code. I succeeded getting the AST (Abstract Syntax Trees) of a python code, but it seams quite complex and hassle to get the Control Flow Graph from AST phase. Is there an easier way to retrieve directly the Control Flow Graph of a python code? any suggestions? oh by the way I'm using python3.5 Thank you all! P.S I really don't know what kind of interpreter I'm using under the hood, As far as I know it's CPython (not sure), I don't think it's PyPy

generating CFG for whole source code with LLVM

三世轮回 提交于 2019-12-04 08:10:40
Does anyone from LLVM community know if there is a way to generate CFG for the whole input source code using opt -dot-cfg foo.ll(.bc) ? as this one generates the CFG per function thus the connections between functions will be ignored. It seems that the older analyze tool has depreciated. Nhome I wonder if you found any way to get interprocedural CFG. I found that inlining call functions by other inliner passes might be helpful but I couldn't be able to get it to work yet. I've posted this Finding all possible paths in a c/c++ program by LLVM 来源: https://stackoverflow.com/questions/26556356