Module Name: src Committed By: rin Date: Thu Aug 17 14:52:53 UTC 2023
Modified Files: src/external/gpl3/gdb/dist/gdb: m68k-tdep.c Log Message: gdb/m68k: Do not fall back to EABI for NetBSD gdb 13 falls back to newly-introduced m68k EABI, if ELFOSABI_NONE == ELFOSABI_SYSV == 0 is indicated in ELF header. This breaks everything for NetBSD binaries. To generate a diff of this commit: cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gdb/dist/gdb/m68k-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/m68k-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/m68k-tdep.c:1.1.1.9 src/external/gpl3/gdb/dist/gdb/m68k-tdep.c:1.2 --- src/external/gpl3/gdb/dist/gdb/m68k-tdep.c:1.1.1.9 Sun Jul 30 22:44:51 2023 +++ src/external/gpl3/gdb/dist/gdb/m68k-tdep.c Thu Aug 17 14:52:53 2023 @@ -1344,10 +1344,14 @@ m68k_dump_tdep (struct gdbarch *gdbarch, static enum gdb_osabi m68k_osabi_sniffer (bfd *abfd) { + /* XXX NetBSD uses ELFOSABI_NONE == ELFOSABI_SYSV. Therefore, do not + fall back to EABI here. */ +#ifndef __NetBSD__ unsigned int elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI]; if (elfosabi == ELFOSABI_NONE) return GDB_OSABI_SVR4; +#endif return GDB_OSABI_UNKNOWN; }