aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-03-15 16:59:54 +0000
committerDaniel Jacobowitz <drow@false.org>2006-03-15 16:59:54 +0000
commit26c53e508c3991ad163ac1eb181ff8cbe86fd921 (patch)
tree6179d1a17a2765f6ec98514ea91bae7038c86386 /gdb/mips-tdep.c
parent5b652102972168ebffbd7f48c8a9aacaeb94f8d5 (diff)
downloadgdb-26c53e508c3991ad163ac1eb181ff8cbe86fd921.zip
gdb-26c53e508c3991ad163ac1eb181ff8cbe86fd921.tar.gz
gdb-26c53e508c3991ad163ac1eb181ff8cbe86fd921.tar.bz2
* mips-tdep.c (mips_gdbarch_init): Default 64-bit ELF files to N64.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8ea209f..880dfcc 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -4764,6 +4764,13 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
}
+ /* Default 64-bit objects to N64 instead of O32. */
+ if (found_abi == MIPS_ABI_UNKNOWN
+ && info.abfd != NULL
+ && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
+ && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
+ found_abi = MIPS_ABI_N64;
+
if (gdbarch_debug)
fprintf_unfiltered (gdb_stdlog, "mips_gdbarch_init: found_abi = %d\n",
found_abi);