[Soot-list] Counting exits in a loop - understanding Jimple "goto [?= nop]"

Phil Pratt-Szeliga pcpratts at syr.edu
Mon Jul 16 19:11:53 EDT 2012


Hi John,

> 1. I thought goto statements normally cause execution to jump to an address,
> such that the address is sometimes represented by a label. But what do "goto
> nop" and "goto [?= nop]" jump to? If nop is a label (and I doubt that's the
> case), then isn't it a problem that there are more than one statement
> (label?) with the nop label?

nop is an instruction. When you operating at runtime, the targets of
the goto instructions will be two disctinct Units. When jimple is
written out to disk, they place unique labels in the file.

> 2. Any advice on Jimple documentation that might help me to understand
> things better?

Feel free to email the list with questions as they come up. I have a
bunch of experience with Jimple.

Some important classes/interfaces
Unit
Value
Stmt
Expr

Each line of code is a Unit. The individual parts of Units are usually
Values or Units. You can go here [1] and lookup those
classes/interfaces and see the hierarchy of classes to get a better
understanding of how things work.

Phil Pratt-Szeliga
Syracuse University

[1] http://www.sable.mcgill.ca/soot/doc/


More information about the Soot-list mailing list