[CFT] Newer kgdb bits for testing

Brian Scott bscott at bunyatech.com.au
Tue Jun 26 09:07:39 UTC 2018

Not an expert on kgdb but I've been having a bit of a fight with it this
week on my Raspberry-Pi.

I've just built this and tested it on my 'problem' vmcore file. Worked
like a dream. It confirmed an answer that had taken a lot of work for me
to dig out with the existing version.

Thanks for the work.


P.S. CC'ing you directly because the mail lists seem to dislike my email
for some reason (some of the time). Must get around to investigating
when I've got time.

On 26/6/18 9:41 am, John Baldwin wrote:
> 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.

More information about the freebsd-arm mailing list