drgn/libdrgn
Omar Sandoval 75c3679147 Rewrite drgn core in C
The current mixed Python/C implementation works well, but it has a
couple of important limitations:

- It's too slow for some common use cases, like iterating over large
  data structures.
- It can't be reused in utilities written in other languages.

This replaces the internals with a new library written in C, libdrgn. It
includes Python bindings with mostly the same public interface as
before, with some important improvements:

- Types are now represented by a single Type class rather than the messy
  polymorphism in the Python implementation.
- Qualifiers are a bitmask instead of a set of strings.
- Bit fields are not considered a separate type.
- The lvalue/rvalue terminology is replaced with reference/value.
- Structure, union, and array values are better supported.
- Function objects are supported.
- Program distinguishes between lookups of variables, constants, and
  functions.

The C rewrite is about 6x as fast as the original Python when using the
Python bindings, and about 8x when using the C API directly.

Currently, the exposed API in C is fairly conservative. In the future,
the memory reader, type index, and object index APIs will probably be
exposed for more flexibility.
2019-04-02 14:12:07 -07:00
..
build-aux Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
.gitignore Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
cityhash.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
configure.ac Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
Doxyfile Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
drgn.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
dwarf_index.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
dwarf_index.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
dwarf_object_index.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
dwarf_type_index.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
error.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
error.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
hash_table.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
hash_table.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
internal.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
internal.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
language_c.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
language.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
lexer.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
lexer.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
Makefile.am Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
memory_file_reader.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
memory_reader.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
mock.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
object_index.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
object_index.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
object.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
object.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
path.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
program.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
program.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
read.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
serialize.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
serialize.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
siphash.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
string_builder.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
string_builder.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
type_index.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
type_index.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
type.c Rewrite drgn core in C 2019-04-02 14:12:07 -07:00
type.h Rewrite drgn core in C 2019-04-02 14:12:07 -07:00