}
}
-/* Common construction code for ARC_GDBARCH_FEATURES struct. If there
+/* Common construction code for ARC_ARCH_FEATURES struct. If there
is no ABFD, then a FEATURE with default values is returned. */
-static arc_gdbarch_features
-arc_gdbarch_features_create (const bfd *abfd, const unsigned long mach)
+static arc_arch_features
+arc_arch_features_create (const bfd *abfd, const unsigned long mach)
{
/* Use 4 as a fallback value. */
int reg_size = 4;
case). */
arc_isa isa = mach_type_to_arc_isa (mach);
- return arc_gdbarch_features (reg_size, isa);
+ return arc_arch_features (reg_size, isa);
}
/* Look for obsolete core feature names in TDESC. */
/* If target doesn't provide a description, use the default ones. */
if (!tdesc_has_registers (tdesc_loc))
{
- arc_gdbarch_features features
- = arc_gdbarch_features_create (info.abfd,
- info.bfd_arch_info->mach);
+ arc_arch_features features
+ = arc_arch_features_create (info.abfd,
+ info.bfd_arch_info->mach);
tdesc_loc = arc_lookup_target_description (features);
}
gdb_assert (tdesc_loc != nullptr);
#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 ();
#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 ();
}
/* 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
ARC_ISA_ARCV2 /* such as ARC EM and ARC HS */
};
-struct arc_gdbarch_features
+struct arc_arch_features
{
- arc_gdbarch_features (int reg_size, arc_isa isa)
+ arc_arch_features (int reg_size, arc_isa isa)
: reg_size (reg_size), isa (isa)
{}
const arc_isa isa;
/* Equality operator. */
- bool operator== (const struct arc_gdbarch_features &rhs) const
+ bool operator== (const struct arc_arch_features &rhs) const
{
return (reg_size == rhs.reg_size && isa == rhs.isa);
}
/* Inequality operator. */
- bool operator!= (const struct arc_gdbarch_features &rhs) const
+ bool operator!= (const struct arc_arch_features &rhs) const
{
return !(*this == rhs);
}
the returned data. */
target_desc *arc_create_target_description
- (const struct arc_gdbarch_features &features);
+ (const struct arc_arch_features &features);
#else
If nothing is found, then create one and return it. */
const target_desc *arc_lookup_target_description
- (const struct arc_gdbarch_features &features);
+ (const struct arc_arch_features &features);
#endif /* GDBSERVER */