[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: debugging with Qemu

From: Bakul Shah
Subject: [Qemu-devel] Re: debugging with Qemu
Date: Wed, 08 Jun 2005 11:55:07 -0700

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

Breakpoint 3, kldload (td=0xc1419c00, uap=0xc8105d14)
    at /usr/src/sys/kern/kern_linker.c:744
744     {
(gdb) 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

    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....

reply via email to

[Prev in Thread] Current Thread [Next in Thread]