Giter Site home page Giter Site logo

hnuyuelurm / libdwarfpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stephenrkell/libdwarfpp

0.0 0.0 0.0 2.21 MB

A high-level API for accessing DWARF debugging information, in C++

Home Page: http://www.cl.cam.ac.uk/~srk31/

License: Other

Shell 0.04% C++ 92.17% Python 4.76% C 0.07% Makefile 1.92% M4 1.03%

libdwarfpp's Introduction

Build guide for the impatient:

$ git submodule init && git submodule update && \
    make -C contrib && \
    . contrib/env.sh # if you lack libsrk31c++ or libc++fileno
$ ./autogen.sh
$ ./configure
$ make
$ make -C tests    # if you're feeling conscientious; send bug reports!

A bit more detail:

To build this you'll need a recent-ish C++ compiler, a GNU build system,
recent-ish boost, and my other repositories libsrk31c++ and
libc++fileno (present as submodules in contrib/, if building from git).

You'll also need David Anderson's libdwarf (also submodule'd). I'm
slowly working on making things compile-time configurable to use libdw
instead (from elfutils), but it's not there yet.

Autotools support is new and is only lightly tested; improvements are
welcome. On some non-Debian-based distributions, libdwarf headers don't
appear in /usr/include but somewhere else. Configure with
--with-libdwarf-includes=/path/to/include to make this work. (You don't
need to worry about that if you're using the libdwarf submodule.)

There's not much documentation for the library. The easiest way to get
started is probably to look at the (smaller) examples in examples/.

What's included:

- an iterator-based DIE tree abstraction (root_die)
- friendly abstraction of DIE attributes, location lists etc.
- a DWARF expression evaluator (see caveats below)
- DIEs abstracted into class hierarchy (per-tag data types)
- ... providing many useful utility methods
- ... particularly for computing addresses
- can add and modify DIEs in memory (but not write out, yet; see below)
- frame information support (including eh_frame)

Completeness: various things are part-done, like the DWARF evaluator 
(only supports the opcodes I've needed so far) and support for multiple 
DWARF standards (mostly there, but not hooked up properly; in practice 
it doesn't matter too much). Many backwards iterators are also missing
(patches welcome). Register definitions are only for x86 arches at
present.

It can't generate DWARF output, yet, although this wouldn't be a
disruptive thing to add (still a non-trivial effort, though).

Send bug reports, patches etc. to Stephen Kell <[email protected]>.

libdwarfpp's People

Contributors

stephenrkell avatar ojno avatar jryans avatar tobast avatar sakarah avatar rptynan 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.