Soot - 从 java 类映射到 jimple
使用以下代码,我可以获得jimple
Java .class
文件的表示:
soot.Main.main(args);
SootClass mainClass = Scene.v().getMainClass();
String methodSignature = "void main(java.lang.String[])";
SootMethod mainMethod = mainClass.getMethod(methodSignature);
Body jimpleBody = mainMethod.retrieveActiveBody();
但是,我需要从.class
到jimple
。详细说明,对于.class
文件中的某个代码行,我想知道其相应的jimple
表示。由于一行代码可以转换为多个jimple
代码,因此该地图可以是一对一的。是否存在可以解决此问题的API或方法?
With the following code I can get the jimple
representation of a java .class
file:
soot.Main.main(args);
SootClass mainClass = Scene.v().getMainClass();
String methodSignature = "void main(java.lang.String[])";
SootMethod mainMethod = mainClass.getMethod(methodSignature);
Body jimpleBody = mainMethod.retrieveActiveBody();
However, I need to know the map from .class
to jimple
. In detail, For a certain line of code in the .class
file, I want to know its corresponding jimple
representation. Since one line of code can be converted into multiple jimple
codes, this map can be one-to-many. Does there exist any API or method that can solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到解决方案在这里。详细说明
单元
您可以使用I find the solution here. In detail, for a
Unit
you can use