Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2017 15:00:48 +0530
From:      Aijaz Baig <aijazbaig1@gmail.com>
To:        Julian Elischer <julian@freebsd.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Tips on remote debugging for filesystem code
Message-ID:  <CAHB2L%2Bfx9f7XDuSLnkrmwdH9rXAys9LgnS7cD9Z4bPB24=j2jA@mail.gmail.com>
In-Reply-To: <046d8df4-71a6-65f5-18ad-50589d6d466d@freebsd.org>
References:  <CAHB2L%2Bfx_tbGt7NUf-odG780UgPLqDk34CZo0MNP4VsUTfzeZw@mail.gmail.com> <046d8df4-71a6-65f5-18ad-50589d6d466d@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Can I run BHyve from inside a FreeBSD VM? Will I need to be aware of any
pitfalls? Or does it need to actually run on bare metal?

On Thu, Aug 24, 2017 at 1:54 PM, Julian Elischer <julian@freebsd.org> wrote:

> On 24/8/17 1:40 pm, Aijaz Baig wrote:
>
>> I am trying to understand the internals of the VFS/VNODE interface in the
>> kernel and to that end I was attempting to go through the code flow. Hence
>> I hooked up two FreeBSD VMs, one as the server and the second as the
>> client
>> using named pipes as serial ports.
>>
>> I put a breakpoint on say 'ufs_lookup' and I hit it by something as simple
>> as doing an 'ls' over a directory. Then I try to step through the code and
>> examine how the structures get populated and so on. However when I step
>> through the code on (K)GDB after a few lines of C code, the server VM (the
>> debugged machine) just kind of freezes while the client (on which GDB is
>> run is also waiting on the server) and thereafter I always have to restart
>> the server VM
>>
>> Am I doing something incorrectly? How do you guys normally do it? Keen to
>> hear tips and best practices
>>
>> I have had more success recently using BHype to make a Virtual FreeBSD
> machine
>
> and connecting to it using the built-in gdb interface.
>
>
> Firstly it is easier than a serial interface and secondly you don't need
> two machines.
>
>
>
>


-- 

Best Regards,
Aijaz Baig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHB2L%2Bfx9f7XDuSLnkrmwdH9rXAys9LgnS7cD9Z4bPB24=j2jA>