Skip to content
radare2-based decompiler
Branch: master
Clone or download
Mm7 and XVilka Add the attribute `kind` to `RadecoFunction`
We cannot load the code of imported or relocated functions, because it
is not available inside the binary file.

Fixes #254. Previously, the fact that some functions were relocated was
ignored and thus some garbage code was imported (r2 returns some garbage
code when `pdf` is called on relocated functions). Unfortunately that
codes generates a huge IR graph, and this leads to a crash when the matcher
is called (memory exhaustion due to veeery long strings).
Latest commit 309cd4d Mar 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
analysis
ex-bins
examples Apply formatter Oct 21, 2018
scripts
specs Initial commit towards CFG and SSA Unification Dec 9, 2015
src
test_files Add test_files/bin1_filesource Aug 6, 2018
tests Apply "cargo fmt" Aug 31, 2018
.gitignore Implements InstructionAnalyzer Dec 30, 2017
.travis.yml Add rustfmt checks during CI builds Mar 1, 2019
COPYING
Cargo.toml
README.md Fix build bdages Oct 29, 2018
appveyor.yml Add appveyor.yml Aug 1, 2018
build.rs Add `ir_reader` Mar 16, 2018
rustfmt.toml

README.md

radeco-lib

Appveyor Status Build Status Coverage Status

A radare2 based binary analysis framework

Is this ready yet?

Nope. There is still a ton of work to do before this can be considered ready. That said, parts of the library are already stable enough to write your own analysis passes and use in your projects.

Usage

Build like a regular rust project, using cargo:

cargo build

To include in your rust project, add to Cargo.toml:

[dependencies.radeco-lib]
git = "https://github.com/radare/radeco-lib"

See examples for usage.

Development

Additional features to build with to help development.

Trace Log

To debug, you may want to enable trace output from various parts of radeco. Build with trace_log feature to enable this:

cargo build --features 'trace_log'

Profiling

Requires gperftools . Check the cpuprofiler repository for more details.

To enable profiling, build with profile feature:

cargo build --features 'profiler'

Wrap the code you want to profile with:

use cpuprofiler::PROFILER;

PROFILER.lock().unwrap().start("./my-prof.profile").unwrap();
// Code you want to sample goes here!
PROFILER.lock().unwrap().stop().unwrap();

Project layout

src/
├── analysis/               Analyzers on SSA form Radeco-IR
├── backend/                Analyzers on C-pseudo code
│   ├── ctrl_flow_struct/   Implementation of `No More Gotos`
│   └── lang_c/             Coverter of C-pseudo code from RadecoFunction
├── frontend/               Loaders of RadecoFunction, RadecoProject
├── middle/                 Constructer, writer, parser of Radeco-IR
│   ├── regfile/            Profile of registers
│   └── ssa/                SSA form of Radeco-IR
└── utils/                  Logger, etc

License

Licensed under The BSD 3-Clause License. Please check COPYING file for complete license.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.