CACAO
Macros | Functions | Variables
patcher-common.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_NAME   "Patcher"
 
#define TRACE_PATCHER_INDENT   for (i=0; i<patcher_depth; i++) printf("\t")
 

Functions

void patcher_list_create (codeinfo *code)
 
void patcher_list_reset (codeinfo *code)
 
void patcher_list_free (codeinfo *code)
 
static PatcherPtrTypatcher_list_find (codeinfo *code, void *pc)
 
void patcher_list_show (codeinfo *code)
 Show the content of the whole patcher reference list for debugging purposes. More...
 
patchref_tpatcher_add_patch_ref (jitdata *jd, functionptr patcher, void *ref, s4 disp)
 
void patcher_resolve (codeinfo *code)
 Resolve all patchers in the current JIT run. More...
 
bool patcher_is_patched_at (void *pc)
 
bool patcher_handler (u1 *pc)
 
bool patcher_initialize_class (patchref_t *pr)
 
bool patcher_resolve_class (patchref_t *pr)
 
bool patcher_resolve_native_function (patchref_t *pr)
 
bool patcher_breakpoint (patchref_t *pr)
 Deals with breakpoint instructions (ICMD_BREAKPOINT) compiled into a JIT method. More...
 

Variables

static int patcher_depth = 0
 

Macro Definition Documentation

#define DEBUG_NAME   "Patcher"

Definition at line 60 of file patcher-common.cpp.

#define TRACE_PATCHER_INDENT   for (i=0; i<patcher_depth; i++) printf("\t")

Definition at line 284 of file patcher-common.cpp.

Function Documentation

patchref_t* patcher_add_patch_ref ( jitdata jd,
functionptr  patcher,
void ref,
s4  disp 
)

Definition at line 172 of file patcher-common.cpp.

bool patcher_breakpoint ( patchref_t pr)

Deals with breakpoint instructions (ICMD_BREAKPOINT) compiled into a JIT method.

This patcher might never patch back the original machine code because breakpoints are kept active.

Definition at line 480 of file patcher-common.cpp.

bool patcher_handler ( u1 pc)

Definition at line 287 of file patcher-common.cpp.

bool patcher_initialize_class ( patchref_t pr)

Definition at line 382 of file patcher-common.cpp.

bool patcher_is_patched_at ( void pc)

Definition at line 250 of file patcher-common.cpp.

void patcher_list_create ( codeinfo code)

Definition at line 70 of file patcher-common.cpp.

static PatcherPtrTy* patcher_list_find ( codeinfo code,
void pc 
)
static

Definition at line 130 of file patcher-common.cpp.

void patcher_list_free ( codeinfo code)

Definition at line 97 of file patcher-common.cpp.

void patcher_list_reset ( codeinfo code)

Definition at line 83 of file patcher-common.cpp.

void patcher_list_show ( codeinfo code)

Show the content of the whole patcher reference list for debugging purposes.

Parameters
codeThe codeinfo containing the patcher list.

Definition at line 150 of file patcher-common.cpp.

void patcher_resolve ( codeinfo code)

Resolve all patchers in the current JIT run.

Parameters
jdJIT data-structure

Definition at line 236 of file patcher-common.cpp.

bool patcher_resolve_class ( patchref_t pr)

Definition at line 412 of file patcher-common.cpp.

bool patcher_resolve_native_function ( patchref_t pr)

Definition at line 441 of file patcher-common.cpp.

Variable Documentation

int patcher_depth = 0
static

Definition at line 283 of file patcher-common.cpp.