diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b84326c..3f020ff 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-03-07 Pedro Alves <palves@redhat.com> + + * mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL + before calling bfd_get_flavour. + 2016-03-05 Pitchumani Sivanupandi <pitchumani.s@atmel.com> * avr-tdep.c (AVR_LAST_ARG_REGNUM): Define. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 63c1560f..178a163 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -8433,7 +8433,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* On Irix, ELF64 executables use the N64 ABI. The pseudo-sections which describe the ABI aren't present on IRIX. (Even for executables created by gcc.) */ - if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour + if (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; else |