Skip to content

lovasko/libctf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libctf

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.

Compact C Type Format

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.

Features

  • ✅ parsing the CTF data
  • ✅ user-space allocation
  • ✅ kernel-space allocation
  • ✅ creation & manipulation API

Goals

  • writing
  • unit testing
  • integration testing
  • code coverage measuring during tests
  • ARM support
  • MIPS support
  • illumos support

Related projects

The library, it's practical usage and implementation, and musings on possible usage are topics of my on-going bachelor thesis.

Build

$ ninja

Documentation

Dependencies

Supported platforms

  • FreeBSD 10.0 with Clang 3.3
  • Linux Gentoo 2.2 with Clang 3.6

License

2-clause BSD, for more information please see the license.

Authors

Daniel Lovasko [email protected]

Thanks

  • George Neville-Neil
  • John-Mark Gurney
  • Pedro Giffuni
  • Robert Mustacchi

About

BSD-licensed CTF Implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published