Date: Wed, 2 Apr 2008 03:38:36 -0700 (PDT) From: "Sanjeev Kumar.S" <sanjeevfiles@yahoo.com> To: freebsd-hackers@freebsd.org Subject: seemingly good gdbinit for freebsd kernel errors out Message-ID: <593054.3287.qm@web57709.mail.re3.yahoo.com> In-Reply-To: <fstbkr$a2a$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Im trying to debug a gdb init script that errors out saying: too few arguments in function call Here is the script define kldload set $kld = linker_files.tqh_first set $done = 0 while ($kld != 0 && $done == 0) if ($kld->filename == $arg0) set $done = 1 else set $kld = $kld->link.tqe_next end end if ($done == 1) shell /usr/bin/objdump -h $arg0 | \ awk '/ .text/ { print "set \$offset = 0x" $6 }' > .kgdb.temp source .kgdb.temp add-symbol-file $arg0 $kld->address + $offset end end document kldload Loads a module. Arguments are module name and offset of text section. end Any thoughts ? Thanks, Sanjeev. --------------------------------- You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?593054.3287.qm>