This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/6] Add ELF auxiliary vector handling for FreeBSD


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]