Debugging ARM64 Kernel with DS-5 Community Edition

In Chapter 3 of “Running Beginner’s Guide,” Ben Shu introduced the method of step-by-step debugging the kernel using Eclipse + QEMU. With the kernel compiled using Ben Shu’s unique O0 option, you can freely explore the kernel. Today, Ben Shu will introduce the IDE debugging tool developed by ARM: DS-5. DS-5 is a secondary development based on Eclipse, fully utilizing ARM’s technological advantages, and optimizing the hardware emulator and IDE to the extreme. DS-5 requires a purchased license, but ARM provides a free version: DS-5 Community Edition. This version has limited features but can be used to debug the ARM64 kernel. The official DS-5 offers many useful functions, such as debugging hardware boards and performance analysis. For purchasing the official DS-5, please contact Emdoor Electronics (http://tools.emdoor.com/).

Debugging ARM64 Kernel with DS-5 Community Edition

Using DS-5 Community Edition to debug the running Linux kernel may be even more enjoyable, as the ARMv8 registers are very convenient, parsing out the fields of the registers, a feature not available in QEMU + Eclipse.

Debugging ARM64 Kernel with DS-5 Community Edition

It can be seen that DS-5 has done a great job categorizing the system registers of the ARM64 processor.

Debugging ARM64 Kernel with DS-5 Community Edition

It is very convenient to view the meaning of each field of the processor state PSTATE.

Debugging ARM64 Kernel with DS-5 Community Edition

DS-5 can view the values of each system register in real-time, parsing each domain and field, displaying the meaning and current value of the fields. For developers, this is incredibly convenient, eliminating the need to debug while referencing the 7000-page chip manual. Ben Shu teaches everyone how to use the ARM DS-5 Community Edition to debug the kernel, recording it as a video, prioritized for friends watching the flagship series. When learning Linux, just watch Ben Shu’s flagship series video!

Debugging ARM64 Kernel with DS-5 Community Edition

To purchase the official DS-5 and ARM hardware emulator, please contact ARM’s domestic agent: Emdoor Electronics at http://tools.emdoor.com/.

Debugging ARM64 Kernel with DS-5 Community Edition

Leave a Comment