Setting up an ARM target system and kernel for KGDB
When a Linux kernel is built, a couple of arch-specific kernel image files are generated: the uncompressed kernel image file, vmlinux
, along with the compressed kernel image, found within the arch/<your-arch>/boot
directory and named bzImage
or zImage
, and so on. The latter is always the image with which the Linux OS is booted. Both these kernel image files are rendered in the usual Executable and Linker Format (ELF), thus they're amenable to being used with a variety of tooling on Linux, including GDB. So, if we use GDB to interpret the kernel's uncompressed vmlinux
file, it should work. Practically speaking, though, without debug symbolic information embedded within this file, it's a lot less useful. What we really require for kernel debug purposes using KGDB is the target's uncompressed vmlinux
kernel image along with debug symbolic information and the kernel symbols within it. This is achieved by enabling...