mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-11 10:07:05 +00:00
m1n1.constructutils: Add ZPadding type
Like Padding, but actually asserts that the contents are zeroed. Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
9aaac03907
commit
da40a6d843
1 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,9 @@ g_struct_trace = set()
|
|||
g_struct_addrmap = {}
|
||||
g_depth = 0
|
||||
|
||||
def ZPadding(size):
|
||||
return Const(bytes(size), Bytes(size))
|
||||
|
||||
def recusive_reload(obj, token=None):
|
||||
global g_depth
|
||||
|
||||
|
@ -659,4 +662,4 @@ def show_struct_trace(log=print):
|
|||
for addr, desc in sorted(list(g_struct_trace)):
|
||||
log(f"{addr:>#18x}: {desc}")
|
||||
|
||||
__all__ = ["ConstructClass", "ConstructValueClass", "Dec", "ROPointer", "show_struct_trace"]
|
||||
__all__ = ["ConstructClass", "ConstructValueClass", "Dec", "ROPointer", "show_struct_trace", "ZPadding"]
|
||||
|
|
Loading…
Reference in a new issue