Skip to content

Commit

Permalink
Added ctl tcg buffer size accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
elicn committed Oct 8, 2024
1 parent 7f06e46 commit 4f5c10f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bindings/python/unicorn/unicorn_py3/unicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,27 @@ def ctl_set_tlb_mode(self, mode: int) -> None:
(ctypes.c_uint, mode)
)

def ctl_get_tcg_buffer_size(self) -> int:
"""Retrieve TCG buffer size.
Returns: buffer size (in bytes)
"""

return self.__ctl_r(uc.UC_CTL_TCG_BUFFER_SIZE,
(ctypes.c_uint32, None)
)

def ctl_set_tcg_buffer_size(self, size: int) -> None:
"""Set TCG buffer size.
Args:
size: new size to set
"""

self.__ctl_w(uc.UC_CTL_TCG_BUFFER_SIZE,
(ctypes.c_int32, size)
)


class UcContext(RegStateManager):
"""Unicorn internal context.
Expand Down

0 comments on commit 4f5c10f

Please sign in to comment.