ROSE 0.11.145.147
|
Convert a register descriptor to a name.
Prints a register name even when no dictionary is available or when the dictionary doesn't contain an entry for the specified descriptor.
Definition at line 19 of file RegisterNames.h.
#include <Rose/BinaryAnalysis/RegisterNames.h>
Public Member Functions | |
RegisterNames (const RegisterDictionaryPtr &) | |
Constructor. | |
RegisterNames & | operator= (const RegisterDictionaryPtr &) |
Constructor. | |
std::string | operator() (RegisterDescriptor) const |
Obtain a name for a register descriptor. | |
std::string | operator() (RegisterDescriptor, const RegisterDictionaryPtr &dict) const |
Obtain a name for a register descriptor. | |
Public Attributes | |
RegisterDictionaryPtr | dictionary |
Dictionary supplied to the constructor. | |
std::string | prefix = "REG" |
The leading part of a register name. | |
std::string | suffix |
String to print at the very end of the generated name. | |
int | showOffset = -1 |
0=>never show offset; positive=>always show; negative=>show only when non-zero | |
std::string | offsetPrefix = "@" |
String printed before the offset when the offset is shown. | |
std::string | offsetSuffix |
String printed after the offset when the offset is shown. | |
int | showSize = -1 |
0=>never; positive=>always; negative=>when offset is non-zero | |
std::string | sizePrefix = "+" |
String printed prior to the size when the size is printed. | |
std::string | sizeSuffix |
String printed after the size when the size is printed. | |
Rose::BinaryAnalysis::RegisterNames::RegisterNames | ( | ) |
Constructor.
A RegisterDictionary can be supplied to the constructor, or to each operator() call.
|
explicit |
Constructor.
A RegisterDictionary can be supplied to the constructor, or to each operator() call.
RegisterNames & Rose::BinaryAnalysis::RegisterNames::operator= | ( | const RegisterDictionaryPtr & | ) |
Constructor.
A RegisterDictionary can be supplied to the constructor, or to each operator() call.
std::string Rose::BinaryAnalysis::RegisterNames::operator() | ( | RegisterDescriptor | ) | const |
Obtain a name for a register descriptor.
If a dictionary is supplied, then it will be used instead of the dictionary that was supplied to the constructor.
If the register has a name then that name is returned. Otherwise, information about the register is returned, such as its major and minor numbers, its offset, and/or its size. The format is controlled by the various data members for this class.
std::string Rose::BinaryAnalysis::RegisterNames::operator() | ( | RegisterDescriptor | , |
const RegisterDictionaryPtr & | dict | ||
) | const |
Obtain a name for a register descriptor.
If a dictionary is supplied, then it will be used instead of the dictionary that was supplied to the constructor.
If the register has a name then that name is returned. Otherwise, information about the register is returned, such as its major and minor numbers, its offset, and/or its size. The format is controlled by the various data members for this class.
RegisterDictionaryPtr Rose::BinaryAnalysis::RegisterNames::dictionary |
Dictionary supplied to the constructor.
Definition at line 44 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::prefix = "REG" |
The leading part of a register name.
Definition at line 47 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::suffix |
String to print at the very end of the generated name.
Definition at line 48 of file RegisterNames.h.
int Rose::BinaryAnalysis::RegisterNames::showOffset = -1 |
0=>never show offset; positive=>always show; negative=>show only when non-zero
Definition at line 49 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::offsetPrefix = "@" |
String printed before the offset when the offset is shown.
Definition at line 50 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::offsetSuffix |
String printed after the offset when the offset is shown.
Definition at line 51 of file RegisterNames.h.
int Rose::BinaryAnalysis::RegisterNames::showSize = -1 |
0=>never; positive=>always; negative=>when offset is non-zero
Definition at line 52 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::sizePrefix = "+" |
String printed prior to the size when the size is printed.
Definition at line 53 of file RegisterNames.h.
std::string Rose::BinaryAnalysis::RegisterNames::sizeSuffix |
String printed after the size when the size is printed.
Definition at line 54 of file RegisterNames.h.