libctf is a C99 BSD-licensed implementation of the second version of the Compact C Type Format - CTF. Initially developed as a part of the Google Summer of Code 2014, supported and mentored by the FreeBSD Project. Code is written with multiple platforms in mind and can be used in BSD, illumos and Linux worlds.
CTF describes a reduced set of debugging data similar to DWARF or stabs. The
data can be found in the .SUNW_ctf
ELF section of the executable, optionally
compressed. The format focuses mainly on the C types used in the corresponding
binary file with a minor focus on the symbol table.
Principal objective of the format is to shrink the data size as much as possible so that it could be included in a production environment. Therefore the data is saved in a binary form with bit-level attention. To satisfy the size reduction ambition even more, a concept of parent-child relationship was introduced, where the parent contains the common type information and the child references this data.
- ✅ parsing the CTF data
- ✅ user-space allocation
- ✅ kernel-space allocation
- ✅ creation & manipulation API
- writing
- unit testing
- integration testing
- code coverage measuring during tests
- ARM support
- MIPS support
- illumos support
The library, it's practical usage and implementation, and musings on possible usage are topics of my on-going bachelor thesis.
$ ninja
- zlib
- libelf
- m_list
- FreeBSD 10.0 with Clang 3.3
- Linux Gentoo 2.2 with Clang 3.6
2-clause BSD, for more information please see the license.
Daniel Lovasko lovasko@freebsd.org
- George Neville-Neil
- John-Mark Gurney
- Pedro Giffuni
- Robert Mustacchi