1 #ifndef ROSE_BinaryAnalysis_RegisterNames_H
2 #define ROSE_BinaryAnalysis_RegisterNames_H
3 #include <featureTests.h>
6 #include <Rose/BasicTypes.h>
7 #include <Rose/BinaryAnalysis/BasicTypes.h>
8 #include <Rose/BinaryAnalysis/RegisterDescriptor.h>
10 namespace Rose {
11 namespace BinaryAnalysis {
18 public:
24  RegisterNames();
25  explicit RegisterNames(const RegisterDictionaryPtr &dict);
33  std::string operator()(RegisterDescriptor) const;
34  std::string operator()(RegisterDescriptor, const RegisterDictionaryPtr &dict) const;
38  std::string prefix = "REG";
39  std::string suffix;
40  int showOffset = -1;
41  std::string offsetPrefix = "@";
42  std::string offsetSuffix;
43  int showSize = -1;
44  std::string sizePrefix = "+";
45  std::string sizeSuffix;
46 };
48 } // namespace
49 } // namespace
50 #endif
51 #endif
int showOffset
0=>never show offset; positive=>always show; negative=>show only when non-zero
Definition: RegisterNames.h:40
std::string operator()(RegisterDescriptor) const
Obtain a name for a register descriptor.
Main namespace for the ROSE library.
RegisterDictionaryPtr dictionary
Dictionary supplied to the constructor.
Definition: RegisterNames.h:37
std::string sizeSuffix
String printed after the size when the size is printed.
Definition: RegisterNames.h:45
int showSize
0=>never; positive=>always; negative=>when offset is non-zero
Definition: RegisterNames.h:43
std::string suffix
String to print at the very end of the generated name.
Definition: RegisterNames.h:39
Describes (part of) a physical CPU register.
std::string offsetPrefix
String printed before the offset when the offset is shown.
Definition: RegisterNames.h:41
Convert a register descriptor to a name.
Definition: RegisterNames.h:17
std::string prefix
The leading part of a register name.
Definition: RegisterNames.h:38
Binary analysis.
std::string sizePrefix
String printed prior to the size when the size is printed.
Definition: RegisterNames.h:44
std::string offsetSuffix
String printed after the offset when the offset is shown.
Definition: RegisterNames.h:42