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

Description

Describes a single hot patch.

Definition at line 28 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. More...
 
 Record (RegisterDescriptor reg, const InstructionSemantics::BaseSemantics::SValuePtr &oldValue, const InstructionSemantics::BaseSemantics::SValuePtr &newValue, Behavior behavior=MATCH_CONTINUE)
 Construct a record that substitutes a register. More...
 
Type type () const
 Property: Type of record. More...
 
RegisterDescriptor reg () const
 Property: Register to be matched. More...
 
void reg (RegisterDescriptor r)
 Property: Register to be matched. More...
 
InstructionSemantics::BaseSemantics::SValuePtr oldValue () const
 Property: Value to match. More...
 
void oldValue (const InstructionSemantics::BaseSemantics::SValuePtr &v)
 Property: Value to match. More...
 
InstructionSemantics::BaseSemantics::SValuePtr newValue () const
 Property: Replacement value. More...
 
void newValue (const InstructionSemantics::BaseSemantics::SValuePtr &v)
 Property: Replacement value. More...
 
Behavior behavior () const
 Property: Behavior after matching. More...
 
void behavior (Behavior b)
 Property: Behavior after matching. More...
 

Member Enumeration Documentation

Type of patch record.

Enumerator
PATCH_REGISTER 

Change the value of a register.

PATCH_NONE 

Type for default-constructed records.

Definition at line 31 of file HotPatch.h.

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 37 of file HotPatch.h.

Constructor & Destructor Documentation

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

Construct a no-op record.

Definition at line 65 of file HotPatch.h.

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 72 of file HotPatch.h.

Member Function Documentation

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 81 of file HotPatch.h.

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 91 of file HotPatch.h.

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 94 of file HotPatch.h.

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 105 of file HotPatch.h.

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 108 of file HotPatch.h.

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 119 of file HotPatch.h.

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 122 of file HotPatch.h.

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 133 of file HotPatch.h.

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 136 of file HotPatch.h.


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