summerofcode2014:lldb_kerneldebugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
summerofcode2014:lldb_kerneldebugging [2014/05/06 06:37] – MikeMasummerofcode2014:lldb_kerneldebugging [2014/05/06 07:33] (current) – MikeMa
Line 1: Line 1:
 +====== Kernel debugging support for LLDB ======
 +  * Student: [[/MikeMa|MikeMa]] (mikema@)
 +  * Mentor: [[/EdMaste|EdMaste]] (emaste@) 
 ===== Project Description ===== ===== 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. 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.
Line 15: Line 18:
  
 ===== Project Schedule ===== ===== Project Schedule =====
-  * Week 1 - 3: Kernel crash dumps support. + 
-  * Week 4 - 6: Live debugging against /dev/mem support. +| Week 1 - 3 | Kernel crash dumps support || 
-  * Week 7 - 10: Kernel Module parsing and loading support. +| Week 4 - 6 | Live debugging against /dev/mem support || 
-  * Week 11 - 12: Porting kernel debugging lldbmacros, which is a set of python scripts can be find at https://github.com/opensource-apple/xnu/tree/10.9/tools/lldbmacros +| Week 7 - 10 | Kernel Module parsing and loading support || 
-  * Week 11 - 12: Tests and bug fixing, and documentation work. +| Week 11 - 12 | Porting kernel debugging lldbmacros, which is a set of python scripts can be found [[https://github.com/opensource-apple/xnu/tree/10.9/tools/lldbmacros|here]] || 
-All features should be done by the suggested Pencils down day (Aug. 11th).+| Week 11 - 12 | Tests and bug fixing, and documentation work || 
 + 
 +All features should be done by the firm Pencils down day (Aug. 18th). 
 + 
 +===== The Code ===== 
 +https://github.com/cosql/lldb
  
  • summerofcode2014/lldb_kerneldebugging.1399358248.txt.gz
  • Last modified: 2014/05/06 06:37
  • by MikeMa