CTF implementation and use in the kernel debugger

Project description

When somebody compiles the kernel with the WITH_CDDL and WITH_CTF options, the ctfconvert utility is used to convert the DWARF debugging symbols to the CTF data. This is apparently done to enable the D-Trace utility to retrieve the type information data. Since we already have this information inside the kernel at our disposal, it would be a shame not to use it also for other purposes, in our case the kernel on-line debugger DDB. The main idea behind this project is to add the capability of pretty printing data structures contained inside the FreeBSD kernel source based on the CTF data contained in the SUNW_ctf section of the kernel binaries. The following example will illustrate the feature. The names of variables and data structures are fictional for better intuition.

The Code

libctf on github
ctfdump on github
ctfstats on github
ctfquery on github
ddb ctf-related enhancements

the proposal
the blog
reducing ctf overhead
dtrace print action
userland ctf in illumos

SummerOfCode2014/CTF_implementation_and_use_in_the_kernel_debugger (last edited 2014-08-04 05:28:59 by DanielLovasko)