From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2607:f138:0:13::2]) by sourceware.org (Postfix) with ESMTPS id 94F84385841A; Wed, 21 Sep 2022 17:36:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94F84385841A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 367051A84AD5; Wed, 21 Sep 2022 13:36:52 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH] Support AT_USRSTACKBASE and AT_USRSTACKLIM. Date: Wed, 21 Sep 2022 10:36:46 -0700 Message-Id: <20220921173646.7219-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Wed, 21 Sep 2022 13:36:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_STATUS,KHOP_HELO_FCRDNS,SPF_HELO_PASS,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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'. --- 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. */ -- 2.37.2