diff options
| -rw-r--r-- | example/jitter/types.py (renamed from example/jitter/memstruct.py) | 12 | ||||
| -rw-r--r-- | miasm2/core/types.py (renamed from miasm2/analysis/mem.py) | 0 | ||||
| -rw-r--r-- | test/core/types.py (renamed from test/analysis/mem.py) | 10 | ||||
| -rw-r--r-- | test/test_all.py | 5 |
4 files changed, 14 insertions, 13 deletions
diff --git a/example/jitter/memstruct.py b/example/jitter/types.py index 4ddbea86..6d8543b4 100644 --- a/example/jitter/memstruct.py +++ b/example/jitter/types.py @@ -1,13 +1,13 @@ #!/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 +"""This script is just a short example of common usages for miasm2.core.types. +For a more complete view of what is possible, tests/core/types.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.core.types import MemStruct, Self, Void, Str, Array, Ptr, \ + Num, Array, set_allocator from miasm2.os_dep.common import heap # Instanciate a heap @@ -145,7 +145,7 @@ class DataStr(MemStruct): ] -print "This script demonstrates a LinkedList implementation using the mem " +print "This script demonstrates a LinkedList implementation using the types " print "module in the first part, and how to play with some casts in the second." print @@ -229,6 +229,6 @@ print "See that the original array has been modified:" print repr(data) print -print "See test/analysis/mem.py and the miasm2.analysis.mem module doc for " +print "See test/core/types.py and the miasm2.core.types module doc for " print "more information." diff --git a/miasm2/analysis/mem.py b/miasm2/core/types.py index 3c8d5b8b..3c8d5b8b 100644 --- a/miasm2/analysis/mem.py +++ b/miasm2/core/types.py diff --git a/test/analysis/mem.py b/test/core/types.py index 6c7fc9e3..db72449c 100644 --- a/test/analysis/mem.py +++ b/test/core/types.py @@ -1,14 +1,14 @@ #!/usr/bin/env python -# miasm2.analysis.mem tests +# miasm2.core.types tests import struct from miasm2.analysis.machine import Machine -from miasm2.analysis.mem import MemStruct, Num, Ptr, Str, \ - Array, RawStruct, Union, \ - BitField, Self, Void, Bits, \ - set_allocator, MemUnion, Struct +from miasm2.core.types import MemStruct, Num, Ptr, Str, \ + Array, RawStruct, Union, \ + BitField, Self, Void, Bits, \ + set_allocator, MemUnion, Struct from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE from miasm2.os_dep.common import heap diff --git a/test/test_all.py b/test/test_all.py index 71f036a2..6a619948 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -191,6 +191,7 @@ for script in ["interval.py", "parse_asm.py", "utils.py", "sembuilder.py", + "types.py", ]: testset += RegressionTest([script], base_dir="core") ## Expression @@ -238,8 +239,6 @@ testset += RegressionTest(["depgraph.py"], base_dir="analysis", (14, 1), (15, 1))) for fname in fnames]) -testset += RegressionTest(["mem.py"], base_dir="analysis") - # Examples class Example(Test): """Examples specificities: @@ -484,6 +483,8 @@ for script, dep in [(["x86_32.py", Example.get_sample("x86_32_sc.bin")], []), testset += ExampleJitter(script + ["--jitter", jitter], depends=dep, tags=tags) +testset += ExampleJitter(["types.py"]) + if __name__ == "__main__": # Argument parsing |