|
def | __init__ (self, ir_arch, jit_type="gcc") |
|
def | init_exceptions_handler (self) |
|
def | add_breakpoint (self, addr, callback) |
|
def | set_breakpoint (self, addr, *args) |
|
def | get_breakpoint (self, addr) |
|
def | remove_breakpoints_by_callback (self, callback) |
|
def | remove_breakpoints_by_address (self, address) |
|
def | add_exception_handler (self, flag, callback) |
|
def | run_at (self, pc) |
|
def | runiter_once (self, pc) |
|
def | init_run (self, pc) |
|
def | continue_run (self, step=False, trace=False) |
|
def | run (self, addr) |
|
def | run_until (self, addr, trace=False) |
|
def | init_stack (self) |
|
def | get_exception (self) |
|
def | get_c_str (self, addr, max_char=None) |
|
def | set_c_str (self, addr, value) |
|
def | get_str_ansi (self, addr, max_char=None) |
|
def | get_str_unic (self, addr, max_char=None) |
|
def | handle_function (self, f_addr) |
|
def | add_lib_handler (self, libs, user_globals=None) |
|
def | eval_expr (self, expr) |
|
def | set_trace_log (self, trace_instr=True, trace_regs=True, trace_new_blocks=False) |
|
◆ __init__()
def miasm.jitter.jitload.Jitter.__init__ |
( |
|
self, |
|
|
|
ir_arch, |
|
|
|
jit_type = "gcc" |
|
) |
| |
Init an instance of jitter.
@ir_arch: ir instance for this architecture
@jit_type: JiT backend to use. Available options are:
- "gcc"
- "llvm"
- "python"
◆ add_breakpoint()
def miasm.jitter.jitload.Jitter.add_breakpoint |
( |
|
self, |
|
|
|
addr, |
|
|
|
callback |
|
) |
| |
Add a callback associated with addr.
@addr: breakpoint address
@callback: function with definition (jitter instance)
◆ add_exception_handler()
def miasm.jitter.jitload.Jitter.add_exception_handler |
( |
|
self, |
|
|
|
flag, |
|
|
|
callback |
|
) |
| |
Add a callback associated with an exception flag.
@flag: bitflag
@callback: function with definition (jitter instance)
◆ add_lib_handler()
def miasm.jitter.jitload.Jitter.add_lib_handler |
( |
|
self, |
|
|
|
libs, |
|
|
|
user_globals = None |
|
) |
| |
Add a function to handle libs call with breakpoints
@libs: libimp instance
@user_globals: dictionary for defined user function
◆ continue_run()
def miasm.jitter.jitload.Jitter.continue_run |
( |
|
self, |
|
|
|
step = False , |
|
|
|
trace = False |
|
) |
| |
PRE: init_run.
Continue the run of the current session until iterator returns or run is
set to False.
If step is True, run only one time.
If trace is True, activate trace log option until execution stops
Return the iterator value
◆ eval_expr()
def miasm.jitter.jitload.Jitter.eval_expr |
( |
|
self, |
|
|
|
expr |
|
) |
| |
Eval expression @expr in the context of the current instance. Side
effects are passed on it
◆ get_breakpoint()
def miasm.jitter.jitload.Jitter.get_breakpoint |
( |
|
self, |
|
|
|
addr |
|
) |
| |
Return breakpoints handlers for address @addr
@addr: integer
◆ get_c_str()
def miasm.jitter.jitload.Jitter.get_c_str |
( |
|
self, |
|
|
|
addr, |
|
|
|
max_char = None |
|
) |
| |
Get C str from vm.
@addr: address in memory
@max_char: maximum len
◆ get_exception()
def miasm.jitter.jitload.Jitter.get_exception |
( |
|
self | ) |
|
◆ get_str_ansi()
def miasm.jitter.jitload.Jitter.get_str_ansi |
( |
|
self, |
|
|
|
addr, |
|
|
|
max_char = None |
|
) |
| |
◆ get_str_unic()
def miasm.jitter.jitload.Jitter.get_str_unic |
( |
|
self, |
|
|
|
addr, |
|
|
|
max_char = None |
|
) |
| |
◆ handle_function()
def miasm.jitter.jitload.Jitter.handle_function |
( |
|
self, |
|
|
|
f_addr |
|
) |
| |
Add a breakpoint which will trigger the function handler
◆ handle_lib()
def miasm.jitter.jitload.Jitter.handle_lib |
( |
|
jitter | ) |
|
|
static |
Resolve the name of the function which cause the handler call. Then
call the corresponding handler from users callback.
◆ init_exceptions_handler()
def miasm.jitter.jitload.Jitter.init_exceptions_handler |
( |
|
self | ) |
|
◆ init_run()
def miasm.jitter.jitload.Jitter.init_run |
( |
|
self, |
|
|
|
pc |
|
) |
| |
Create an iterator on pc with runiter.
@pc: address of code to run
◆ init_stack()
def miasm.jitter.jitload.Jitter.init_stack |
( |
|
self | ) |
|
◆ remove_breakpoints_by_address()
def miasm.jitter.jitload.Jitter.remove_breakpoints_by_address |
( |
|
self, |
|
|
|
address |
|
) |
| |
Remove all breakpoints associated with @address.
@address: address of breakpoints to remove
◆ remove_breakpoints_by_callback()
def miasm.jitter.jitload.Jitter.remove_breakpoints_by_callback |
( |
|
self, |
|
|
|
callback |
|
) |
| |
Remove callbacks associated with breakpoint.
@callback: callback to remove
◆ run()
def miasm.jitter.jitload.Jitter.run |
( |
|
self, |
|
|
|
addr |
|
) |
| |
Launch emulation
@addr: (int) start address
◆ run_at()
def miasm.jitter.jitload.Jitter.run_at |
( |
|
self, |
|
|
|
pc |
|
) |
| |
Wrapper on JiT backend. Run the code at PC and return the next PC.
@pc: address of code to run
◆ run_until()
def miasm.jitter.jitload.Jitter.run_until |
( |
|
self, |
|
|
|
addr, |
|
|
|
trace = False |
|
) |
| |
PRE: init_run.
Continue the run of the current session until iterator returns, run is
set to False or addr is reached.
If trace is True, activate trace log option until execution stops
Return the iterator value
◆ runiter_once()
def miasm.jitter.jitload.Jitter.runiter_once |
( |
|
self, |
|
|
|
pc |
|
) |
| |
Iterator on callbacks results on code running from PC.
Check exceptions before breakpoints.
◆ set_breakpoint()
def miasm.jitter.jitload.Jitter.set_breakpoint |
( |
|
self, |
|
|
|
addr, |
|
|
* |
args |
|
) |
| |
Set callbacks associated with addr.
@addr: breakpoint address
@args: functions with definition (jitter instance)
◆ set_c_str()
def miasm.jitter.jitload.Jitter.set_c_str |
( |
|
self, |
|
|
|
addr, |
|
|
|
value |
|
) |
| |
Set C str str from vm.
@addr: address in memory
@value: str
◆ set_trace_log()
def miasm.jitter.jitload.Jitter.set_trace_log |
( |
|
self, |
|
|
|
trace_instr = True , |
|
|
|
trace_regs = True , |
|
|
|
trace_new_blocks = False |
|
) |
| |
Activate/Deactivate trace log options
@trace_instr: activate instructions tracing log
@trace_regs: activate registers tracing log
@trace_new_blocks: dump new code blocks log
◆ arch
miasm.jitter.jitload.Jitter.arch |
◆ attrib
miasm.jitter.jitload.Jitter.attrib |
◆ breakpoints_handler
miasm.jitter.jitload.Jitter.breakpoints_handler |
◆ bs
miasm.jitter.jitload.Jitter.bs |
◆ C_Gen
miasm.jitter.jitload.Jitter.C_Gen = CGen |
|
static |
◆ cpu
miasm.jitter.jitload.Jitter.cpu |
◆ exceptions_handler
miasm.jitter.jitload.Jitter.exceptions_handler |
◆ exec_cb
miasm.jitter.jitload.Jitter.exec_cb |
◆ ir_arch
miasm.jitter.jitload.Jitter.ir_arch |
◆ ircfg
miasm.jitter.jitload.Jitter.ircfg |
◆ jit
miasm.jitter.jitload.Jitter.jit |
◆ libs
miasm.jitter.jitload.Jitter.libs |
◆ pc
miasm.jitter.jitload.Jitter.pc |
◆ run
miasm.jitter.jitload.Jitter.run |
◆ run_iterator
miasm.jitter.jitload.Jitter.run_iterator |
◆ stack_base
miasm.jitter.jitload.Jitter.stack_base |
◆ stack_size
miasm.jitter.jitload.Jitter.stack_size |
◆ symbexec
miasm.jitter.jitload.Jitter.symbexec |
◆ user_globals
miasm.jitter.jitload.Jitter.user_globals |
◆ vm
miasm.jitter.jitload.Jitter.vm |
The documentation for this class was generated from the following file:
- /home/serpilliere/projet/test_doc_miasm/miasm/miasm/jitter/jitload.py