mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 09:09:16 +08:00
Refactor disassembler selection
Nowadays, opcodes/disassemble.c:disassembler selects the proper disassembler according to ABFD only. However, it actually selects disassemblers according to arch, mach, endianess, and abfd. This patch adds them to the parameters of disassembler, so that its caller can still select disassemblers in case that abfd is NULL (a typical case in GDB). There isn't any functionality change. binutils: 2017-05-24 Yao Qi <yao.qi@linaro.org> * objdump.c (disassemble_data): Caller update. include: 2017-05-24 Yao Qi <yao.qi@linaro.org> * dis-asm.h (disassembler): Update declaration. opcodes: 2017-05-24 Yao Qi <yao.qi@linaro.org> * disassemble.c (disassembler): Add arguments a, big and mach. Use them. sim/common: 2017-05-24 Yao Qi <yao.qi@linaro.org> * sim-trace.c (trace_disasm): Caller update.
This commit is contained in:
@ -354,8 +354,12 @@ extern const disasm_options_t *disassembler_options_powerpc (void);
|
||||
extern const disasm_options_t *disassembler_options_arm (void);
|
||||
extern const disasm_options_t *disassembler_options_s390 (void);
|
||||
|
||||
/* Fetch the disassembler for a given BFD, if that support is available. */
|
||||
extern disassembler_ftype disassembler (bfd *);
|
||||
/* Fetch the disassembler for a given architecture ARC, endianess (big
|
||||
endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
|
||||
is available. ABFD may be NULL. */
|
||||
extern disassembler_ftype disassembler (enum bfd_architecture arc,
|
||||
bfd_boolean big, unsigned long mach,
|
||||
bfd *abfd);
|
||||
|
||||
/* Amend the disassemble_info structure as necessary for the target architecture.
|
||||
Should only be called after initialising the info->arch field. */
|
||||
|
Reference in New Issue
Block a user