From the course: Linux Device Drivers: Reading, Writing, and Debugging
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Tracing and debugging - Linux Tutorial
From the course: Linux Device Drivers: Reading, Writing, and Debugging
Tracing and debugging
- [Instructor] Let's look at some extra cool stuff to get more information about what's going on in the kernel. So now you're writing a loadable module. Probably want to know something about getting more information besides just print K and T message. So let's talk about the debug file system and tracing, and BPF trace and the crash tool. The debug file system is ordinarily mounted on the directory assist kernel debug. And when you write a driver, write a module, there's an API for you to make stuff show up in the debug file system. You can have files, for example, that map directly to variables, and you can cat that file to look at the value of a variable. So it can provide an interface for you to look at the state of your driver. And it's used a lot. There's a lot of stuff underneath debug. And if you want to learn more about the API, then I'm going to point you to the debug FS information underneath the documentation. A very valuable thing underneath debug is the tracing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.