<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:宋体;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin:0cm;
        margin-bottom:.0001pt;
        text-indent:21.0pt;
        font-size:12.0pt;
        font-family:宋体;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1060448409;
        mso-list-type:hybrid;
        mso-list-template-ids:1607470184 -1230837850 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi, there!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">I’ve got some problems with custom entry points.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">I’ve learned from
<a href="https://github.com/Sable/soot/wiki/Using-Soot-with-custom-entry-points">
https://github.com/Sable/soot/wiki/Using-Soot-with-custom-entry-points</a> to analyze from custom entry point.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">Options.v().parse(args);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">SootClass c = Scene.v().forceResolve("MyEntryPoint", SootClass.BODIES);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">c.setApplicationClass();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">Scene.v().loadNecessaryClasses();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">SootMethod method = c.getMethodByName("myMethod");<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">List entryPoints = new ArrayList();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">entryPoints.add(method);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd;background:#F6F8FA">
<span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">Scene.v().setEntryPoints(entryPoints);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:24.0pt;mso-para-margin-left:2.0gd"><span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">PackManager.v().runPacks();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN" style="font-size:8.5pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">But I can’t use
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">To get to my method, it just always analyze from main method.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Since my project is using servlet, so I can’t just make a call in main method since request and response is not easy to new.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">So I’m wondering:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Is it possible to analyze from custom entry point throw the method above?
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">If so, what is my problem? Does “myMethod” cannot just be String of method name?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Looking forward & with best regards.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>