This is the mail archive of the binutils@sources.redhat.com 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/RFA] Set architecture for a few more NetBSD core files


Again, mainly for the benefit of OpenBSD core file support in GDB.
The new constants in libaout.h are M_XXX_OPENBSD instead of
M_XXX_NETBSD since both m88k and hppa were born in OpenBSD and ported
later to NetBSD.  For NetBSD m88k isn't even listed as supported yet.

OK?

Mark


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

	* libaout.h (machine_type): Add M_M88K_OPENBSD and M_HPPA_OPENBSD.
	* netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
	arm, m68k, m88k and hppa core files.

Index: libaout.h
===================================================================
RCS file: /cvs/src/src/bfd/libaout.h,v
retrieving revision 1.15
diff -u -p -r1.15 libaout.h
--- libaout.h 21 Apr 2004 16:58:57 -0000 1.15
+++ libaout.h 21 May 2004 08:01:01 -0000
@@ -277,6 +277,8 @@ enum machine_type
   M_VAX4K_NETBSD = 150,	  /* NetBSD/vax 4K pages binary.  */
   M_MIPS1 = 151,          /* MIPS R2000/R3000 binary.  */
   M_MIPS2 = 152,          /* MIPS R4000/R6000 binary.  */
+  M_M88K_OPENBSD = 153,	  /* OpenBSD/m88k binary.  */
+  M_HPPA_OPENBSD = 154,	  /* OpenBSD/hppa binary.  */
   M_SPARC64_NETBSD = 156, /* NetBSD/sparc64 binary.  */
   M_X86_64_NETBSD = 157,  /* NetBSD/amd64 binary.  */
   M_SPARCLET_2 = 163,	  /* 0xa3, reserved.  */
Index: netbsd-core.c
===================================================================
RCS file: /cvs/src/src/bfd/netbsd-core.c,v
retrieving revision 1.15
diff -u -p -r1.15 netbsd-core.c
--- netbsd-core.c 18 Apr 2004 20:55:55 -0000 1.15
+++ netbsd-core.c 21 May 2004 08:01:01 -0000
@@ -169,12 +169,33 @@ netbsd_core_file_p (abfd)
  /* Set architecture from machine ID.  */
  switch (CORE_GETMID (core))
    {
+   case M_ALPHA_NETBSD:
+     bfd_default_set_arch_mach (abfd, bfd_arch_alpha, 0);
+     break;
+
+   case M_ARM6_NETBSD:
+     bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_3);
+     break;
+
    case M_X86_64_NETBSD:
      bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
      break;
 
    case M_386_NETBSD:
      bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386);
+     break;
+
+   case M_68K_NETBSD:
+   case M_68K4K_NETBSD:
+     bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
+     break;
+
+   case M_88K_OPENBSD:
+     bfd_default_set_arch_mach (abfd, bfd_arch_m88k, 0);
+     break;
+
+   case M_HPPA_OPENBSD:
+     bfd_default_set_arch_mach (abfd, bfd_arch_hppa, bfd_mach_hppa11);
      break;
 
    case M_POWERPC_NETBSD:


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