freebsd-ports/devel/gdb
John Baldwin 1535c8205b Fix an issue with gdb triggering assertions in kgdb on i386.
The kgdb targets use runtime assertions on native targets to verify
that the helper arrays documenting the layout of things like the PCB
and trapframe structures match.  Ideally these asserts would be
compile time assertions, but they cannot be checked at compile time.
Instead, they are checked at runtime during gdb startup.

However, the layout of the i386 PCB changed when the AVX changes were
merged to i386.  The constants in the i386 target assume the post-AVX
layout, but gdb packages on stable branches might be built against
pre-AVX worlds.  In that case, those gdb binaries will trigger these
assertions on every invocation.

As a workaround, disable the PCB-related assertions on pre-AVX worlds.
If kgdb is run against a pre-AVX kernel it will not be able to parse
the PCB correctly, but userland debugging should work fine.  kgdb
built against a pre-AVX world but run against an AVX kernel should
work fine.

PR:		209061
Reported by:	trasz
Approved by:	luca.pizzamiglio@gmail.com (maintainer), swills
2016-04-27 16:11:53 +00:00
..
files Fix an issue with gdb triggering assertions in kgdb on i386. 2016-04-27 16:11:53 +00:00
distinfo
Makefile Fix an issue with gdb triggering assertions in kgdb on i386. 2016-04-27 16:11:53 +00:00
pkg-descr
pkg-plist