The tenth chapter describes the complex Linux drivers and HAL and other libraries, need to use a variety of methods to test it. Examples include setting breakpoints, stepping through code output debugging information, and so on.
InLinuxin the system,/proc is often used as a tool for data interaction between the kernel space and the user space, and the/proc file system behaves like a device file system. /proc is a virtual file system, which means that/proc is not a real file system, but a memory map. All read and write/proc are read and write to memory. Therefore, the speed of reading and writing the/proc file system is much faster than reading/writing the/ dev file system, so the/proc file system can also be used as a tool for Linux to interact with space programs.
Most kernel developers thinkKgdb isThe best kernel debugging tool.KgdbIn addition to providing similarPrintkfunction, and allows developers to directlyPcOn the PassGdbLink the target device.KgdbConsists of two parts:KgdbKernel and a set of link interfaces. These interfaces currently support serial portsTtyDevice connections and Ethernet connections. Where the serial connection needs to pass the kernel parameterKgdbSpecify the serial port to connect toTtyEthernet connection via EH and parametersKgdboeip and port number. kgdb supports multiple processor architectures. To use kgdb debug linux kernel, first you need to configure linux kernel, using make menuconfig command into linux kernel configuration menu. Enter "kernel hacking", Find and select "kgdb kernel debugger
Android Deep Exploration Tenth chapter experience