[PATCH] Recognize NetBSD ELF core files

Mark Kettenis kettenis@chello.nl
Thu Nov 27 12:49:00 GMT 2003


I checked in the attached.  This makes core file support on
NetBSD/amd64 fully functional, and allows me to convert NetBSD/i386 to
the new mechanism.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use
	.note.netbsdcore.procinfo section to recognize NetBSD core files.

Index: osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.22
diff -u -p -r1.22 osabi.c
--- osabi.c 20 Nov 2003 18:37:20 -0000 1.22
+++ osabi.c 27 Nov 2003 12:41:16 -0000
@@ -462,6 +462,13 @@ generic_elf_osabi_sniff_abi_tag_sections
 	}
       return;
     }
+
+  /* .note.netbsdcore.procinfo notes, used by NetBSD.  */
+  if (strcmp (name, ".note.netbsdcore.procinfo") == 0 && sectsize > 0)
+    {
+      *os_ident_ptr = GDB_OSABI_NETBSD_ELF;
+      return;
+    }
 }
 
 static enum gdb_osabi



More information about the Gdb-patches mailing list