mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 00:32:30 +08:00
Stop the ARC disassembler from seg-faulting if initialised without a BFD present.
* arc-dis.c (arc_get_disassembler): Accept a null bfd gracefully.
This commit is contained in:

committed by
Nick Clifton

parent
29063f8bfb
commit
dce084426d
@ -1,3 +1,7 @@
|
|||||||
|
2016-09-14 Anton Kolesov <Anton.Kolesov@synopsys.com>
|
||||||
|
|
||||||
|
* arc-dis.c (arc_get_disassembler): Accept a null bfd gracefully.
|
||||||
|
|
||||||
2016-09-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
2016-09-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* s390-mkopc.c (main): Support alternate arch strings.
|
* s390-mkopc.c (main): Support alternate arch strings.
|
||||||
|
@ -1238,11 +1238,16 @@ print_insn_arc (bfd_vma memaddr,
|
|||||||
disassembler_ftype
|
disassembler_ftype
|
||||||
arc_get_disassembler (bfd *abfd)
|
arc_get_disassembler (bfd *abfd)
|
||||||
{
|
{
|
||||||
/* Read the extenssion insns and registers, if any. */
|
/* BFD my be absent, if opcodes is invoked from the debugger that
|
||||||
|
has connected to remote target and doesn't have an ELF file. */
|
||||||
|
if (abfd != NULL)
|
||||||
|
{
|
||||||
|
/* Read the extension insns and registers, if any. */
|
||||||
build_ARC_extmap (abfd);
|
build_ARC_extmap (abfd);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
dump_ARC_extmap ();
|
dump_ARC_extmap ();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
return print_insn_arc;
|
return print_insn_arc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user