当前位置: 首页>>代码示例>>C++>>正文


C++ AnalysisProcessor::assignmentSpreadTaintExprRegReg方法代码示例

本文整理汇总了C++中AnalysisProcessor::assignmentSpreadTaintExprRegReg方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisProcessor::assignmentSpreadTaintExprRegReg方法的具体用法?C++ AnalysisProcessor::assignmentSpreadTaintExprRegReg怎么用?C++ AnalysisProcessor::assignmentSpreadTaintExprRegReg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AnalysisProcessor的用法示例。


在下文中一共展示了AnalysisProcessor::assignmentSpreadTaintExprRegReg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: regReg

void TestIRBuilder::regReg(AnalysisProcessor &ap, Inst &inst) const {
  SymbolicExpression *se;
  smt2lib::smtAstAbstractNode *expr, *op1, *op2;
  auto reg1 = this->operands[0].getReg();
  auto reg2 = this->operands[1].getReg();
  auto regSize1 = this->operands[0].getReg().getSize();
  auto regSize2 = this->operands[1].getReg().getSize();

  /* Create the SMT semantic */
  op1 = ap.buildSymbolicRegOperand(reg1, regSize1);
  op2 = ap.buildSymbolicRegOperand(reg2, regSize2);

  // Final expr
  expr = smt2lib::bvand(op1, op2);

  /* Create the symbolic expression */
  se = ap.createSE(inst, expr);

  /* Apply the taint */
  ap.assignmentSpreadTaintExprRegReg(se, reg1, reg2);

  /* Add the symbolic flags expression to the current inst */
  EflagsBuilder::clearFlag(inst, ap, ID_TMP_CF, "Clears carry flag");
  EflagsBuilder::clearFlag(inst, ap, ID_TMP_OF, "Clears overflow flag");
  EflagsBuilder::pf(inst, se, ap, regSize1);
  EflagsBuilder::sf(inst, se, ap, regSize1);
  EflagsBuilder::zf(inst, se, ap, regSize1);
}
开发者ID:v0re,项目名称:Triton,代码行数:28,代码来源:TestIRBuilder.cpp

示例2: regReg

void TestIRBuilder::regReg(AnalysisProcessor &ap, Inst &inst) const {
  SymbolicElement   *se;
  std::stringstream expr, op1, op2;
  uint64            reg1     = this->operands[0].getValue();
  uint64            reg2     = this->operands[1].getValue();
  uint32            regSize1 = this->operands[0].getSize();
  uint32            regSize2 = this->operands[1].getSize();

  /* Create the SMT semantic */
  op1 << ap.buildSymbolicRegOperand(reg1, regSize1);
  op2 << ap.buildSymbolicRegOperand(reg2, regSize2);

  // Final expr
  expr << smt2lib::bvand(op1.str(), op2.str());

  /* Create the symbolic element */
  se = ap.createSE(inst, expr);

  /* Apply the taint */
  ap.assignmentSpreadTaintExprRegReg(se, reg1, reg2);

  /* Add the symbolic flags element to the current inst */
  EflagsBuilder::clearFlag(inst, ap, ID_CF, "Clears carry flag");
  EflagsBuilder::clearFlag(inst, ap, ID_OF, "Clears overflow flag");
  EflagsBuilder::pf(inst, se, ap);
  EflagsBuilder::sf(inst, se, ap, regSize1);
  EflagsBuilder::zf(inst, se, ap, regSize1);
}
开发者ID:AmesianX,项目名称:Triton-windows,代码行数:28,代码来源:TestIRBuilder.cpp

示例3: regReg

void CmpIRBuilder::regReg(AnalysisProcessor &ap, Inst &inst) const {
    SymbolicExpression *se;
    smt2lib::smtAstAbstractNode *expr, *op1, *op2;
    uint64 reg1     = this->operands[0].getValue();
    uint64 reg2     = this->operands[1].getValue();
    uint32 regSize1 = this->operands[0].getSize();
    uint32 regSize2 = this->operands[1].getSize();

    /* Create the SMT semantic */
    op1 = ap.buildSymbolicRegOperand(reg1, regSize1);
    op2 = ap.buildSymbolicRegOperand(reg2, regSize2);

    /* Final expr */
    expr = smt2lib::bvsub(op1, op2);

    /* Create the symbolic expression */
    se = ap.createSE(inst, expr, "Temporary Compare");

    /* Apply the taint */
    ap.assignmentSpreadTaintExprRegReg(se, reg1, reg2);

    /* Add the symbolic flags expression to the current inst */
    EflagsBuilder::af(inst, se, ap, regSize1, op1, op2);
    EflagsBuilder::cfSub(inst, se, ap, op1, op2);
    EflagsBuilder::ofSub(inst, se, ap, regSize1, op1, op2);
    EflagsBuilder::pf(inst, se, ap, regSize1);
    EflagsBuilder::sf(inst, se, ap, regSize1);
    EflagsBuilder::zf(inst, se, ap, regSize1);
}
开发者ID:Jinmo,项目名称:Triton,代码行数:29,代码来源:CmpIRBuilder.cpp


注:本文中的AnalysisProcessor::assignmentSpreadTaintExprRegReg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。