Skip to content
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

Add UC_HOOK_INSN support for UC_X86_INS_RDTSC and UC_X86_INS_RDRAND #1902

Open
Z4ee opened this issue Oct 27, 2023 · 0 comments
Open

Add UC_HOOK_INSN support for UC_X86_INS_RDTSC and UC_X86_INS_RDRAND #1902

Z4ee opened this issue Oct 27, 2023 · 0 comments

Comments

@Z4ee
Copy link

Z4ee commented Oct 27, 2023

The current version of the Unicorn Engine does not provide hook support for the UC_X86_INS_RDTSC and UC_X86_INS_RDRAND instructions. These instructions are crucial for applications requiring precise time measurement or random number generation. This proposal suggests adding hook support for these instructions, allowing users to have more flexible control over code execution.

uc_hook_add(uc, &hook, UC_HOOK_INSN, hook_rdtsc, nullptr, 1, 0, UC_X86_INS_RDTSC); // Return: UC_ERR_HOOK
uc_hook_add(uc, &hook, UC_HOOK_INSN, hook_rdrand, nullptr, 1, 0, UC_X86_INS_RDRAND); // Return: UC_ERR_HOOK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant