ROSE  0.11.145.0
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 ()
 Constructor. More...
 
 RegisterNames (const RegisterDictionaryPtr &dict)
 Constructor. More...
 
std::string operator() (RegisterDescriptor) const
 Obtain a name for a register descriptor. More...
 
std::string operator() (RegisterDescriptor, const RegisterDictionaryPtr &dict) const
 Obtain a name for a register descriptor. More...
 

Public Attributes

RegisterDictionaryPtr dictionary
 Dictionary supplied to the constructor. More...
 
std::string prefix = "REG"
 The leading part of a register name. More...
 
std::string suffix
 String to print at the very end of the generated name. More...
 
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. More...
 
std::string offsetSuffix
 String printed after the offset when the offset is shown. More...
 
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. More...
 
std::string sizeSuffix
 String printed after the size when the size is printed. More...
 

Constructor & Destructor Documentation

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

Constructor.

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

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

Constructor.

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

Member Function Documentation

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.

Member Data Documentation

RegisterDictionaryPtr Rose::BinaryAnalysis::RegisterNames::dictionary

Dictionary supplied to the constructor.

Definition at line 43 of file RegisterNames.h.

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

The leading part of a register name.

Definition at line 46 of file RegisterNames.h.

std::string Rose::BinaryAnalysis::RegisterNames::suffix

String to print at the very end of the generated name.

Definition at line 47 of file RegisterNames.h.

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

String printed before the offset when the offset is shown.

Definition at line 49 of file RegisterNames.h.

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

String printed after the offset when the offset is shown.

Definition at line 50 of file RegisterNames.h.

std::string Rose::BinaryAnalysis::RegisterNames::sizePrefix = "+"

String printed prior to the size when the size is printed.

Definition at line 52 of file RegisterNames.h.

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

String printed after the size when the size is printed.

Definition at line 53 of file RegisterNames.h.


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