[Bug 209061] devel/gdb: Fix gdb/i386 built on older kernels

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Apr 26 02:48:44 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209061

            Bug ID: 209061
           Summary: devel/gdb: Fix gdb/i386 built on older kernels
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: jhb at FreeBSD.org
                CC: luca.pizzamiglio at gmail.com, trasz at FreeBSD.org
             Flags: maintainer-feedback?(luca.pizzamiglio at gmail.com)
                CC: luca.pizzamiglio at gmail.com

Created attachment 169704
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=169704&action=edit
kgdb_i386.patch

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 against an AVX kernel should work fine.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list