Module Name:    src
Committed By:   rin
Date:           Thu Aug 17 05:53:45 UTC 2023

Modified Files:
        src/external/gpl3/gdb/dist/gdb: ppc-netbsd-tdep.c

Log Message:
gcc/ppc: Register NetBSD OSABI for rs6000, lost during merge

Otherwise, OSABI is undetermined until executable is loaded.

Add comments also.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c

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/gdb/ppc-netbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c:1.2 src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c:1.3
--- src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c:1.2	Mon Aug 14 20:42:27 2023
+++ src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c	Thu Aug 17 05:53:45 2023
@@ -203,6 +203,11 @@ _initialize_ppcnbsd_tdep ()
   gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD,
 			  ppcnbsd_init_abi);
 
+  /* Register NetBSD OSABI also for rs6000, which is default target
+     used before any executable image is loaded.  */
+  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_NETBSD,
+			  ppcnbsd_init_abi);
+
   /* Avoid initializing the register offsets again if they were
      already initialized by ppc-netbsd-nat.c.  */
   if (ppcnbsd_reg_offsets.pc_offset == 0)

Reply via email to