From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1936) id 98D7C3858D1E; Fri, 23 Sep 2022 22:36:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98D7C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663972591; bh=rM6dmu4aen5Gh8JlZQb5pS2zqcNXdOwzaWnfPrmi9II=; h=From:To:Subject:Date:From; b=gWi5FuWWvVKIIkFBZ2L+cGENjxzlZq4PeT1vESUpCg/A4fWSrU+of3XffZScYE24i ryaKDHjbod36Vg/rVgJsTccCZ934WyGlZrv0jeaCDkvjPa6ysQP0yJMAx986nYsjiU tXqf/Fx4OzqM06OzYBoaSWTEeOq59t0LIO5Nt+Lo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: John Baldwin To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] Support AT_USRSTACKBASE and AT_USRSTACKLIM. X-Act-Checkin: binutils-gdb X-Git-Author: John Baldwin X-Git-Refname: refs/heads/master X-Git-Oldrev: eb668e50036e979fb0a74821df4eee0307b44e66 X-Git-Newrev: 4f60f82104e428ba23cf7c82cde7ea536af092fd Message-Id: <20220923223631.98D7C3858D1E@sourceware.org> Date: Fri, 23 Sep 2022 22:36:31 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4f60f82104e4= 28ba23cf7c82cde7ea536af092fd commit 4f60f82104e428ba23cf7c82cde7ea536af092fd Author: John Baldwin Date: Fri Sep 23 15:36:10 2022 -0700 Support AT_USRSTACKBASE and AT_USRSTACKLIM. =20 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. =20 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, struc= t 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); } =20 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 versio= n. */ #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. */ =20 #define AT_SUN_UID 2000 /* Effective user ID. */ #define AT_SUN_RUID 2001 /* Real user ID. */