January 28, 2020

325 words 2 mins read

Compact C Type Format Support in the GNU Toolchain

Compact C Type Format Support in the GNU Toolchain

Compact C Type Format (CTF) is a reduced form of debugging information whose main purpose is to describe the type of C entities such as structures, unions, typedefs and function arguments. It originat …

Talk Title Compact C Type Format Support in the GNU Toolchain
Speakers Elena Zannoni (Director of the Linux Tools and Languages Team, Oracle Corporation)
Conference Open Source Summit + ELC Europe
Conf Tag
Location Lyon, France
Date Oct 27-Nov 1, 2019
URL Talk Page
Slides Talk Slides
Video

Compact C Type Format (CTF) is a reduced form of debugging information whose main purpose is to describe the type of C entities such as structures, unions, typedefs and function arguments. It originated inthe Solaris kernel and it has been ported to Linux as part of the DTrace for Linux project. It’s been used (via libdtrace-ctf) to reduce the size of the debugging information for the Linux kernel and for use in DTrace.There are many advantages to using CTF, due to its compactness, for many kinds of programs that can’t rely on DWARF. DWARF’s design strives for generality and expressive power, at the cost of being a rather heavyformat. For example, evaluating DWARF expressions requires an interpreter for a stack-based machine. This, which is not problematic for typical “off-line” debugging programs such as symbolic debuggers (GDB), may be inconvenient for “on-line” debugging programs such as unwinders and stack tracers, due to efficiency and security concerns. CTF is a promising format that helps maintain some level of debuggability, even when the size of the executable is an issue and the DWARF info is being stripped out.For such reasons we integrated CTF with the GNU toolchain on Linux. This talk will explain how CTF is structured, how we added CTF handling to gcc, gdb binutils and elfutils, and will provide an update on theupstreaming status.We believe CTF provides the right foundations for expressing the information needed by “on-line” debugging programs, in a most convenient way.

comments powered by Disqus