Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org, binutils@sourceware.org
Subject: [rfa] Support new AT_BASE_PLATFORM and AT_EXECFN auxv entries
Date: Wed, 12 Nov 2008 20:39:00 -0000	[thread overview]
Message-ID: <200811121728.mACHSFsf026499@d12av02.megacenter.de.ibm.com> (raw)

Hello,

recent Linux kernels provide two new auxiliary vector entries that
GDB does not yet support, leading to error messages in "info auxv".
The AT_BASE_PLATFORM and AT_EXECFN values are not even present in
include/elf/common.h at this point.

This patch adds those defines (mirroring comments from Linux
kernel / glibc headers), and code to handle those entries in GDB.

Are the include/elf/ changes OK?

GDB tested on powerpc64-linux (on a 2.6.27 kernel).

Bye,
Ulrich


gdb/ChangeLog:

	* auxv.c (fprint_target_auxv): Handle AT_BASE_PLATFORM and
	AT_EXECFN.  Re-sort AT_SECURE.

include/elf/ChangeLog:

	* common.h (AT_BASE_PLATFORM, AT_EXECFN): Define.


Index: gdb/auxv.c
===================================================================
RCS file: /cvs/src/src/gdb/auxv.c,v
retrieving revision 1.15
diff -c -p -r1.15 auxv.c
*** gdb/auxv.c	28 Oct 2008 17:19:56 -0000	1.15
--- gdb/auxv.c	12 Nov 2008 17:19:37 -0000
*************** fprint_target_auxv (struct ui_file *file
*** 203,211 ****
  	  TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
  	  TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
  	  TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
  	  TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
  	  TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
- 	  TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
  	  TAG (AT_SUN_UID, _("Effective user ID"), dec);
  	  TAG (AT_SUN_RUID, _("Real user ID"), dec);
  	  TAG (AT_SUN_GID, _("Effective group ID"), dec);
--- 203,213 ----
  	  TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
  	  TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
  	  TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
+ 	  TAG (AT_BASE_PLATFORM, _("String identifying base platform"), str);
+ 	  TAG (AT_EXECFN, _("File name of executable"), str);
+ 	  TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
  	  TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
  	  TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
  	  TAG (AT_SUN_UID, _("Effective user ID"), dec);
  	  TAG (AT_SUN_RUID, _("Real user ID"), dec);
  	  TAG (AT_SUN_GID, _("Effective group ID"), dec);
Index: include/elf/common.h
===================================================================
RCS file: /cvs/src/src/include/elf/common.h,v
retrieving revision 1.99
diff -c -p -r1.99 common.h
*** include/elf/common.h	3 Aug 2008 23:20:42 -0000	1.99
--- include/elf/common.h	12 Nov 2008 17:19:41 -0000
***************
*** 798,803 ****
--- 798,806 ----
  #define AT_UCACHEBSIZE	21		/* Unified cache block size.  */
  #define AT_IGNOREPPC	22		/* Entry should be ignored */
  #define	AT_SECURE	23		/* Boolean, was exec setuid-like?  */
+ #define AT_BASE_PLATFORM 24		/* String identifying real platform,
+ 					   may differ from AT_PLATFORM.  */
+ #define AT_EXECFN	31		/* Filename of executable.  */
  /* Pointer to the global system page used for system calls and other
     nice things.  */
  #define AT_SYSINFO	32
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


             reply	other threads:[~2008-11-12 17:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 20:39 Ulrich Weigand [this message]
2008-11-12 20:41 ` Nick Clifton
2008-11-13 19:57   ` Ulrich Weigand

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=200811121728.mACHSFsf026499@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@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