Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist Read and load the aux vector from a c...



details:   https://anonhg.NetBSD.org/src/rev/bc4d7b7333bd
branches:  trunk
changeset: 815527:bc4d7b7333bd
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 24 00:50:53 2016 +0000

description:
Read and load the aux vector from a core file

diffstat:

 external/gpl3/gdb/dist/bfd/elf.c            |  14 ++++++++++++++
 external/gpl3/gdb/dist/include/elf/common.h |   1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diffs (35 lines):

diff -r b8a7502100f2 -r bc4d7b7333bd external/gpl3/gdb/dist/bfd/elf.c
--- a/external/gpl3/gdb/dist/bfd/elf.c  Tue May 24 00:49:55 2016 +0000
+++ b/external/gpl3/gdb/dist/bfd/elf.c  Tue May 24 00:50:53 2016 +0000
@@ -9241,6 +9241,20 @@
       return elfcore_grok_netbsd_procinfo (abfd, note);
     }
 
+  if (note->type == NT_NETBSDCORE_AUXV)
+    {
+      asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",
+                                                          SEC_HAS_CONTENTS);
+
+      if (sect == NULL)
+       return FALSE;
+      sect->size = note->descsz;
+      sect->filepos = note->descpos;
+      sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
+
+      return TRUE;
+    }
+
   /* As of Jan 2002 there are no other machine-independent notes
      defined for NetBSD core files.  If the note type is less
      than the start of the machine-dependent note types, we don't
diff -r b8a7502100f2 -r bc4d7b7333bd external/gpl3/gdb/dist/include/elf/common.h
--- a/external/gpl3/gdb/dist/include/elf/common.h       Tue May 24 00:49:55 2016 +0000
+++ b/external/gpl3/gdb/dist/include/elf/common.h       Tue May 24 00:50:53 2016 +0000
@@ -598,6 +598,7 @@
    must start with "NetBSD-CORE".  */
 
 #define NT_NETBSDCORE_PROCINFO 1       /* Has a struct procinfo */
+#define NT_NETBSDCORE_AUXV     2       /* Has a copy of Elfxx_auxv_t */
 #define NT_NETBSDCORE_FIRSTMACH        32      /* start of machdep note types */
 
 



Home | Main Index | Thread Index | Old Index