From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125251 invoked by alias); 16 Jun 2016 06:02:32 -0000 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 Received: (qmail 124846 invoked by uid 89); 16 Jun 2016 06:02:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=conflicts, sk:freebsd X-Spam-User: qpsmtpd, 2 recipients X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 16 Jun 2016 06:02:19 +0000 Received: from ralph.baldwin.cx.net (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DD10CB94C; Thu, 16 Jun 2016 02:02:15 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 0/6] Add ELF auxiliary vector handling for FreeBSD Date: Thu, 16 Jun 2016 06:02:00 -0000 Message-Id: <20160616060202.63470-1-jhb@FreeBSD.org> X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00271.txt.bz2 This patch series fixes 'info auxv' to work on live binaries and cores for FreeBSD. I believe most of these patches are straightforward. I broke out parsing of FreeBSD-specific ELF core notes to avoid a collision with duplicate NT_* values (NT_FREEBSD_PROCSTAT_AUXV conflicts with NT_LWPSTATUS). The biggest change is adding a new gdbarch method to handle formatting individual auxv vectors. FreeBSD uses AT_* constants that overlap with existing AT_* constants but with different meanings. One result of making the interpretation of AT_* constants a gdbarch method is that 'info auxv' shows the correct output (Linux values) when gdb inspects a Linux binary executing on FreeBSD via FreeBSD's Linux ABI support. John Baldwin (6): Add constants for FreeBSD-specific auxiliary vector entry types. Add elfcore_grok_freebsd_note to parse FreeBSD ELF core notes. Fetch the ELF auxiliary vector from live processes on FreeBSD. Create a psuedo section for the ELF AUXV core dump note on FreeBSD. Add a new gdbarch method to print a single AUXV entry. Add a gdbarch 'print_auxv' method for FreeBSD ABIs. bfd/ChangeLog | 15 ++++ bfd/elf.c | 152 +++++++++++++++++++++++++++++++++++++--- gdb/ChangeLog | 23 +++++++ gdb/auxv.c | 191 ++++++++++++++++++++++++++++----------------------- gdb/auxv.h | 8 +++ gdb/fbsd-nat.c | 74 ++++++++++++++++++++ gdb/fbsd-tdep.c | 33 +++++++++ gdb/gdbarch.c | 32 +++++++++ gdb/gdbarch.h | 11 +++ gdb/gdbarch.sh | 6 ++ include/ChangeLog | 7 ++ include/elf/common.h | 10 +++ 12 files changed, 467 insertions(+), 95 deletions(-) -- 2.8.4