arc: Rename "arc_gdbarch_features" struct

"arc_gdbarch_features" is a data structure containing information
about the ARC architecture: ISA version, register size, etc.
This name is misleading, because although it carries the phrase
"gdbarch", it has nothing to do with the type/interface in GDB.
Traditionaly, "gdbarch" structures are only used for that purpose.
To rectify this, this patch changes the name to "arc_arch_features".

gdb/ChangeLog:

	* arch/arc.h: Rename "arc_gdbarch_features" to
	"arc_arch_features".
	* arc-tdep.h: Likewise.
	* arc-tdep.c: Likewise.
This commit is contained in:
Shahab Vahedi 2020-10-05 17:10:47 +02:00
parent 4849105512
commit e4bd363f99
4 changed files with 26 additions and 19 deletions

View file

@ -35,7 +35,7 @@
#endif
STATIC_IN_GDB target_desc *
arc_create_target_description (const struct arc_gdbarch_features &features)
arc_create_target_description (const struct arc_arch_features &features)
{
/* Create a new target description. */
target_desc *tdesc = allocate_target_description ();
@ -84,10 +84,10 @@ arc_create_target_description (const struct arc_gdbarch_features &features)
#ifndef GDBSERVER
/* Wrapper used by std::unordered_map to generate hash for features set. */
struct arc_gdbarch_features_hasher
struct arc_arch_features_hasher
{
std::size_t
operator() (const arc_gdbarch_features &features) const noexcept
operator() (const arc_arch_features &features) const noexcept
{
return features.hash ();
}
@ -95,14 +95,14 @@ struct arc_gdbarch_features_hasher
/* Cache of previously created target descriptions, indexed by the hash
of the features set used to create them. */
static std::unordered_map<arc_gdbarch_features,
static std::unordered_map<arc_arch_features,
const target_desc_up,
arc_gdbarch_features_hasher> arc_tdesc_cache;
arc_arch_features_hasher> arc_tdesc_cache;
/* See arch/arc.h. */
const target_desc *
arc_lookup_target_description (const struct arc_gdbarch_features &features)
arc_lookup_target_description (const struct arc_arch_features &features)
{
/* Lookup in the cache first. If found, return the pointer from the
"target_desc_up" type which is a "unique_ptr". This should be fine