arc: Pass proper CPU value to the disassembler
There was a problem with generation of the disassembler options for ARC in GDB,
because a BFD architecture name was used as a CPU name, but they have different
meaning even if some architectures have same name as respective CPUs. Target
description specifies a BFD architecture, which is different from ARC CPU, as
accepted by the disassembler (and most other ARC tools), because CPU values are
much more fine grained - there can be multiple CPU values per single BFD
architecture. As a result this code should translate architecture to some CPU
value. Since there is no info on exact CPU configuration, it is best to use
the most feature-rich CPU, so that the disassembler will recognize all
instructions available to the specified architecture.
gdb/ChangeLog
yyyy-mm-dd Anton Kolesov <Anton.Kolesov@synopsys.com>
* arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
* arc-tdep.h (arc_arch_is_em): New function.
(arc_arch_is_hs): Likewise.
gdb/testsuite/ChangeLog
yyyy-mm-dd Anton Kolesov <Anton.Kolesov@synopsys.com>
* gdb.arch/arc-tdesc-cpu.exp: New file.
* gdb.arch/arc-tdesc-cpu.xml: Likewise.