diff options
author | Shahab Vahedi <shahab@synopsys.com> | 2020-10-05 17:10:47 +0200 |
---|---|---|
committer | Shahab Vahedi <shahab@synopsys.com> | 2020-10-07 17:46:23 +0200 |
commit | e4bd363f994cf12017cb17dddeb2bc35698ee349 (patch) | |
tree | 31f7e68d86ce6f061c86920360298ff9363d8032 /gdb/arch | |
parent | 4849105512548d9f362b7111e50ff22c3184326a (diff) | |
download | gdb-e4bd363f994cf12017cb17dddeb2bc35698ee349.zip gdb-e4bd363f994cf12017cb17dddeb2bc35698ee349.tar.gz gdb-e4bd363f994cf12017cb17dddeb2bc35698ee349.tar.bz2 |
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.
Diffstat (limited to 'gdb/arch')
-rw-r--r-- | gdb/arch/arc.c | 12 | ||||
-rw-r--r-- | gdb/arch/arc.h | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gdb/arch/arc.c b/gdb/arch/arc.c index 8e126ca..3808f9f 100644 --- a/gdb/arch/arc.c +++ b/gdb/arch/arc.c @@ -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 diff --git a/gdb/arch/arc.h b/gdb/arch/arc.h index a5313b1..1625759 100644 --- a/gdb/arch/arc.h +++ b/gdb/arch/arc.h @@ -27,9 +27,9 @@ enum arc_isa 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) {} @@ -41,13 +41,13 @@ struct arc_gdbarch_features 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); } @@ -71,7 +71,7 @@ struct arc_gdbarch_features the returned data. */ target_desc *arc_create_target_description - (const struct arc_gdbarch_features &features); + (const struct arc_arch_features &features); #else @@ -79,7 +79,7 @@ target_desc *arc_create_target_description 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 */ |