Android Deep Explore (Volume one) HAL and Driver Development chapter tenth

Source: Internet
Author: User

By learning Android Deep Exploration (Volume one) HAL and Driver Development chapter Tenth let me know the debugging technology and debugging tools for embedded Linux.

PRINTK can print kernel debugging information, the function is similar to the printf function, except that the PRINTK function runs in kernel space, and the printf function runs in user space. The PRINTK file is a simple four-digit text file with a default value of: 6: Output The message to the console level, 4: The default message log level, 1: The minimum value that can be set for the console log level, and 7: The default value for the console log level. All messages sent through the PRINTK function are output to the log file, regardless of the message level.

A large number of PRINTK functions frequently operating log files or console device files can seriously affect the performance of Linux drivers, to control the output of the PRINTK function, and the implementation is very convenient, the best way is undoubtedly the use of C language compiler instructions.

In the Linux file system,/proc is often used as a tool for data interaction between the kernel space and user space, it is not a real filesystem, but a memory map, and all read and write/proc operations are read and write to the memory, so reading and writing/proc file system is much faster than read/write/ The dev file system is fast.

The Debugging tools are: Debugging the user space program with GDB, debugging the user space program remotely with Gdbserver, and debugging the kernel program remotely with KGDB.

Android Deep Explore (Volume one) HAL and Driver Development chapter tenth

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.