Giter VIP home page Giter VIP logo

libelfin's Introduction

Libelfin is a from-scratch C++11 library for reading ELF binaries and DWARFv4 debug information.

Quick start

make, and optionally make install. You'll need GCC 4.7 or later.

Features

  • Native C++11 code and interface, designed from scratch to interact well with C++11 features, from range-based for loops to move semantics to enum classes.

  • Libelfin fully implements parsing for Debugging Information Entries (DIEs), the core data structure used by the DWARF format, as well as most DWARFv4 tables.

  • Supports all DWARFv4 DIE value types except location lists and macros.

  • Nearly complete evaluator for DWARFv4 expressions and location descriptions.

  • Complete interpreter for DWARFv4 line tables.

  • Iterators for easily and naturally traversing compilation units, type units, DIE trees, and DIE attribute lists.

  • Every enum value can be pretty-printed.

  • Large collection of type-safe DIE attribute fetchers.

Non-features

Libelfin implements a syntactic layer for DWARF and ELF, but not a semantic layer. Interpreting the information stored in DWARF DIE trees still requires a great deal of understanding of DWARF, but libelfin will make sense of the bytes for you.

Using libelfin

To build against libdwarf++, use, for example

g++ -std=c++11 a.cc $(pkg-config --cflags --libs libdwarf++)

To use a local build of libelfin, set PKG_CONFIG_PATH. For example,

export PKG_CONFIG_PATH=$PWD/elf:$PWD/dwarf

There are various example programs in examples/.

Status

Libelfin is a good start. It's not production-ready and there are many parts of the DWARF specification it does not yet implement, but it's complete enough to be useful for many things and is a good deal more pleasant to use than every other debug info library I've tried.

libelfin's People

Contributors

zeldovich avatar

Watchers

James Cloos avatar chyyuu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.