miasm
Reverse engineering framework
vm_mngr_py.c File Reference
#include <Python.h>
#include "structmember.h"
#include <stdint.h>
#include <inttypes.h>
#include <signal.h>
#include "compat_py23.h"
#include "queue.h"
#include "vm_mngr.h"
#include "bn.h"
#include "vm_mngr_py.h"
Include dependency graph for vm_mngr_py.c:

Macros

#define MIN(a, b)   (((a)<(b))?(a):(b))
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 
#define RAISE(errtype, msg)   {PyObject* p; p = PyErr_Format( errtype, msg ); return p;}
 

Functions

PyObject * _vm_get_exception (unsigned int xcpt)
 
PyObject * set_alarm (VmMngr *self)
 
PyObject * vm_add_memory_page (VmMngr *self, PyObject *args)
 
PyObject * vm_remove_memory_page (VmMngr *self, PyObject *args)
 
PyObject * vm_set_mem_access (VmMngr *self, PyObject *args)
 
PyObject * vm_set_mem (VmMngr *self, PyObject *args)
 
PyObject * vm_get_mem_access (VmMngr *self, PyObject *args)
 
PyObject * vm_get_mem (VmMngr *self, PyObject *args)
 
PyObject * vm_get_u8 (VmMngr *self, PyObject *args)
 
PyObject * vm_get_u16 (VmMngr *self, PyObject *args)
 
PyObject * vm_get_u32 (VmMngr *self, PyObject *args)
 
PyObject * vm_get_u64 (VmMngr *self, PyObject *args)
 
PyObject * vm_set_u8 (VmMngr *self, PyObject *args)
 
PyObject * vm_set_u16 (VmMngr *self, PyObject *args)
 
PyObject * vm_set_u32 (VmMngr *self, PyObject *args)
 
PyObject * vm_set_u64 (VmMngr *self, PyObject *args)
 
PyObject * vm_add_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_remove_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_set_exception (VmMngr *self, PyObject *args)
 
PyObject * vm_get_exception (VmMngr *self, PyObject *args)
 
PyObject * vm_init_memory_page_pool (VmMngr *self, PyObject *args)
 
PyObject * vm_init_code_bloc_pool (VmMngr *self, PyObject *args)
 
PyObject * vm_init_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_reset_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_reset_memory_access (VmMngr *self, PyObject *args)
 
PyObject * py_add_mem_read (VmMngr *self, PyObject *args)
 
PyObject * py_add_mem_write (VmMngr *self, PyObject *args)
 
PyObject * vm_check_invalid_code_blocs (VmMngr *self, PyObject *args)
 
PyObject * vm_check_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_dump (PyObject *self)
 
PyObject * vm_dump_memory_breakpoint (VmMngr *self, PyObject *args)
 
PyObject * vm_get_all_memory (VmMngr *self, PyObject *args)
 
PyObject * vm_reset_memory_page_pool (VmMngr *self, PyObject *args)
 
PyObject * vm_reset_code_bloc_pool (VmMngr *self, PyObject *args)
 
PyObject * vm_add_code_bloc (VmMngr *self, PyObject *args)
 
PyObject * vm_dump_code_bloc_pool (VmMngr *self)
 
PyObject * vm_is_mapped (VmMngr *self, PyObject *args)
 
PyObject * vm_get_memory_read (VmMngr *self, PyObject *args)
 
PyObject * vm_get_memory_write (VmMngr *self, PyObject *args)
 
 MOD_INIT (VmMngr)
 
bn_t PyLong_to_bn (PyObject *py_long)
 
PyObject * bn_to_PyLong (bn_t bn)
 

Variables

struct memory_page_list_head memory_page_pool
 
struct code_bloc_list_head code_bloc_pool
 
VmMngrglobal_vmmngr
 
char vm_mngr_mod_docs [] = "vm_mngr module."
 
char vm_mngr_mod_name [] = "VmMngr"
 

Macro Definition Documentation

◆ MAX

