public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Support AT_BSDFLAGS on FreeBSD.
@ 2020-03-26 16:51 John Baldwin
  0 siblings, 0 replies; only message in thread
From: John Baldwin @ 2020-03-26 16:51 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a879b4d5a683f8dbebae8cf98297ee4a2db2e9e1

commit a879b4d5a683f8dbebae8cf98297ee4a2db2e9e1
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Thu Mar 26 09:48:28 2020 -0700

    Support AT_BSDFLAGS on FreeBSD.
    
    FreeBSD's kernel recently added a new ELF auxiliary vector entry
    holding a mask of software features provided by the kernel.  This
    change fixes 'info auxv' to report the name and description for this
    vector entry instead of '???'.
    
    include/ChangeLog:
    
            * elf/common.h (AT_FREEBSD_BSDFLAGS): Define.
    
    gdb/ChangeLog:
    
            * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.

Diff:
---
 gdb/ChangeLog        | 4 ++++
 gdb/fbsd-tdep.c      | 1 +
 include/ChangeLog    | 4 ++++
 include/elf/common.h | 1 +
 4 files changed, 10 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 049f52d3cc3..10a3548fd4c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-26  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
+
 2020-03-26  Tom Tromey  <tom@tromey.com>
 
 	* dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index ffffb187008..54f5149e5c4 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1597,6 +1597,7 @@ fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
       TAG (EHDRFLAGS, _("ELF header e_flags"), AUXV_FORMAT_HEX);
       TAG (HWCAP, _("Machine-dependent CPU capability hints"), AUXV_FORMAT_HEX);
       TAG (HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
+      TAG (BSDFLAGS, _("ELF BSD flags"), AUXV_FORMAT_HEX);
     }
 
   fprint_auxv_entry (file, name, description, format, type, val);
diff --git a/include/ChangeLog b/include/ChangeLog
index 3d26a570cac..d7e5ada9327 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-26  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf/common.h (AT_FREEBSD_BSDFLAGS): Define.
+
 2020-03-24  Martin Liska  <mliska@suse.cz>
 
 	PR lto/94249
diff --git a/include/elf/common.h b/include/elf/common.h
index 1c84ccb430e..6741c34a007 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1251,6 +1251,7 @@
 #define AT_FREEBSD_EHDRFLAGS    24      /* e_flags field from ELF header. */
 #define AT_FREEBSD_HWCAP        25      /* CPU feature flags. */
 #define AT_FREEBSD_HWCAP2       26      /* CPU feature flags 2. */
+#define AT_FREEBSD_BSDFLAGS     27      /* ELF BSD Flags. */
 
 #define AT_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-26 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 16:51 [binutils-gdb] Support AT_BSDFLAGS on FreeBSD John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).