arc: Select CPU model properly before disassembling
authorAnton Kolesov <Anton.Kolesov@synopsys.com>
Fri, 10 Feb 2017 11:11:55 +0000 (14:11 +0300)
committerAnton Kolesov <Anton.Kolesov@synopsys.com>
Fri, 16 Jun 2017 11:54:17 +0000 (14:54 +0300)
commita87dc45adc983a8e6ec3db8d18cd31c35abd2048
tree6a3b4ae46606094579849aff0df4920b4298b799
parentc092b67bf0adb0fc1e179612b161e19938929e66
arc: Select CPU model properly before disassembling

Enforce CPU model for disassembler via its options, if it was specified in XML
target description, otherwise use default method of determining CPU implemented
in disassembler - scanning ELF private header.  The latter requires
disassemble_info->section to be properly initialized.  To make sure that
info->section is set in all cases this patch partially reverts [1] for ARC: it
reinstates arc_delayed_print_insn as a "print_insn" function for ARC, but
now this function only sets disassemble_info->section and then calls
default_print_insn to do the rest of the job.

Support for CPU in disassembler options for ARC has been added in [2].

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=39503f82427e22ed8e04d986ccdc8562091ec62e
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=10045478d984f9924cb945423388ba25b7dd3ffe

gdb/ChangeLog:

yyyy-mm-dd  Anton Kolesov  <anton.kolesov@synopsys.com>

* arc-tdep.c (arc_disassembler_options): New variable.
(arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
of default_print_insn.
(arc_delayed_print_insn): Set info->section when needed,
use default_print_insn to retrieve a disassembler.
gdb/ChangeLog
gdb/arc-tdep.c
This page took 0.040553 seconds and 4 git commands to generate.