CACAO
Public Member Functions | Private Member Functions | Private Attributes
cacao::LegacyPatcher Class Reference
Inheritance diagram for cacao::LegacyPatcher:
cacao::Patcher

Public Member Functions

 LegacyPatcher (jitdata *jd, const patchref_t &pr)
 
patchref_tget ()
 return the raw resource More...
 
virtual uintptr_t get_mpc () const
 get the absolute position in code segment More...
 
virtual void emit ()
 Generates the code for the patcher traps. More...
 
virtual void reposition (intptr_t base)
 reposition to another base More...
 
virtual bool check_is_patched () const
 Check if the patcher is already patched. More...
 
virtual const char * get_name () const
 print patcher information More...
 
virtual OStreamprint (OStream &OS) const
 print patcher information More...
 
- Public Member Functions inherited from cacao::Patcher
 Patcher ()
 
virtual ~Patcher ()
 
bool patch ()
 This a wrapper to set the done flag. More...
 
bool is_patched () const
 Check already patched. More...
 

Private Member Functions

virtual bool patch_impl ()
 Call the legacy patching function. More...
 

Private Attributes

jitdatajd
 
patchref_t pr
 

Detailed Description

Definition at line 115 of file PatcherNew.hpp.

Constructor & Destructor Documentation

cacao::LegacyPatcher::LegacyPatcher ( jitdata jd,
const patchref_t pr 
)
inline

Definition at line 134 of file PatcherNew.hpp.

Member Function Documentation

bool cacao::LegacyPatcher::check_is_patched ( ) const
virtual

Check if the patcher is already patched.

This is done by comparing the machine instruction.

Returns
true if patched, false otherwise.

Implements cacao::Patcher.

Definition at line 88 of file PatcherNew.cpp.

void cacao::LegacyPatcher::emit ( )
virtual

Generates the code for the patcher traps.

Implements cacao::Patcher.

Definition at line 64 of file PatcherNew.cpp.

patchref_t* cacao::LegacyPatcher::get ( )
inline

return the raw resource

Definition at line 140 of file PatcherNew.hpp.

virtual uintptr_t cacao::LegacyPatcher::get_mpc ( ) const
inlinevirtual

get the absolute position in code segment

Deprecated:

Implements cacao::Patcher.

Definition at line 144 of file PatcherNew.hpp.

const char * LegacyPatcher::get_name ( ) const
virtual

print patcher information

Reimplemented from cacao::Patcher.

Definition at line 143 of file PatcherNew.cpp.

virtual bool cacao::LegacyPatcher::patch_impl ( )
inlineprivatevirtual

Call the legacy patching function.

Implements cacao::Patcher.

Definition at line 123 of file PatcherNew.hpp.

OStream & LegacyPatcher::print ( OStream OS) const
virtual

print patcher information

Reimplemented from cacao::Patcher.

Definition at line 156 of file PatcherNew.cpp.

virtual void cacao::LegacyPatcher::reposition ( intptr_t  base)
inlinevirtual

reposition to another base

Implements cacao::Patcher.

Definition at line 148 of file PatcherNew.hpp.

Field Documentation

jitdata* cacao::LegacyPatcher::jd
private

Definition at line 117 of file PatcherNew.hpp.

patchref_t cacao::LegacyPatcher::pr
private

Definition at line 118 of file PatcherNew.hpp.


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