Debugging technology of Embedded Linux

Source: Internet
Author: User

In this section, we study the debugging technology of Embedded Linux, and we need to use various methods to debug the complex Linux drivers and HAL libraries. Just started talking about the print kernel debug information: PRINTK, this function is used similar to the printf function, except that the PRINTK function runs in kernel space and the printf function runs in user space. After executing the relevant commands, you will be asked to choose whether to run on Ubuntu Linux or on an Android device. The next step is to prevent the PRINTK function from reducing the Linux drive performance, as long as it is implemented to control the output of the PRINTK function. Using virtual file systems for data interaction,/PROC is often used as a tool for data interaction between kernel space and user space in Linux file systems. It involves four functions, namely the Proc_mkdir function, the Create_proc_entry function, the Creat_proc_read_entry function, and the Remove_proc_entry function. Where the Creat_proc_read_entry function function is internally implemented by calling the Create_proc_entry function. Debug the user-space program with GDB, which can track the program for debugging user space. List is used to list the code in the program. The Android emulator can only use the Gdbserver debugger through port mapping. The remote debugging kernel program with KGDB, in addition to providing a journaling output function like the PRINTK function, also allows developers to link target devices directly on the PC via GDB. After setting the startup parameters of the Linux kernel, the native can use the GDB command to debug the Linux kernel like a normal embedded application and debug the Linux kernel with various. GDB commands. This chapter introduces the traditional PRINTK functions and some other debugging techniques.

Debugging technology of Embedded Linux

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.