ROSE 0.11.145.247
Public Types | Public Member Functions | List of all members
Rose::BinaryAnalysis::HotPatch::Record Class Reference

Description

Describes a single hot patch.

Definition at line 30 of file HotPatch.h.

#include <Rose/BinaryAnalysis/HotPatch.h>

Public Types

enum  Type {
  PATCH_REGISTER ,
  PATCH_NONE
}
 Type of patch record. More...
 
enum  Behavior {
  MATCH_CONTINUE ,
  MATCH_BREAK
}
 Behavior when a record matches. More...
 

Public Member Functions

 Record ()
 Construct a no-op record.
 
 Record (RegisterDescriptor reg, const InstructionSemantics::BaseSemantics::SValuePtr &oldValue, const InstructionSemantics::BaseSemantics::SValuePtr &newValue, Behavior behavior=MATCH_CONTINUE)
 Construct a record that substitutes a register.
 
Type type () const
 Property: Type of record.
 
RegisterDescriptor reg () const
 Property: Register to be matched.
 
void reg (RegisterDescriptor r)
 Property: Register to be matched.
 
InstructionSemantics::BaseSemantics::SValuePtr oldValue () const
 Property: Value to match.
 
void oldValue (const InstructionSemantics::BaseSemantics::SValuePtr &v)
 Property: Value to match.
 
InstructionSemantics::BaseSemantics::SValuePtr newValue () const
 Property: Replacement value.
 
void newValue (const InstructionSemantics::BaseSemantics::SValuePtr &v)
 Property: Replacement value.
 
Behavior behavior () const
 Property: Behavior after matching.
 
void behavior (Behavior b)
 Property: Behavior after matching.
 

Member Enumeration Documentation

◆ Type

Type of patch record.

Enumerator
PATCH_REGISTER 

Change the value of a register.

PATCH_NONE 

Type for default-constructed records.

Definition at line 33 of file HotPatch.h.

◆ Behavior

Behavior when a record matches.

Enumerator
MATCH_CONTINUE 

Try to match additional subsequent records.

MATCH_BREAK 

Don't try to match more records after a match is found.

Definition at line 39 of file HotPatch.h.

Constructor & Destructor Documentation

◆ Record() [1/2]

Rose::BinaryAnalysis::HotPatch::Record::Record ( )
inline

Construct a no-op record.

Definition at line 67 of file HotPatch.h.

◆ Record() [2/2]

Rose::BinaryAnalysis::HotPatch::Record::Record ( RegisterDescriptor  reg,
const InstructionSemantics::BaseSemantics::SValuePtr oldValue,
const InstructionSemantics::BaseSemantics::SValuePtr newValue,
Behavior  behavior = MATCH_CONTINUE 
)
inline

Construct a record that substitutes a register.

If reg is an empty (default constructed) register descriptor or if the oldValue is null then the returned record will never match any state. The newValue must be non-null.

Definition at line 74 of file HotPatch.h.

References newValue().

Member Function Documentation

◆ type()

Type Rose::BinaryAnalysis::HotPatch::Record::type ( ) const
inline

Property: Type of record.

The record type is read-only, set when the record was constructed.

Definition at line 83 of file HotPatch.h.

◆ reg() [1/2]

RegisterDescriptor Rose::BinaryAnalysis::HotPatch::Record::reg ( ) const
inline

Property: Register to be matched.

For PATCH_REGISTER records, this is the register that is to be examined and possibly changed. An empty (default constructed) register descriptor doesn't ever match anything.

Definition at line 93 of file HotPatch.h.

◆ reg() [2/2]

void Rose::BinaryAnalysis::HotPatch::Record::reg ( RegisterDescriptor  r)
inline

Property: Register to be matched.

For PATCH_REGISTER records, this is the register that is to be examined and possibly changed. An empty (default constructed) register descriptor doesn't ever match anything.

Definition at line 96 of file HotPatch.h.

◆ oldValue() [1/2]

InstructionSemantics::BaseSemantics::SValuePtr Rose::BinaryAnalysis::HotPatch::Record::oldValue ( ) const
inline

Property: Value to match.

This is the value that must be matched in order for this patch record to be applied. A null value never matches anything.

Definition at line 107 of file HotPatch.h.

◆ oldValue() [2/2]

void Rose::BinaryAnalysis::HotPatch::Record::oldValue ( const InstructionSemantics::BaseSemantics::SValuePtr v)
inline

Property: Value to match.

This is the value that must be matched in order for this patch record to be applied. A null value never matches anything.

Definition at line 110 of file HotPatch.h.

◆ newValue() [1/2]

InstructionSemantics::BaseSemantics::SValuePtr Rose::BinaryAnalysis::HotPatch::Record::newValue ( ) const
inline

Property: Replacement value.

This is the value that will be substituted into the state if the hot patch record matches. The value must not be null.

Definition at line 121 of file HotPatch.h.

Referenced by Record().

◆ newValue() [2/2]

void Rose::BinaryAnalysis::HotPatch::Record::newValue ( const InstructionSemantics::BaseSemantics::SValuePtr v)
inline

Property: Replacement value.

This is the value that will be substituted into the state if the hot patch record matches. The value must not be null.

Definition at line 124 of file HotPatch.h.

◆ behavior() [1/2]

Behavior Rose::BinaryAnalysis::HotPatch::Record::behavior ( ) const
inline

Property: Behavior after matching.

When a record matches, the behavior property determines if the hot patch mechanism continues to search for additional matching records, or stops trying to match.

Definition at line 135 of file HotPatch.h.

◆ behavior() [2/2]

void Rose::BinaryAnalysis::HotPatch::Record::behavior ( Behavior  b)
inline

Property: Behavior after matching.

When a record matches, the behavior property determines if the hot patch mechanism continues to search for additional matching records, or stops trying to match.

Definition at line 138 of file HotPatch.h.


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