Skip to content

Command line tool that parses Intel x86 ASM instructions into control-flow graph

Notifications You must be signed in to change notification settings

jshalabi03/parse-cfg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse CFG

About

  • Generates control-flow graph from C++ source file
  • Emits x86 Intel ASM with ARMv8 clang 15.0.0
  • Docker image fetches required dependencies and ensures standardized output
  • Uses Graphviz to generate PNG visualization of control-flow graph


Usage

The following instructions may be executed via running the script.sh shell script:

$ sh script.sh <path-to-input>

The output will be generated in the output/ directory


Build Docker image

$ docker build -t clang_image .

Create container

$ CONTAINER_ID=$(docker create clang_image:latest)

Copy input file to container

$ docker cp <path-to-input> $CONTAINER_ID:/app/tmp/index.cpp

Start container to generate output

$ docker start $CONTAINER_ID

Copy output files from container to local machine

$ docker cp $CONTAINER_ID:/app/tmp/cfg.dot <path-to-output-dir>
$ docker cp $CONTAINER_ID:/app/tmp/cfg.png <path-to-output-dir>

Delete container

$ docker rm $CONTAINER_ID

About

Command line tool that parses Intel x86 ASM instructions into control-flow graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published