Page MenuHomeFreeBSD

Add a KGDB option to the devel/gdb port.
ClosedPublic

Authored by jhb on Sep 23 2015, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 12:00 PM
Unknown Object (File)
Thu, Apr 18, 2:02 AM
Unknown Object (File)
Wed, Apr 17, 11:38 PM
Unknown Object (File)
Fri, Mar 29, 1:25 PM
Unknown Object (File)
Fri, Mar 29, 3:13 AM
Unknown Object (File)
Mar 13 2024, 9:42 PM
Unknown Object (File)
Mar 13 2024, 9:42 PM
Unknown Object (File)
Mar 13 2024, 9:42 PM

Details

Summary

Add a new KGDB option to the devel/gdb port. This adds a forward port
of the kernel-specific bits of kgdb to recent gdb. It only supports
amd64, i386, powerpc, and sparc64.

This is based on the changes in the freebsd-7.10-kgdb branch at
github/bsdjhb/gdb.git.

Test Plan
  • tested build with just threads, just kgdb, and both kgdb and threads.
  • verified gdb710 was able to debug threads when enabled
  • verified kgdb710 worked on a live amd64 system when enabled

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Add a KGDB option to the devel/gdb port..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
devel/gdb/Makefile
37 ↗(On Diff #8916)

Is there a reason not to include KGDB support by default? In a subsequent change perhaps?

devel/gdb/pkg-plist
2 ↗(On Diff #8916)

Here there is a typo, a missing k in kgdb:
%%GDB_LINK%%%%KGDB%%bin/kgdb

A note about architectures: devel/gdb is tested on i386, amd64, powerpc and powerpc64; at the moment, sparc64 is excluded (ONLY_FOR_ARCHS in the Makefile)

Is powerpc64 supported on kgdb? Otherwise, we should arrange the Makefile to exclude this options on that architecture.

devel/gdb/Makefile
37 ↗(On Diff #8916)

Just an abundance of caution. It will need to be the default before we can remove the base system gdb. Also, we should probably only remove the base system gdb for platforms that 1) support devel/gdb with kgdb, and 2) support lldb in the base system. However, once kgdb in here has had a bit more testing that will be true for at least amd64 and i386. Eventually we might dispense with requirement 2) if we require external toolchains for say, sparc64.

A note about architectures: devel/gdb is tested on i386, amd64, powerpc and powerpc64; at the moment, sparc64 is excluded (ONLY_FOR_ARCHS in the Makefile)

Is powerpc64 supported on kgdb? Otherwise, we should arrange the Makefile to exclude this options on that architecture.

The ppcfbsd-kern.c target supports both powerpc and powerpc64. However, I haven't yet had anyone confirm that they've tested it. I'm trying to get qemu going on my own machines so I can test it, but I've yet to get FreeBSD to install inside of qemu for powerpc (32 or 64 bit).

Fix kgdb link in plist.

  • Remove unused header.
  • Fix kernel_from_dumpnr() to work with newer debug build.
This revision is now accepted and ready to land.Oct 5 2015, 10:33 PM
This revision was automatically updated to reflect the committed changes.