From owner-freebsd-fs@freebsd.org Thu Aug 24 09:30:49 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C34FDDDAE8A for ; Thu, 24 Aug 2017 09:30:49 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C08C71449; Thu, 24 Aug 2017 09:30:49 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: by mail-io0-x235.google.com with SMTP id r14so298827iod.1; Thu, 24 Aug 2017 02:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sx4diBTNn8VSqv12FlICaO7skVSoqHTBrQQ6ILw3Hww=; b=M+/gFNFtwPshufKq5wh72yJ6y6p6X3L0WAIfkFV/hy1Khu8cy3kmWX8oAA6U9fIfMQ 4IoQKneLO8nx7h/VeA/+8JWlSjs1GHqd6jnHLdBgoX1QlazJ198p0gyPGNLcpuEcbY/J Z8V3tshNVLOzpUZy+Bt5xAR/AgFyS+Jmh1mT2P08eIp6GM7j4cQCI6NFO2t/NYjNvWH2 x9Jwi4Z162Ih+3W+7fuaNYArM5AUI14XOveyPpYXVUe/Vmg1uCVlb3PytmEtcv4Qk9mU klCMV4m7exEjYlW7g/VK9uEUmdTqXeVkAR1H7BBrwg8Wy5j6Q5ox7fOgabWQq0rEN7hx 9Fxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Sx4diBTNn8VSqv12FlICaO7skVSoqHTBrQQ6ILw3Hww=; b=YiidWzEeatmUBD3oOrvREJqz2TYVuW05RfPW0oGOkWgrzdS0D75E8alvSdjDimSzEi /k4YBhWvUAtTh2g1CIaIBHOjdBckBRrVtS7bue6f3QuM6RmulqP26Haebf4kYobt5WKN wmMvOZGKtSgAVAdP4KEpJcWjTHqBLfKWKAKJrrnIcJ47VSp/pNrv7/L5wrnHn4KyRx59 Gx9YBiEqOPHbBruLy/5QWlicFWTTcV9qDYFwUd63XUDM37LM3ZRrg6irOzkboMcKn+ch mdGKkg+i6xKACkr1YoPEIoX/M7sYHhgDPUvmSSbfETMQc5wSGd0eOaSVRsDNQEaYbO2P xSSw== X-Gm-Message-State: AHYfb5iGDe5Ca14VbSZOyw+a4s8QGdw/LUCamIAaeUpMHyLrwLKx2joh w3teHgX8eNXV2VLRXS2USWeUs5+e6w== X-Received: by 10.107.155.69 with SMTP id d66mr4450322ioe.75.1503567048739; Thu, 24 Aug 2017 02:30:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.2.200 with HTTP; Thu, 24 Aug 2017 02:30:48 -0700 (PDT) In-Reply-To: <046d8df4-71a6-65f5-18ad-50589d6d466d@freebsd.org> References: <046d8df4-71a6-65f5-18ad-50589d6d466d@freebsd.org> From: Aijaz Baig Date: Thu, 24 Aug 2017 15:00:48 +0530 Message-ID: Subject: Re: Tips on remote debugging for filesystem code To: Julian Elischer Cc: freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 09:30:49 -0000 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 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