Module Name:    src
Committed By:   christos
Date:           Tue May 24 00:50:54 UTC 2016

Modified Files:
        src/external/gpl3/gdb/dist/bfd: elf.c
        src/external/gpl3/gdb/dist/include/elf: common.h

Log Message:
Read and load the aux vector from a core file


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/bfd/elf.c
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/gpl3/gdb/dist/include/elf/common.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/bfd/elf.c
diff -u src/external/gpl3/gdb/dist/bfd/elf.c:1.6 src/external/gpl3/gdb/dist/bfd/elf.c:1.7
--- src/external/gpl3/gdb/dist/bfd/elf.c:1.6	Tue Feb  2 22:23:27 2016
+++ src/external/gpl3/gdb/dist/bfd/elf.c	Mon May 23 20:50:53 2016
@@ -9241,6 +9241,20 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf
       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

Index: src/external/gpl3/gdb/dist/include/elf/common.h
diff -u src/external/gpl3/gdb/dist/include/elf/common.h:1.1.1.5 src/external/gpl3/gdb/dist/include/elf/common.h:1.2
--- src/external/gpl3/gdb/dist/include/elf/common.h:1.1.1.5	Tue Feb  2 21:59:34 2016
+++ src/external/gpl3/gdb/dist/include/elf/common.h	Mon May 23 20:50:54 2016
@@ -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 */
 
 

Reply via email to