Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Nov 2014 10:15:23 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Julian Elischer <julian@freebsd.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: bhyve remote kgdb does not support kernel modules...
Message-ID:  <20141115181523.GA24601@funkthat.com>
In-Reply-To: <54677DFC.70708@freebsd.org>
References:  <20141115093713.GY24601@funkthat.com> <20141115094340.GZ24601@funkthat.com> <54677DFC.70708@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote this message on Sun, Nov 16, 2014 at 00:23 +0800:
> On 11/15/14, 5:43 PM, John-Mark Gurney wrote:
> >John-Mark Gurney wrote this message on Sat, Nov 15, 2014 at 01:37 -0800:
> >>So, I got remote kgdb working w/ bhyve, but kernel modules aren't
> >>loaded...
> >>
> >>I'm getting:
> >>(kgdb) bt
> >>#0  kdb_enter (why=0xffffffff8102ee88 "panic", msg=<value optimized out>)
> >>     at ../../../kern/subr_kdb.c:444
> >>#1  0xffffffff8094aa79 in vpanic (fmt=<value optimized out>,
> >>     ap=<value optimized out>) at ../../../kern/kern_shutdown.c:739
> >>#2  0xffffffff8094a8c9 in kassert_panic (fmt=<value optimized out>)
> >>     at ../../../kern/kern_shutdown.c:634
> >>#3  0xffffffff8093583c in __mtx_lock_flags (c=0xfffff80002919720, opts=0,
> >>     file=0xffffffff81c3f0fa 
> >>     "/usr/home/jmg/freebsd.p4/opencrypto/sys/modules/aesni/../../crypto/aesni/aesni.c", line=442) at ../../../kern/kern_mutex.c:217
> >>#4  0xffffffff81c3e3a7 in ?? ()
> >>#5  0xfffff80002a474a0 in ?? ()
> >>#6  0xfffff80002919720 in ?? ()
> >>
> >>Where those should be in the aesni.ko module...  If I run kgdb on a
> >>local machine, it properly finds the kernel modules... Any hits on
> >>how to fix this?
> 
> works for me..
> the modules I'm debugging are not compiled in.
> you have to have the modules in the standard place ONE THE GDB HOST.
> I make a chroot with an image of the machine being debugged, PLUS the 
> sources.
> and then run kgdb from inside that chroot.

Ahh, that's right, kgdb isn't smart enough to know when you've pointed
it to the kernel build dir whereh the modules are... :(

Thanks for the reminder...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141115181523.GA24601>