FreeBSD Bugzilla – Attachment 169704 Details for
Bug 209061
devel/gdb: Fix gdb/i386 built on older kernels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
kgdb_i386.patch
kgdb_i386.patch (text/plain), 1.64 KB, created by
John Baldwin
on 2016-04-26 02:48:43 UTC
(
hide
)
Description:
kgdb_i386.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2016-04-26 02:48:43 UTC
Size:
1.64 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 414034) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= gdb > PORTVERSION= 7.11 >-#PORTREVISION= >+PORTREVISION= 1 > CATEGORIES= devel > MASTER_SITES= GNU > >Index: files/kgdb/i386fbsd-kern.c >=================================================================== >--- files/kgdb/i386fbsd-kern.c (revision 414034) >+++ files/kgdb/i386fbsd-kern.c (working copy) >@@ -478,6 +478,20 @@ > i386fbsd_pspace_data_cleanup); > > #ifdef __i386__ >+ /* >+ * FreeBSD/i386 kernels prior to the introduction of AVX >+ * support used a different layout for the PCB. If gdb is >+ * compiled on these systems, these asserts will fail. The >+ * package builders build packages on older systems which are >+ * then run on newer systems. These binaries trip over these >+ * assertions even when debugging user programs and even >+ * though the running kernel is new enough. To cope, disable >+ * the assertion checks unless gdb is built against a new >+ * enough world. Note that this means kgdb is not going to >+ * parse PCBs correctly on FreeBSD/i386 kernels before AVX was >+ * merged. >+ */ >+#if __FreeBSD_version >= 1001505 > gdb_assert(offsetof(struct pcb, pcb_ebx) > == i386fbsd_pcb_offset[I386_EBX_REGNUM]); > gdb_assert(offsetof(struct pcb, pcb_esp) >@@ -490,6 +504,7 @@ > == i386fbsd_pcb_offset[I386_EDI_REGNUM]); > gdb_assert(offsetof(struct pcb, pcb_eip) > == i386fbsd_pcb_offset[I386_EIP_REGNUM]); >+#endif > gdb_assert(CODE_SEL == GSEL(GCODE_SEL, SEL_KPL)); > gdb_assert(DATA_SEL == GSEL(GDATA_SEL, SEL_KPL)); > gdb_assert(PRIV_SEL == GSEL(GPRIV_SEL, SEL_KPL));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209061
: 169704