Date: Wed, 08 Jun 2005 11:55:07 -0700 From: Bakul Shah <bakul@BitBlocks.com> To: Igor Shmukler <shmukler@mail.ru> Cc: hackers@freebsd.org, qemu-devel@nongnu.org Subject: Re: debugging with Qemu Message-ID: <200506081855.j58It7m2087868@gate.bitblocks.com> In-Reply-To: Your message of "Wed, 08 Jun 2005 21:39:18 %2B0400." <E1Dg4WM-0009UX-00.shmukler-mail-ru@f29.mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Hmm... I've used qemu a bit to debug the kernel. Even used it to debug a loadable module. Here is what I did: # qemu -s img # cd <path to where the kernel was built on the host> # gdb kernel.debug (gdb) target remote localhost:1234 ... (gdb) l kldload 739 /* 740 * MPSAFE 741 */ 742 int 743 kldload(struct thread *td, struct kldload_args *uap) 744 { 745 char *kldname, *modname; 746 char *pathname = NULL; 747 linker_file_t lf; 748 int error = 0; (gdb) b 743 (gdb) c Continuing. Breakpoint 3, kldload (td=0xc1419c00, uap=0xc8105d14) at /usr/src/sys/kern/kern_linker.c:744 744 { (gdb) c Continuing. ... ^C Program received signal 0, Signal 0. cpu_idle_default () at /usr/src/sys/i386/i386/machdep.c:1113 1113 } (gdb) detach Ending remote debugging. (gdb) q I am using kqemu and qemu built from May 2 snapshot if that matters. This was a stock 5.4-RELEASE complied locallly with makeoptions DEBUG=-g added the kernel config file. The host was also running 5.4 but that should not matter. May be if you describe the exact symptoms....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506081855.j58It7m2087868>