Kernel debugging support for LLDB

Project Description

I'm planning to add a plugin called FreeBSD-kernel and FreeBSD kernel loader to LLDB, and the existing userland ELF core strategies can be inherited. On FreeBSD system, kernel virtual memory image can be accessed using libkvm interfaces, as to support kernel debugging, libkvm APIs, i.e. kvm_read(3)/kvm_write(3), will be mainly used. As we need a way to enumerate all the regions which is not supported by libkvm yet, I'll have to implement an interface to list all the regions organized as a hashtable(hpt_head) in a vmstate struct. To fully support kernel debugging, module metadata parsing and module automatic loading will also be implemented.

There is some existing work related to this project. The first is kgdb in FreeBSD code base, it is a kernel debugger based on gdb. Plus, there is Mac OS X kernel debugging support in LLDB as well. This project will be focused on the platform that LLDB supports, including amd64, mips and i386. Once this project is done, remote kernel debugging and cross-platform kernel debugging would be the next steps of interest.


There are two major milestones:

Test Plan

Project Schedule

All features should be done by the firm Pencils down day (Aug. 18th).

The Code

SummerOfCode2014/LLDB_KernelDebugging (last edited 2014-05-06T07:33:19+0000 by MikeMa)