Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by rin ...
details: https://anonhg.NetBSD.org/src/rev/36b2055929aa
branches: netbsd-9
changeset: 964249:36b2055929aa
user: martin <martin%NetBSD.org@localhost>
date: Fri Jan 01 13:04:08 2021 +0000
description:
Pull up following revision(s) (requested by rin in ticket #1173):
sys/kern/core_elf32.c: revision 1.65 (patch)
Use correct note types for register storage in 32-bit core files for
architecture on which 64- and 32-bit ABIs use different values for
PT_GET{,FP}REGS, i.e., aarch64{,eb}.
Now, 32-bit GDB works fine for core files generated by aarch64{,eb}
kernel.
Should be no functional changes for ports other than aarch64{,eb}.
diffstat:
sys/kern/core_elf32.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 391205c7fb07 -r 36b2055929aa sys/kern/core_elf32.c
--- a/sys/kern/core_elf32.c Fri Jan 01 12:58:35 2021 +0000
+++ b/sys/kern/core_elf32.c Fri Jan 01 13:04:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_elf32.c,v 1.58 2019/01/22 03:44:44 kamil Exp $ */
+/* $NetBSD: core_elf32.c,v 1.58.4.1 2021/01/01 13:04:08 martin Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.58 2019/01/22 03:44:44 kamil Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.58.4.1 2021/01/01 13:04:08 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_coredump.h"
@@ -67,6 +67,10 @@
#ifdef COREDUMP
+#ifdef COMPAT_NETBSD32
+#include <machine/netbsd32_machdep.h>
+#endif
+
struct writesegs_state {
Elf_Phdr *psections;
proc_t *p;
@@ -489,8 +493,13 @@
if (error)
return (error);
- ELFNAMEEND(coredump_savenote)(ns, PT_GETREGS, name, &intreg,
- sizeof(intreg));
+ ELFNAMEEND(coredump_savenote)(ns,
+#if ELFSIZE == 32 && defined(PT32_GETREGS)
+ PT32_GETREGS,
+#else
+ PT_GETREGS,
+#endif
+ name, &intreg, sizeof(intreg));
#ifdef PT_GETFPREGS
freglen = sizeof(freg);
@@ -498,7 +507,13 @@
if (error)
return (error);
- ELFNAMEEND(coredump_savenote)(ns, PT_GETFPREGS, name, &freg, freglen);
+ ELFNAMEEND(coredump_savenote)(ns,
+# if ELFSIZE == 32 && defined(PT32_GETFPREGS)
+ PT32_GETFPREGS,
+# else
+ PT_GETFPREGS,
+# endif
+ name, &freg, freglen);
#endif
/* XXX Add hook for machdep per-LWP notes. */
return (0);
Home |
Main Index |
Thread Index |
Old Index