soot.Body.getAllUnitBoxes()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(225)

本文整理了Java中soot.Body.getAllUnitBoxes()方法的一些代码示例,展示了Body.getAllUnitBoxes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getAllUnitBoxes()方法的具体详情如下:
包路径:soot.Body
类名称:Body
方法名:getAllUnitBoxes

Body.getAllUnitBoxes介绍

[英]Returns the result of iterating through all Units in this body and querying them for their UnitBoxes. All UnitBoxes thus found are returned. Branching Units and statements which use PhiExpr will have UnitBoxes; a UnitBox contains a Unit that is either a target of a branch or is being used as a pointer to the end of a CFG block.

This method is typically used for pointer patching, eg when the unit chain is cloned.
[中]返回遍历此正文中所有单元并查询它们的UnitBox的结果。由此找到的所有UnitBox都将返回。使用PhiExpr的分支单元和语句将具有UnitBox;UnitBox包含一个单元,该单元是分支的目标或用作指向CFG块末尾的指针。
此方法通常用于指针修补,例如克隆单元链时。

代码示例

代码示例来源:origin: Sable/soot

for (UnitBox box : body.getAllUnitBoxes()) {
 Unit stmt = box.getUnit();

代码示例来源:origin: Sable/soot

@Override
/** Verifies that the UnitBoxes of this Body all point to a Unit contained within this body. */
public void validate(Body body, List<ValidationException> exception) {
 for (UnitBox ub : body.getAllUnitBoxes()) {
  if (!body.getUnits().contains(ub.getUnit())) {
   throw new RuntimeException(
     "Unitbox points outside unitChain! to unit : " + ub.getUnit() + " in " + body.getMethod());
  }
 }
}

代码示例来源:origin: Sable/soot

for (UnitBox box : getAllUnitBoxes()) {
 Unit newObject, oldObject = box.getUnit();

代码示例来源:origin: ibinti/bugvm

/** Verifies that the UnitBoxes of this Body all point to a Unit contained within this body. */
public void validateUnitBoxes()
{
  Iterator<UnitBox> it = getAllUnitBoxes().iterator();
  while (it.hasNext())
  {
    UnitBox ub = it.next();
    if (!unitChain.contains(ub.getUnit()))
      throw new RuntimeException
        ("Unitbox points outside unitChain! to unit : "+ub.getUnit()+" in "+getMethod());
  }
}

代码示例来源:origin: com.bugvm/bugvm-soot

/** Verifies that the UnitBoxes of this Body all point to a Unit contained within this body. */
public void validateUnitBoxes()
{
  Iterator<UnitBox> it = getAllUnitBoxes().iterator();
  while (it.hasNext())
  {
    UnitBox ub = it.next();
    if (!unitChain.contains(ub.getUnit()))
      throw new RuntimeException
        ("Unitbox points outside unitChain! to unit : "+ub.getUnit()+" in "+getMethod());
  }
}

代码示例来源:origin: ibinti/bugvm

Iterator boxIt = body.getAllUnitBoxes().iterator();

代码示例来源:origin: com.bugvm/bugvm-soot

Iterator boxIt = body.getAllUnitBoxes().iterator();

代码示例来源:origin: ibinti/bugvm

Iterator<UnitBox> it = getAllUnitBoxes().iterator();
while(it.hasNext()) {
  UnitBox box = it.next();

代码示例来源:origin: com.bugvm/bugvm-soot

Iterator<UnitBox> it = getAllUnitBoxes().iterator();
while(it.hasNext()) {
  UnitBox box = it.next();

相关文章