-
Notifications
You must be signed in to change notification settings - Fork 747
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 new HookSwitch hook type #1500
base: dev
Are you sure you want to change the base?
Conversation
Hello everyone! While using My idea for this use case is to add a new The name of the hook itself wasn't well thought so feel free to recommend a new one if needed, same for the documentation that I added. Cheers :) |
Hi, Welcome to Qiling Framework. I guess for this case we also need a test to make sure everything runs properly. (Current version of Unicorn is still broken and we are still fixing it) |
Hey! Thanks for replying! I don't mind adding a test or two. Should I expand this test to also include the new hook? Line 34 in 9a78d18
|
This is indeed an interesting idea, but let me suggest another view to this. Consider something similar to this: @toggle_hook(on=0x1000, off=0x2000)
def my_hook(ql: Qiling, *args):
... |
I like the idea! Should I just give it a try or do you have already some requirements or some idea on how it should interact with the other types of hooks? |
I didn't think it through, maybe a code hook is always required (otherwise, how can we tell when to toggle it on or off?) Please go ahead and implement what you think is useful. Consider placing that in the "extensions" folder as this is still experimental. |
Hey! Sorry for the late reply, it has been a busy month. It is not very clear to me how I would be able to move the implementation to the "extensions" folder. The hooks are declared functions of the class
If you have better recommendations pls let me know :) |
Since this is a new hook, i still recomment we need to add in a new test too. |
Will add one soon! Any advice on where to place it? Maybe around where the other hooks are tested? |
Hi, somewhere around https://github.com/qilingframework/qiling/blob/master/tests/test_elf.py will work |
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing