Linux: kdb vs. kgdb
Submitted by Jeremy
on March 30, 2002 - 11:47am
Andrew Morton debugger Jeremy Jackson kdb kdgb Keith Owens Linux news
Jeremy Jackson asked "which kernel debugger is 'best'?" on the Linux Kernel Mailing List. The responses from Andrew Morton and Keith Owens offer some interesting insight into the differences between the two main Linux kernel debuggers: kdb and kgdb. Long a sore point by many kernel developers, Linus Torvalds has refused to include a kernel debugger in the main kernel tree.
According to Keith Owens, the kdb maintainer, "kdb and kgdb are aimed at different debugging environments. kgdb requires a second machine containing the kernel compiled with -g, kdb lets you debug directly on the machine that failed, with or without compiling with -g. Almost all the differences flow from that design decision".
From the kdb home page, "This debugger is part of the linux kernel and provides a means of examining kernel memory and data structures while the system is operational. Additional commands may be easily added to format and display essential system data structures given an identifier or address of the data structure. Current command set allows complete control of kernel operations including single-stepping a processor, stopping upon execution of a specific instruction, stopping upon access (or modification) of a specific virtual memory location, stopping upon access to a register in the input-output address space, stack tracebacks for the current active task as well as for all other tasks (by process id), instruction disassembly, et. al."
From the kgdb home page (kgdb is maintained by Amit Kale) introduction, "kgdb is a source level debugger for linux kernel. It is used along with gdb to debug linux kernel. Kernel developers can debug a kernel similar to application programs with use of kgdb. It makes it possible to place breakpoints in kernel code, step through the code and observe variables."
No comments:
Post a Comment