[Soot-list] Inconsistent Line Number

Nishant Budhdev nishant.budhdev at gmail.com
Fri Apr 10 03:31:19 EDT 2015


Hi,

I have the following method in my android app's main class:
     public boolean onOptionsItemSelected(MenuItem item) {

        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

The Jimple conversion for the same is:
   public boolean onOptionsItemSelected(android.view.MenuItem)
   {
        com.example.dcsnsb.testapplicationcp9.MainActivity $r0;
        android.view.MenuItem $r1;
        int $i0;
        boolean $z0;
        $r0 := @this: com.example.dcsnsb.testapplicationcp9.MainActivity;
        $r1 := @parameter0: android.view.MenuItem;
        $i0 = interfaceinvoke $r1.<android.view.MenuItem: int
getItemId()>();
        if $i0 != 2131230787 goto label1;
        return 1;
     label1:
        $z0 = specialinvoke $r0.<android.support.v7.app.ActionBarActivity:
boolean onOptionsItemSelected(android.view.MenuItem)>($r1);

        return $z0;
   }

I am trying to get source line numbers for refactoring purposes. Usually I
have been using getJavaSourceStartLineNumber() for this and it has worked
well. However, in this scenario the line number for the lines marked with
"// <--" are shown as -1. I tried using tags and trying to go into further
debugging but couldn't find anything other than null associated with those
lines for line number related attributes. Is there a way in which I could
all the line numbers ?

Thanks,
Nishant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150410/eb4e2dcc/attachment.html 


More information about the Soot-list mailing list