From 2c6efba10eb857fd0ac4c21f869db23966b848d1 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 1 Mar 2017 15:54:27 -0800 Subject: [PATCH] Recognize capreg note and add a psuedo-section for GDB to find. --- bfd/elf.c | 3 +++ include/elf/common.h | 1 + 2 files changed, 4 insertions(+) diff --git a/bfd/elf.c b/bfd/elf.c index a6e251e12fd..500876f5977 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -11044,6 +11044,9 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) case NT_FREEBSD_X86_SEGBASES: return elfcore_make_note_pseudosection (abfd, ".reg-x86-segbases", note); + case NT_FREEBSD_CAPREGS: + return elfcore_make_note_pseudosection (abfd, ".reg-cap", note); + case NT_X86_XSTATE: return elfcore_grok_xstatereg (abfd, note); diff --git a/include/elf/common.h b/include/elf/common.h index bb449409257..276ca933a42 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -741,6 +741,7 @@ #define NT_FREEBSD_PROCSTAT_PSSTRINGS 15 /* Procstat ps_strings data. */ #define NT_FREEBSD_PROCSTAT_AUXV 16 /* Procstat auxv data. */ #define NT_FREEBSD_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ +#define NT_FREEBSD_CAPREGS 20 /* Capability registers. */ #define NT_FREEBSD_X86_SEGBASES 0x200 /* x86 segment base registers */ /* Note segments for core files on NetBSD systems. Note name -- 2.47.2