Android Transplant and Driver Development Tenth chapter experience

Source: Internet
Author: User

For complex Linux drivers and libraries such as HAL, you need to debug them using a variety of methods. For example, set breakpoints, step-tracking code, output debug values, and so on. Although embedded Linux in debugging does not have visual Studio, Delphi, Eclipse These visual work of their famine, but learn some of this technology is undoubtedly more strange foot hand bright strong and stable Linux kernel module ← for embedded Linux kernel modules, Debugging for inline may be a bit more complicated. Because sometimes it takes at least two machines (development machine and-target machine) for debugging will mainly show how to use the Development Board of the Android emulator and some functions, tools (GDB, Gdoserver and kgdb) debugging embedded linux-kernel, executable and shared library.

If you want the PRINTK function to output the message, go to the console. Another requirement is that the character interface is required to operate. If the reader uses Ubuntu, it enters the console of the character interface, and then executes the file of the build base script, which outputs the corresponding message at the console. The PRINTK function displays the message in the console (also known as a terminal) through the/dev/console device file, which functions only under the console of the character interface, so the PRINTK function is only used on the console of the character interface to output messages normally.

In Linux file systems,/proc is often used as a tool for data intersection =ee of kernel space and user space. The/proc file system behaves like a device file system C/dev). /proc is a virtual file system, which means that/proc is not a real file system, but a memory map. All read-write/PROC_ operations are read-write to Memory F, so reading and writing/proc file systems is much faster than reading/writing/dev file systems. As a result, the/proc file system can also serve as a tool for Linux to interact with user-space programs.

Linux kernel debugging has been considered by many people to be very difficult. Most people prefer to use the PRINTK function directly to output debug information and are reluctant to use various commands (GDB, Gdbserv~r,. KGDB, etc.) for debugging. Because doing so does not necessarily make for more benefits. In addition to introducing the traditional PRINTK function debugging techniques, other debugging techniques are also introduced. These debugging techniques do not have to be used, according to the actual F-green conditions can be decided to use one or several of them. It is hoped that these techniques can be used in future experiments.

http://www.cnblogs.com/suntao123/

Android Transplant and Driver Development Tenth chapter experience

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.