25 #ifndef _PATCHERNEW_HPP
26 #define _PATCHERNEW_HPP
75 virtual uintptr_t
get_mpc()
const = 0;
79 virtual void emit() = 0;
108 virtual const char*
get_name()
const;
161 virtual const char*
get_name()
const;
180 virtual uintptr_t get_mcode()
const {
191 return "PatcherBase";
205 return "InitializeClassPatcher";
211 #endif // _PATCHERNEW_HPP
virtual bool check_is_patched() const =0
Check if the patcher is already patched.
virtual bool patch_impl()
This function performs the patching.
virtual const char * get_name() const
print patcher information
virtual OStream & print(OStream &OS) const
print patcher information
virtual void emit()=0
Generates the code for the patcher traps.
bool patch()
This a wrapper to set the done flag.
virtual void reposition(intptr_t base)
reposition to another base
virtual void reposition(intptr_t base)
reposition to another base
virtual bool patch_impl()
Call the legacy patching function.
virtual void emit()
Generates the code for the patcher traps.
virtual uintptr_t get_mpc() const
get the absolute position in code segment
virtual uintptr_t get_mpc() const =0
get the absolute position in code segment
virtual bool check_is_patched() const
virtual const char * get_name() const
print patcher information
PatcherBase(uintptr_t mpc)
Simple stream class for formatted output.
virtual void reposition(intptr_t base)=0
reposition to another base
virtual OStream & print(OStream &OS) const
print patcher information
InitializeClassPatcher(classinfo *c)
virtual bool patch_impl()=0
This function performs the patching.
virtual const char * get_name() const
print patcher information
LegacyPatcher(jitdata *jd, const patchref_t &pr)
bool is_patched() const
Check already patched.
virtual void set_mcode(uint32_t mcode)
virtual bool check_is_patched() const
Check if the patcher is already patched.
virtual uintptr_t get_mpc() const
get the absolute position in code segment
Base class for all (non-legacy) patcher.
virtual const char * get_name() const
print patcher information