#define MAX (   a,
 
)    (((a)>(b))?(a):(b))

◆ MIN

#define MIN (   a,
 
)    (((a)<(b))?(a):(b))

◆ RAISE

#define RAISE (   errtype,
  msg 
)    {PyObject* p; p = PyErr_Format( errtype, msg ); return p;}

Function Documentation

◆ _vm_get_exception()

PyObject* _vm_get_exception ( unsigned int  xcpt)

◆ bn_to_PyLong()

PyObject* bn_to_PyLong ( bn_t  bn)
Here is the call graph for this function:

◆ MOD_INIT()

MOD_INIT ( VmMngr  )

◆ py_add_mem_read()

PyObject* py_add_mem_read ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ py_add_mem_write()

PyObject* py_add_mem_write ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ PyLong_to_bn()

bn_t PyLong_to_bn ( PyObject *  py_long)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_alarm()

PyObject* set_alarm ( VmMngr self)

◆ vm_add_code_bloc()

PyObject* vm_add_code_bloc ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_add_memory_breakpoint()

PyObject* vm_add_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_add_memory_page()

PyObject* vm_add_memory_page ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_check_invalid_code_blocs()

PyObject* vm_check_invalid_code_blocs ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_check_memory_breakpoint()

PyObject* vm_check_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_dump()

PyObject* vm_dump ( PyObject *  self)
Here is the call graph for this function:

◆ vm_dump_code_bloc_pool()

PyObject* vm_dump_code_bloc_pool ( VmMngr self)
Here is the call graph for this function:

◆ vm_dump_memory_breakpoint()

PyObject* vm_dump_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_all_memory()

PyObject* vm_get_all_memory ( VmMngr self,
PyObject *  args 
)

◆ vm_get_exception()

PyObject* vm_get_exception ( VmMngr self,
PyObject *  args 
)

◆ vm_get_mem()

PyObject* vm_get_mem ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_mem_access()

PyObject* vm_get_mem_access ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_memory_read()

PyObject* vm_get_memory_read ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_memory_write()

PyObject* vm_get_memory_write ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_u16()

PyObject* vm_get_u16 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_u32()

PyObject* vm_get_u32 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_u64()

PyObject* vm_get_u64 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_get_u8()

PyObject* vm_get_u8 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_init_code_bloc_pool()

PyObject* vm_init_code_bloc_pool ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_init_memory_breakpoint()

PyObject* vm_init_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_init_memory_page_pool()

PyObject* vm_init_memory_page_pool ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_is_mapped()

PyObject* vm_is_mapped ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_remove_memory_breakpoint()

PyObject* vm_remove_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_remove_memory_page()

PyObject* vm_remove_memory_page ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_reset_code_bloc_pool()

PyObject* vm_reset_code_bloc_pool ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_reset_memory_access()

PyObject* vm_reset_memory_access ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_reset_memory_breakpoint()

PyObject* vm_reset_memory_breakpoint ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_reset_memory_page_pool()

PyObject* vm_reset_memory_page_pool ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_exception()

PyObject* vm_set_exception ( VmMngr self,
PyObject *  args 
)

◆ vm_set_mem()

PyObject* vm_set_mem ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_mem_access()

PyObject* vm_set_mem_access ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_u16()

PyObject* vm_set_u16 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_u32()

PyObject* vm_set_u32 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_u64()

PyObject* vm_set_u64 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

◆ vm_set_u8()

PyObject* vm_set_u8 ( VmMngr self,
PyObject *  args 
)
Here is the call graph for this function:

Variable Documentation

◆ code_bloc_pool

struct code_bloc_list_head code_bloc_pool
extern

◆ global_vmmngr

VmMngr* global_vmmngr

◆ memory_page_pool

struct memory_page_list_head memory_page_pool
extern

◆ vm_mngr_mod_docs

char vm_mngr_mod_docs[] = "vm_mngr module."

◆ vm_mngr_mod_name

char vm_mngr_mod_name[] = "VmMngr"