From ba2df16277d7d4deae118ed11e1e92cd478045ec Mon Sep 17 00:00:00 2001 From: Florent Monjalet Date: Mon, 30 Nov 2015 16:00:26 +0100 Subject: MemStruct/Types: Renamed analysis.mem to core.types --- example/jitter/memstruct.py | 234 -------------------------------------------- example/jitter/types.py | 234 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+), 234 deletions(-) delete mode 100644 example/jitter/memstruct.py create mode 100644 example/jitter/types.py (limited to 'example') diff --git a/example/jitter/memstruct.py b/example/jitter/memstruct.py deleted file mode 100644 index 4ddbea86..00000000 --- a/example/jitter/memstruct.py +++ /dev/null @@ -1,234 +0,0 @@ -#!/usr/bin/env python -"""This script is just a short example of common usages for miasm2.analysis.mem. -For a more complete view of what is possible, tests/analysis/mem.py covers -most of the module possibilities, and the module doc gives useful information -as well. -""" - -from miasm2.analysis.machine import Machine -from miasm2.analysis.mem import MemStruct, Self, Void, Str, Array, Ptr, \ - Num, Array, set_allocator -from miasm2.os_dep.common import heap - -# Instanciate a heap -my_heap = heap() -# And set it as the default memory allocator, to avoid manual allocation and -# explicit address passing to the MemType subclasses (like MemStruct) -# constructor -set_allocator(my_heap.vm_alloc) - -# Let's reimplement a simple C generic linked list mapped on a VmMngr. - -# All the structures and methods will use the python objects but all the data -# is in fact stored in the VmMngr - -class ListNode(MemStruct): - fields = [ - # The "