Allow gdb to read core files on amd64. Patch originally from kettenis@
(from base gdb). ok sthen@
This commit is contained in:
parent
413830b510
commit
c8935d2093
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2011/11/13 14:56:57 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2011/12/22 20:27:31 pascal Exp $
|
||||
|
||||
COMMENT= GNU debugger
|
||||
CATEGORIES= devel
|
||||
|
||||
DISTNAME= gdb-7.2
|
||||
REVISION= 6
|
||||
REVISION= 7
|
||||
|
||||
HOMEPAGE= http://www.gnu.org/software/gdb/
|
||||
|
||||
@ -37,4 +37,7 @@ WANTLIB += expat ${MODPY_WANTLIB} pthread util
|
||||
LIB_DEPENDS += ${MODPY_LIB_DEPENDS}
|
||||
MODPY_BUILDDEP = No
|
||||
|
||||
post-extract:
|
||||
perl -pi -e 's/\014//g' ${WRKSRC}/gdb/amd64obsd-tdep.c
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
38
devel/gdb/patches/patch-gdb_amd64obsd-tdep_c
Normal file
38
devel/gdb/patches/patch-gdb_amd64obsd-tdep_c
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-gdb_amd64obsd-tdep_c,v 1.1 2011/12/22 20:27:32 pascal Exp $
|
||||
--- gdb/amd64obsd-tdep.c.orig Thu Dec 22 18:17:24 2011
|
||||
+++ gdb/amd64obsd-tdep.c Thu Dec 22 18:17:24 2011
|
||||
@@ -456,9 +456,6 @@ amd64obsd_init_abi (struct gdbarch_info info, struct g
|
||||
tdep->gregset_num_regs = ARRAY_SIZE (amd64obsd_r_reg_offset);
|
||||
tdep->sizeof_gregset = 24 * 8;
|
||||
|
||||
- set_gdbarch_regset_from_core_section (gdbarch,
|
||||
- amd64obsd_regset_from_core_section);
|
||||
-
|
||||
tdep->jb_pc_offset = 7 * 8;
|
||||
|
||||
tdep->sigtramp_p = amd64obsd_sigtramp_p;
|
||||
@@ -479,6 +476,17 @@ amd64obsd_init_abi (struct gdbarch_info info, struct g
|
||||
}
|
||||
|
||||
|
||||
+/* Traditional (a.out) NetBSD-style core dumps. */
|
||||
+
|
||||
+static void
|
||||
+amd64obsd_core_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
+{
|
||||
+ amd64obsd_init_abi (info, gdbarch);
|
||||
+
|
||||
+ set_gdbarch_regset_from_core_section
|
||||
+ (gdbarch, amd64obsd_regset_from_core_section);
|
||||
+}
|
||||
+
|
||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
||||
void _initialize_amd64obsd_tdep (void);
|
||||
|
||||
@@ -493,5 +501,5 @@ _initialize_amd64obsd_tdep (void)
|
||||
|
||||
/* OpenBSD uses traditional (a.out) NetBSD-style core dumps. */
|
||||
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
|
||||
- GDB_OSABI_NETBSD_AOUT, amd64obsd_init_abi);
|
||||
+ GDB_OSABI_NETBSD_AOUT, amd64obsd_core_init_abi);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user