ROSE 0.11.145.147
RegisterNames.h
1#ifndef ROSE_BinaryAnalysis_RegisterNames_H
2#define ROSE_BinaryAnalysis_RegisterNames_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6#include <Rose/BasicTypes.h>
7#include <Rose/BinaryAnalysis/BasicTypes.h>
8#include <Rose/BinaryAnalysis/RegisterDescriptor.h>
9
10#include <string>
11
12namespace Rose {
13namespace BinaryAnalysis {
14
20public:
40 std::string operator()(RegisterDescriptor) const;
41 std::string operator()(RegisterDescriptor, const RegisterDictionaryPtr &dict) const;
46 // These are only used by operator()
47 std::string prefix = "REG";
48 std::string suffix;
49 int showOffset = -1;
50 std::string offsetPrefix = "@";
51 std::string offsetSuffix;
52 int showSize = -1;
53 std::string sizePrefix = "+";
54 std::string sizeSuffix;
55};
56
57} // namespace
58} // namespace
59#endif
60#endif
Describes (part of) a physical CPU register.
Convert a register descriptor to a name.
std::string suffix
String to print at the very end of the generated name.
RegisterNames(const RegisterDictionaryPtr &)
Constructor.
RegisterNames & operator=(const RegisterDictionaryPtr &)
Constructor.
std::string sizeSuffix
String printed after the size when the size is printed.
std::string prefix
The leading part of a register name.
std::string sizePrefix
String printed prior to the size when the size is printed.
std::string offsetSuffix
String printed after the offset when the offset is shown.
std::string operator()(RegisterDescriptor) const
Obtain a name for a register descriptor.
std::string offsetPrefix
String printed before the offset when the offset is shown.
int showSize
0=>never; positive=>always; negative=>when offset is non-zero
RegisterDictionaryPtr dictionary
Dictionary supplied to the constructor.
int showOffset
0=>never show offset; positive=>always show; negative=>show only when non-zero
std::string operator()(RegisterDescriptor, const RegisterDictionaryPtr &dict) const
Obtain a name for a register descriptor.
The ROSE library.