All Projects → onlyuser → gen-callgraph

onlyuser / gen-callgraph

Licence: other
gen-callgraph is a script to generate call graph from elf binary

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to gen-callgraph

DotNetGraph
Create GraphViz DOT graph with .NET / C#
Stars: ✭ 57 (+21.28%)
Mutual labels:  dot, graphviz-dot
redot
Graphviz dot file processor powered by plugins based on @unifiedjs
Stars: ✭ 60 (+27.66%)
Mutual labels:  dot, graphviz-dot
GiGraph
Simple yet versatile library for generating graphs in the DOT language
Stars: ✭ 25 (-46.81%)
Mutual labels:  dot, graphviz-dot
XLDotLoading
iOS 新浪微博红包加载动画
Stars: ✭ 30 (-36.17%)
Mutual labels:  dot
DoTH-DNS
Your server doth DNS the safe way if you use DoTH-DNS.
Stars: ✭ 26 (-44.68%)
Mutual labels:  dot
dotty dict
Dictionary wrapper for quick access to deeply nested keys.
Stars: ✭ 67 (+42.55%)
Mutual labels:  dot
Viz.js
A hack to put Graphviz on the web.
Stars: ✭ 3,602 (+7563.83%)
Mutual labels:  dot
digraph-parser
Java parser for digraph DSL (Graphviz DOT language)
Stars: ✭ 38 (-19.15%)
Mutual labels:  dot
profdump
Processes profiling output of the D compiler
Stars: ✭ 15 (-68.09%)
Mutual labels:  dot
digraph export
File conversion and export support for graphs created using the Erlang digraph module.
Stars: ✭ 33 (-29.79%)
Mutual labels:  dot
vscode-graphviz
This extension provides GraphViz (dot) language support for VS Code.
Stars: ✭ 21 (-55.32%)
Mutual labels:  dot
DottedView
Drawing Dots in android
Stars: ✭ 13 (-72.34%)
Mutual labels:  dot
avit-da2k
💲 oh-my-zsh theme based on avit theme
Stars: ✭ 15 (-68.09%)
Mutual labels:  dot
AAG-Visualizer
🌆 🏙 🌃 Viz.js Graphviz - An Elegant Visualizer for And-Inverter Graph
Stars: ✭ 95 (+102.13%)
Mutual labels:  dot
dns-resolver-infra
Privacy DNS infrastructure
Stars: ✭ 39 (-17.02%)
Mutual labels:  dot
updns
Public Adfree DNS over HTTPS Server
Stars: ✭ 23 (-51.06%)
Mutual labels:  dot
cl-dot
Common Lisp package for generating GraphViz (dot) files
Stars: ✭ 24 (-48.94%)
Mutual labels:  dot
Smartdns
A local DNS server to obtain the fastest website IP for the best Internet experience, 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验。
Stars: ✭ 4,333 (+9119.15%)
Mutual labels:  dot
ScxmlEditor-Tutorial
ScxmlEditor - powerful tool for creating, editing and debugging scxml files
Stars: ✭ 33 (-29.79%)
Mutual labels:  dot
doteur
Tool to automate the visualisation of SQL schemas from a SQL file
Stars: ✭ 80 (+70.21%)
Mutual labels:  dot

gen-callgraph

Copyright (C) 2011-2017 mailto:[email protected]

About

gen-callgraph is a script to generate call graph from elf binary.

See sister project for generating c-tags from elf binary: gen-ctags

A Motivating Example

input: elf binary from below source:

class QWE
{
public:
    QWE() {}
    ~QWE() {}
    void f() {}
};

void A();
void C() {A();}
void B() {C(); QWE qwe; qwe.f();}
void A() {B(); C();}

int main(int argc, char** argv)
{
    A();
    return 0;
}

output: graphviz dot for below graph:

picture alt

Requirements

bash readelf objdump c++filt graphviz

Limitations

  • Only supports statically linked functions within one x86_64 binary.
  • Only supports function calls invoked by assembly commands callq/jmpq/jmp and conditional jump variants on literal (non-register) destinations.
  • Naive algorithm. Only tested on small binaries.

Installation (Debian)

  1. git clone https://github.com/onlyuser/gen-callgraph.git

Usage

gen-callgraph <BINARY> [DEBUG={0*/1}] | dot -Tpng -ocallgraph.png

Recommended gcc Options

  • -g
  • -O0
  • -fno-function-cse
  • -fomit-frame-pointer

References

"Disassemble raw x64 machine code"
http://stackoverflow.com/questions/19071461/disassemble-raw-x64-machine-code
"Graphviz - Graph Visualization Software"
http://www.graphviz.org/
"Trying to understand gcc option -fomit-frame-pointer"
http://stackoverflow.com/questions/14666665/trying-to-understand-gcc-option-fomit-frame-pointer
"3.10 Options That Control Optimization"
https://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Optimize-Options.html

Keywords

call graph, asm, disassembly, elf, graphviz, name mangling
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].