Tips on remote debugging for filesystem code

Aijaz Baig aijazbaig1 at gmail.com
Thu Aug 24 05:40:16 UTC 2017


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

-- 

Best Regards,
Aijaz Baig


More information about the freebsd-fs mailing list