Debugging Linux Kernel using KGDB Part 9 - Using Linux Provided GDB Scripts

Linux kernel has provided a collection of helper scripts which can simplify kernel debugging steps.
You can observe in the linux source directory a file named vmlinux-gdb.py. To use this, copy the below command in ~/.gdbinit

add-auto-load-safe-path /path/to/linux-build

List of commands supported by the script can be found by running:

(gdb) apropos lx


Let's try some of the commands.

1. To find out the kernel command line with which the target booted. "lx-cmdline"


2. To find out the list of processes . "lx-ps"


3. To find out list of loaded modules: lx-lsmod


Comments

Post a Comment

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto