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

ART Hook问题 #54

Open
liuguowei0709 opened this issue Dec 4, 2015 · 3 comments
Open

ART Hook问题 #54

liuguowei0709 opened this issue Dec 4, 2015 · 3 comments

Comments

@liuguowei0709
Copy link

请教一个问题。
任何一个method在art上都有2个入口,一个解释器,一个本地机器指令。我想hook一个method。
我看了您的源码,art_method->SetEntryPointFromQuickCompiledCode,这样是hook住一个本地机器指令执行的method。
我看您注释掉art_method->SetEntryPointFromInterpreter。
我想问的是,如果是解释执行的话,是不是必须SetEntryPointFromInterpreter才能hook住?
谢谢!!

@hwjump
Copy link
Contributor

hwjump commented Dec 4, 2015

You can refer art/runtime/interpreter/interpreter.cc DoInvoke() method.
and there are two implement in SetEntryPointFromInterpreter : "artInterpreterToInterpreterBridge" and "artInterpreterToCompiledCodeBridge", one is just Interpreter execute, and another is CompiledCode execute. And I think this is a nice hook point for Interpreter method! Thank you!

@liuguowei0709
Copy link
Author

谢谢您的解答,还有个疑惑。不知您为什么屏蔽掉SetEntryPointFromInterpreter,不用考虑解释执行的情况吗?如果一个method是解释执行的话,目前这个版本是不是就hook不到了?
谢谢!

@ghost
Copy link

ghost commented Oct 15, 2017

是的

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

2 participants