public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: John Baldwin <jhb@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] Support AT_USRSTACKBASE and AT_USRSTACKLIM.
Date: Fri, 23 Sep 2022 22:36:31 +0000 (GMT)	[thread overview]
Message-ID: <20220923223631.98D7C3858D1E@sourceware.org> (raw)

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

commit 4f60f82104e428ba23cf7c82cde7ea536af092fd
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Fri Sep 23 15:36:10 2022 -0700

    Support AT_USRSTACKBASE and AT_USRSTACKLIM.
    
    FreeBSD's kernel has recently added two new ELF auxiliary vector
    entries to describe the location of the user stack for the initial
    thread in a process.
    
    This change displays the proper name and description of these entries
    in 'info auxv'.

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

diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 40370100c0f..309777c55f2 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1571,6 +1571,8 @@ fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
       TAG (PS_STRINGS, _("Pointer to ps_strings"), AUXV_FORMAT_HEX);
       TAG (FXRNG, _("Pointer to root RNG seed version"), AUXV_FORMAT_HEX);
       TAG (KPRELOAD, _("Base address of vDSO"), AUXV_FORMAT_HEX);
+      TAG (USRSTACKBASE, _("Top of user stack"), AUXV_FORMAT_HEX);
+      TAG (USRSTACKLIM, _("Grow limit of user stack"), AUXV_FORMAT_HEX);
     }
 
   fprint_auxv_entry (file, name, description, format, type, val);
diff --git a/include/elf/common.h b/include/elf/common.h
index ebcd8f9e82c..287526d74ed 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1405,6 +1405,8 @@
 #define AT_FREEBSD_PS_STRINGS   32      /* struct ps_strings. */
 #define AT_FREEBSD_FXRNG        33      /* Pointer to root RNG seed version. */
 #define AT_FREEBSD_KPRELOAD     34      /* Base of vdso. */
+#define AT_FREEBSD_USRSTACKBASE 35      /* Top of user stack. */
+#define AT_FREEBSD_USRSTACKLIM  36      /* Grow limit of user stack. */
 
 #define AT_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */

                 reply	other threads:[~2022-09-23 22:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220923223631.98D7C3858D1E@sourceware.org \
    --to=jhb@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).