[Soot-list] ***SPAM*** help me for “LineNumberTag” from China

443655536 443655536 at qq.com
Mon Jul 2 22:49:28 EDT 2012


private static int getLineNumber1(Stmt s) {
  int lineNumber = -1;
  Unit unit = (Unit) s;
  LineNumberTag tag = (LineNumberTag) unit.getTag("LineNumberTag");
    if (tag != null)
   lineNumber = tag.getLineNumber();
  System.err.println("\nline number" + lineNumber);
  return lineNumber;
 }
  
  
 when  I   used  the  function  “getLineNumber1(s)”,but  the result  is  wrong。the return  value is  always -1,I  also  use  this code  in  the  main。
  
  soot.options.Options.v().set_keep_line_number(true);
  soot.options.Options.v().set_whole_program(true);
  soot.options.Options.v().setPhaseOption("cg", "verbose:false");
  List<String> argsList = new ArrayList<String>(Arrays.asList(args));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120703/ee286b95/attachment-0001.html 


More information about the Soot-list mailing list