diff options
| author | Florent Monjalet <florent.monjalet@gmail.com> | 2015-11-29 22:07:54 +0100 |
|---|---|---|
| committer | Florent Monjalet <florent.monjalet@gmail.com> | 2016-01-18 14:02:31 +0100 |
| commit | 0682ca8d6e82626bb0325d96d19342fbede33e21 (patch) | |
| tree | 1831e9720e5a4f8991d6b69e0b9f13df0b29e898 /test | |
| parent | d19f4c1dbdd2f1f451d03551abb0e5ebf4d455be (diff) | |
| download | miasm-0682ca8d6e82626bb0325d96d19342fbede33e21.tar.gz miasm-0682ca8d6e82626bb0325d96d19342fbede33e21.zip | |
MemStruct: No more 'pin' and 'mem_sized_arraytype' functions
Diffstat (limited to '')
| -rw-r--r-- | test/analysis/mem.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/analysis/mem.py b/test/analysis/mem.py index dca3346b..60d9c569 100644 --- a/test/analysis/mem.py +++ b/test/analysis/mem.py @@ -7,9 +7,9 @@ import struct from miasm2.analysis.machine import Machine from miasm2.analysis.mem import PinnedStruct, Num, Ptr, PinnedStr, PinnedArray,\ PinnedSizedArray, Array, mem_array_type,\ - mem_sized_array_type, RawStruct, pin,\ - Union, BitField, PinnedSelf, PinnedVoid, Bits, \ - set_allocator, PinnedUnion, Struct + RawStruct, Union, BitField, PinnedSelf, \ + PinnedVoid, Bits, set_allocator, PinnedUnion, \ + Struct from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE from miasm2.os_dep.common import heap @@ -198,8 +198,8 @@ except ValueError: # PinnedSizedArray tests memsarray = PinnedSizedArray(jitter.vm, None, Num("I"), 10) # This also works: -_memsarray = mem_sized_array_type(Num("I"), 10)(jitter.vm) -# And mem_sized_array_type generates statically sized types +_memsarray = Array(Num("I"), 10).pinned(jitter.vm) +# And Array(type, size).pinned generates statically sized types assert _memsarray.sizeof() == len(memsarray) memsarray.memset('\xcc') assert memsarray[0] == 0xcccccccc |