This is an old revision of the document!
CTF implementation and use in the kernel debugger
- Student: DanielLovasko (lovasko@)
- Mentor: GeorgeNevilleNeil (gnn@)
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.