ROSE 0.11.145.147
Public Attributes | List of all members
Rose::BinaryAnalysis::RegisterNames Class Reference

Description

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>

Collaboration diagram for Rose::BinaryAnalysis::RegisterNames:
Collaboration graph
[legend]

Public Member Functions

 RegisterNames (const RegisterDictionaryPtr &)
 Constructor.
 
RegisterNamesoperator= (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.
 

Constructor & Destructor Documentation

◆ RegisterNames() [1/2]

Rose::BinaryAnalysis::RegisterNames::RegisterNames ( )

Constructor.

A RegisterDictionary can be supplied to the constructor, or to each operator() call.

◆ RegisterNames() [2/2]

Rose::BinaryAnalysis::RegisterNames::RegisterNames ( const RegisterDictionaryPtr )
explicit

Constructor.

A RegisterDictionary can be supplied to the constructor, or to each operator() call.

Member Function Documentation

◆ operator=()

RegisterNames & Rose::BinaryAnalysis::RegisterNames::operator= ( const RegisterDictionaryPtr )

Constructor.

A RegisterDictionary can be supplied to the constructor, or to each operator() call.

◆ operator()() [1/2]

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.

◆ operator()() [2/2]

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.

Member Data Documentation

◆ dictionary

RegisterDictionaryPtr Rose::BinaryAnalysis::RegisterNames::dictionary

Dictionary supplied to the constructor.

Definition at line 44 of file RegisterNames.h.

◆ prefix

std::string Rose::BinaryAnalysis::RegisterNames::prefix = "REG"

The leading part of a register name.

Definition at line 47 of file RegisterNames.h.

◆ suffix

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.

◆ showOffset

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.

◆ offsetPrefix

std::string Rose::BinaryAnalysis::RegisterNames::offsetPrefix = "@"

String printed before the offset when the offset is shown.

Definition at line 50 of file RegisterNames.h.

◆ offsetSuffix

std::string Rose::BinaryAnalysis::RegisterNames::offsetSuffix

String printed after the offset when the offset is shown.

Definition at line 51 of file RegisterNames.h.

◆ showSize

int Rose::BinaryAnalysis::RegisterNames::showSize = -1

0=>never; positive=>always; negative=>when offset is non-zero

Definition at line 52 of file RegisterNames.h.

◆ sizePrefix

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.

◆ sizeSuffix

std::string Rose::BinaryAnalysis::RegisterNames::sizeSuffix

String printed after the size when the size is printed.

Definition at line 54 of file RegisterNames.h.


The documentation for this class was generated from the following file: