Date: Thu, 17 Jan 2008 16:52:30 -0500 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/gnu/usr.bin/gdb/kgdb kgdb.h main.c trgt.c Message-ID: <200801171652.31546.jhb@freebsd.org> In-Reply-To: <200801172143.m0HLhCm8016953@repoman.freebsd.org> References: <200801172143.m0HLhCm8016953@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 17 January 2008 04:43:12 pm John Baldwin wrote: > jhb 2008-01-17 21:43:12 UTC > > FreeBSD src repository > > Modified files: > gnu/usr.bin/gdb/kgdb kgdb.h main.c trgt.c > Log: > Add a new 'add-kld <kld>' command to kgdb to make it easier to analyze > crash dumps with kernel modules. The command is basically a wrapper > around add-symbol-file except that it uses the kernel linker data > structures and the ELF section headers of the kld to calculate the > section addresses add-symbol-file needs. Forgot to say: Tested on: i386, amd64 A sample run on i386: > sudo ./kgdb -c /usr/crash/vmcore.10 /boot/kernel/kernel ... crash: blow the kernel stack on purpose Fatal double fault: eip = 0xc05c6220 esp = 0xe61b0000 ebp = 0xe61b0018 panic: double fault KDB: enter: panic ... (kgdb) where #0 doadump () at pcpu.h:195 #1 0xc05d399c in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:417 #2 0xc05d3c0a in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:571 #3 0xc08115d9 in dblfault_handler () at /usr/src/sys/i386/i386/trap.c:927 #4 0xc05c6220 in mtx_pool_setup_dynamic () #5 0xc065e125 in arc4rand (ptr=0xe61b0168, len=4, reseed=0) at /usr/src/sys/libkern/arc4random.c:142 #6 0xc065e171 in arc4random () at /usr/src/sys/libkern/arc4random.c:150 #7 0xc3d43402 in ?? () #8 0xb15ac28c in ?? () #9 0x793b5626 in ?? () #10 0xe61b018c in ?? () #11 0xc3d43410 in ?? () #12 0xbc8e58bf in ?? () ... (kgdb) add-kld crash.ko add symbol table from file "/boot/modules/crash.ko.symbols" at .text_addr = 0xc3d416f0 .data_addr = 0xc3d44000 .bss_addr = 0xc3d44254 .rodata_addr = 0xc3d4364e Reading symbols from /boot/modules/crash.ko.symbols...done. (kgdb) where #0 doadump () at pcpu.h:195 #1 0xc05d399c in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:417 #2 0xc05d3c0a in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:571 #3 0xc08115d9 in dblfault_handler () at /usr/src/sys/i386/i386/trap.c:927 #4 0xc05c6220 in mtx_pool_setup_dynamic () #5 0xc065e125 in arc4rand (ptr=0xe61b0168, len=4, reseed=0) at /usr/src/sys/libkern/arc4random.c:142 #6 0xc065e171 in arc4random () at /usr/src/sys/libkern/arc4random.c:150 #7 0xc3d43402 in blow_stack () at crash.c:773 #8 0xc3d43410 in blow_stack () at crash.c:764 #9 0xc3d43410 in blow_stack () at crash.c:764 #10 0xc3d43410 in blow_stack () at crash.c:764 #11 0xc3d43410 in blow_stack () at crash.c:764 #12 0xc3d43410 in blow_stack () at crash.c:764 #13 0xc3d43410 in blow_stack () at crash.c:764 #14 0xc3d43410 in blow_stack () at crash.c:764 #15 0xc3d43410 in blow_stack () at crash.c:764 #16 0xc3d43410 in blow_stack () at crash.c:764 #17 0xc3d43410 in blow_stack () at crash.c:764 #18 0xc3d43410 in blow_stack () at crash.c:764 #19 0xc3d43410 in blow_stack () at crash.c:764 -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801171652.31546.jhb>