New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature MemStruct #284
Feature MemStruct #284
Commits on Jan 18, 2016
-
-
MemStruct: auto-allocation feature
MemStruct can be automatically allocated if a None addr is passed to the constructor and mem.allocator has been set to an allocation function. miasm2.os_dep.common.heap API has been extended to directly support a VmMngr as an argument. NOTE: heap.alloc and heap.vm_alloc could be merged, but allowing the first argument to be either a jitter or a vm is misleading, and changing the old API would have broken some code.
-
-
MemStruct: method reorganization
Moved methods from _MetaMemStruct to MemStruct for more clarity
-
MemStruct: module and MemFields documentation
+ minor fixes/refactors
-
-
-
-
-
-
-
-
-
-
-
-
-
MemStruct: Big refactoring, Mem* -> Pinned*
This commit is the first phase of the Type refactor. The PinnedType class has been separated from the more specific PinnedStruct class.
-
-
MemStruct: big refactor in process
Doc is currently incoherent, impl will also be completed
-
MemStruct: Array/PinnedArray homogeneity
Array access logic has moved to Array, Pinned(Sized)Array just contains the logic to interface with memory
-
-
-
-
-
-
-
MemStruct/Types: Array idx fix + MemStr.from_str feature
MemStr.from_str allows to allocate and set a string automatically if ALLOCATOR is set. This avoids allocating a buffer and filling it later.
-
-
-
-
-
-
Types: adding the ("field", SomeMemType) syntax
Shorthand for ("field", SomeMemStruct.get_type()) in a Struct or MemStruct fields definition.
-
Types: Support anonymous Struct/Union/BitField
See the test addition for an example. A Struct, Union, or BitField field with no name will be considered anonymous: all its fields will be added to the parent Struct/Union/BitField. This implements this kind of C declaration: struct foo { int a; union { int bar; struct { short baz; short foz; }; }; }
-
-
Types: typo, MemStruct.get_offset should be a classmethod
Also added tests and MemArray.get_offset
-
-