简体   繁体   中英

Kernel Code : where can I find and how to debug the kernel

Recently I have installed Ubuntu 12.04 LTS ISO image in my desktop. Below is the output of the kernel version I have installed:

# uname -r
3.5.0-41-generic

I am trying to develop a VFS and want the kernel source code version '3.5.0-41-generic' for reference purpose - where can I find the same?

What are the excellent kernel debugging options looking at logs and mapping them to kernel code?

How and which debugger I can use to debug a live kernel flow execution?

Are there ways I can add more printk methods and re-modify the modules? Say I want to know how a FS mount method works - I can modify the required FS code (adding more printk functions) re-compile and reload the modules. Now with aid of my new printk functions I can understand the flow

Why don't you install vanilla 3.5 kernel and try to develop on it? As a kernel debugger you can use kGDB or just printk.

But... I suggest you to test your vfs on linux running on qemu. Qemu is able to debug the running linux - so you can connect gdb to it and debug the whole emulating system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM