Embedded Linux Debugging Technology

Source: Internet
Author: User

Linux kernel debugging is considered by many to be difficult, and many people prefer to use the PRINTK function directly to output debugging information, and do not want to use a variety of commands to debug. For complex Linux drivers and programs like HAL, you need to test them in a variety of ways. The PRINTK function is similar to the printf function, while the PRINTK function runs in kernel space, and the printf function runs in user space.

Embedded Debugging methods:

1. Simulator. For example, Qtopia core can be used to provide qvfb,arm hardware simulations using the frame Buffer Simulation tool SkyEye open source projects.

2. Remote Debugging. The debugger is also on the PC, and the debugger communicates with the program being debugged over the network.

3. Post-mortem analysis using log and core dump files.

STDPRM Standard printer LPT1 port Stdaux standard serial device COM1 port stdin does not necessarily come from the keyboard, stdout and stderr are also not necessarily displayed on the screen and can be redirected to other devices or disk files. With fprintf (), the first parameter is recommended to use stderr instead of stdout, because stderr runs at a higher level, and the program stderr output when the exception exits, and StdOut does not. The kgdb contains two parts, the KGDB kernel and a set of connection interfaces. Although it is easy to write messages to the log file or console using the PRINTK function. However, the heavy use of the PRINTK function to frequently manipulate log files or console device files (/dev/console) can severely affect Linux drive performance (so that the speed of writing disks is much faster than reading and writing memory), so this requires the Linux driver to be used only during the development phase The PRINTK function outputs information and removes the PRINTK function that may affect performance when the Linux driver is officially released.

Embedded Linux Debugging Technology

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.