From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29539 invoked by alias); 12 Nov 2008 17:29:05 -0000 Received: (qmail 29505 invoked by uid 22791); 12 Nov 2008 17:29:04 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Nov 2008 17:28:18 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id mACHSFZW286302; Wed, 12 Nov 2008 17:28:15 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mACHSF253793082; Wed, 12 Nov 2008 18:28:15 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mACHSFVg026502; Wed, 12 Nov 2008 18:28:15 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id mACHSFsf026499; Wed, 12 Nov 2008 18:28:15 +0100 Message-Id: <200811121728.mACHSFsf026499@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 12 Nov 2008 18:28:15 +0100 Subject: [rfa] Support new AT_BASE_PLATFORM and AT_EXECFN auxv entries To: gdb-patches@sourceware.org, binutils@sourceware.org Date: Wed, 12 Nov 2008 20:39:00 -0000 From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00242.txt.bz2 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