[CFT] Newer kgdb bits for testing

John Baldwin jhb at FreeBSD.org
Mon Jun 25 23:41:47 UTC 2018


At BSDCan I finally sat down and wrote a FreeBSD/arm kernel target for the
ports kgdb (GDB 8.1).  It passed simple testing "live" on my little RPi,
but I haven't tested it against a vmcore.  (In theory cross-debugging a
vmcore should Just Work(tm)).  I'd like to default FreeBSD/arm to storing
the old gdb in /usr/libexec for use by crashinfo, but the ports kgdb needs
a bit more testing before we can throw the switch.

To build the new kgdb, you can either apply the patches from
https://reviews.freebsd.org/D16013 to the devel/gdb port and rebuild
the port, or you can build gdb from the 'freebsd-8.1-kgdb' branch
of github.com/bsdjhb/gdb.git.

One thing in particular I haven't been able to test yet is unwinding
across an in-kernel trapframe (for an exception taken while in the
kernel for example).  It wasn't clear to me from reading the assembly
bits in exception.S if I need to pull the PC and LR values from a
different offset in struct trapframe for in-kernel trapframes vs
traps from userland.

-- 
John Baldwin


More information about the freebsd-arm mailing list