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

Save previous pointer automatically #18

Merged
merged 1 commit into from Oct 28, 2015
Merged

Save previous pointer automatically #18

merged 1 commit into from Oct 28, 2015

Conversation

uroboro
Copy link
Contributor

@uroboro uroboro commented Oct 27, 2015

Removes the need to do so manually via dlsym calls. Also allows having multiple hooks on the same symbol.

Removes the need to do so manually via dlsym calls.
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@grp
Copy link
Contributor

grp commented Oct 27, 2015

I like this, but it does change the API for existing users. What's the motivation for the change?

@uroboro
Copy link
Contributor Author

uroboro commented Oct 27, 2015

Besides the two reasons on the first comment, it was done to have a similar hooking interface as other projects like cydiasubstrate's MSHookFunction, rd_route's rd_route, mach_override's mach_override_ptr and substitute's substitute_hook_functions. The first three having an interface that accepts the target function symbol, its replacement and a pointer to save the previous address in. Using the address dlsym returns would skip all other hooks when calling the original implementation.

@grp
Copy link
Contributor

grp commented Oct 28, 2015

Sounds good. I'm okay with breaking compatibility since fishhook is mostly for debugging anyway. :)

grp added a commit that referenced this pull request Oct 28, 2015
Save previous pointer automatically
@grp grp merged commit 8dbd09b into facebook:master Oct 28, 2015
@grp
Copy link
Contributor

grp commented Oct 28, 2015

Thanks!

@uroboro
Copy link
Contributor Author

uroboro commented Oct 28, 2015

No problem!

@kastiglione
Copy link
Contributor

🍰

@tirodkar
Copy link
Contributor

tirodkar commented Nov 9, 2015

The current podspec with the tag pointing to release 0.1 does not include this change. Could we have the podspec point to master or create a new release 0.2 with this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants