From: Keith Owens <kaos@ocs.com.au> To: linux-kernel@vger.rutgers.edu Subject: Announce: modutils 2.3.11 is available - the debugger's helper Date: Fri, 21 Apr 2000 22:24:35 +1000 Fastest download from kernel.org. Mirror at ftp://ftp.**.kernel.org/pub/linux/utils/kernel/modutils/v2.3 replace '**' with your favourite local kernel.org mirror. Mirror at ftp://oss.sgi.com/pub/mirror/modutils/v2.3. Master at ftp://ftp.ocs.com.au/pub/modutils/v2.3. (slow) patch-modutils-2.3.11.gz Patch from modutils 2.3.10 to 2.3.11 modutils-2.3.11.tar.gz Source tarball, includes RPM spec file modutils-2.3.11-1.src.rpm As above, in SRPM format modutils-2.3.11-1.i386.rpm Compiled with egcs-2.91.66, glibc 2.1.2 Changelog extract * Add ieee1394 directory, requested by Andreas Bombe. * Documentation and options updates. Add long options, clean up missing or incorrect usage entries. Callum <no last name>. * White space cleanup. * Do meta expansion on "include" and "if" parameters. * Ignore genksyms suffix when reading map from -F. * Add support for kallsyms to assist kernel debugging. * Hint message for -EBUSY. * Sanity check on number of local symbols. The meta expansion on "include" and "if" parameters means that you can include the kernel version (`uname -r` or `kernelversion`) in tests for filenames, "if -f /lib/modules/`uname -r`/ide/ide-probe.o". The "Add support for kallsyms to assist kernel debugging" change is the interesting one. If your kernel is compiled with CONFIG_KALLSYMS[1] then the kernel and all loaded modules automatically contain a complete list of all non-stack kernel symbols. No longer does each debugger have to hunt around for symbols or include its own code to handle symbol tables as modules are loaded or unloaded, it is now a standard feature[1]. Loading a complete non-stack symbol table is relatively expensive, it adds 10-20% to the size of the kernel and modules. The CONFIG_KALLSYMS option should only be used when debugging. The kallsyms data contains a lot of data, for the kernel and for each module it lists * The section names, start and end addresses. * The symbol names, start and end addresses and the section each symbol belongs to. Why this much data? Because if you have the start address of the section and the start and end of a symbol, you can get a clean disassemble of a module with addresses that match your system by objdump -S -j <section_name> --adjust-vma=<section_start> \ --start-address=<symbol_start> --stop-address=<symbol_end> \ module.o A similar command for the kernel, omit --adjust-vma because the kernel is executable, not relocatable. objdump -S -j <section_name> \ --start-address=<symbol_start> --stop-address=<symbol_end> \ vmlinux -S disassembles the section. If you compiled the kernel with -g you even get source and binary interleaved in the objdump listing. As proof of concept, modutils/v2.3/patch-2.2.15pre19-kallsyms-kdb-v0.6.gz is the SGI kdb patch for 2.2 kernels reworked to use kallsyms. * It uses kallsyms for its symbol table instead of the SGI symbol table. * No fixed size for the symbol table and no need to ask the user for a size at compile time. * Using the section data accurately verifies that an address falls within a kernel or module section instead of using the less reliable test on _[se]text and vmalloc areas. * Every symbol printed is followed by the module name, the section start, the symbol start and end addresses. Feed these addresses into objdump -S for a nice disassemble. [1] CONFIG_KALLSYMS support is not currently integrated into the kernel. See patch*kallsyms* in modutils/v2.3 for patches against 2.2.15pre19 for kallsyms alone and for kallsyms+kdb. Versions for other kernels and SGI kdb to follow. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/