MemStruct/Types: Renamed analysis.mem to core.types

This commit is contained in:
Florent Monjalet 2015-11-30 16:00:26 +01:00
parent b3b0b03b4a
commit ba2df16277
4 changed files with 14 additions and 13 deletions

View file

@ -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."

View file

@ -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

View file

@ -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