libdebug.data.syscall_handler
SyscallHandler
dataclass
Handle a syscall executed by the target process.
Attributes:
Name | Type | Description |
---|---|---|
syscall_number |
int
|
The syscall number to handle. |
on_enter_user |
Callable[[ThreadContext, int], None]
|
The callback defined by the user to execute when the syscall is entered. |
on_exit_user |
Callable[[ThreadContext, int], None]
|
The callback defined by the user to execute when the syscall is exited. |
on_enter_pprint |
Callable[[ThreadContext, int], None]
|
The callback defined by the pretty print to execute when the syscall is entered. |
on_exit_pprint |
Callable[[ThreadContext, int], None]
|
The callback defined by the pretty print to execute when the syscall is exited. |
recursive |
bool
|
Whether, when the syscall is hijacked with another one, the syscall handler associated with the new syscall should be considered as well. Defaults to False. |
enabled |
bool
|
Whether the syscall will be handled or not. |
hit_count |
int
|
The number of times the syscall has been handled. |
Source code in libdebug/data/syscall_handler.py
__hash__()
disable()
enable()
hit_on(thread_context)
Returns whether the syscall handler has been hit on the given thread context.
hit_on_enter(thread_context)
Returns whether the syscall handler has been hit during the syscall entry on the given thread context.
Source code in libdebug/data/syscall_handler.py
hit_on_exit(thread_context)
Returns whether the syscall handler has been hit during the syscall exit on the given thread context.