Android Deep Exploration (Vol. 1) HAL and Driver development experience
The tenth chapter of embedded Linux call technology
For complex Linux drivers and libraries such as HAL, you need to debug them in a variety of ways. For example, set breakpoints, step through code, output debugging information, and so on. While embedded Linux is not easy to debug with visual Studio, Delphi, Eclipse visualization tools, learning some of this technology is undoubtedly more helpful in developing robust and stable Linux kernel modules.
For embedded Linux kernel modules, debugging of executable programs and code libraries can be more complicated. Because at least two machines (development and target) are needed for debugging most of the time.
1, print kernel debug information: PRINTK
2. Prevent PRINTK function from reducing Linux drive performance
3. Data interaction via Virtual file System (/pros)
Here we proceed if you want the PRINTK function to output the message to the console. Another condition is required: operation is required under the character interface. (Use the shortcut key Ctrl+alt+f7 back to the graphical interface)
4. Debugging Tools
This chapter focuses on Linux kernel debugging, using a variety of commands (GDB, Gdbserver, kgdb) for debugging.
Android Deep Exploration (Vol. 1) HAL and Driver development experience Tenth chapter embedded Linux call Technology