MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / MediumLevelILInstructionBase

Class MediumLevelILInstructionBase

mediumlevelilinstruction.h:433–564  ·  view source on GitHub ↗

! \ingroup mediumlevelil */

Source from the content-addressed store, hash-verified

431 \ingroup mediumlevelil
432 */
433 struct MediumLevelILInstructionBase : public BNMediumLevelILInstruction
434 {
435#ifdef BINARYNINJACORE_LIBRARY
436 MediumLevelILFunction* function;
437#else
438 Ref<MediumLevelILFunction> function;
439#endif
440 size_t exprIndex, instructionIndex;
441
442 static _STD_UNORDERED_MAP<MediumLevelILOperandUsage, MediumLevelILOperandType> operandTypeForUsage;
443 static _STD_UNORDERED_MAP<BNMediumLevelILOperation, _STD_VECTOR<MediumLevelILOperandUsage>>
444 operationOperandUsage;
445 static _STD_UNORDERED_MAP<BNMediumLevelILOperation, _STD_UNORDERED_MAP<MediumLevelILOperandUsage, size_t>>
446 operationOperandIndex;
447
448 MediumLevelILOperandList GetOperands() const;
449
450 uint64_t GetRawOperandAsInteger(size_t operand) const;
451 ConstantData GetRawOperandAsConstantData(size_t operand) const;
452 size_t GetRawOperandAsIndex(size_t operand) const;
453 MediumLevelILInstruction GetRawOperandAsExpr(size_t operand) const;
454 Variable GetRawOperandAsVariable(size_t operand) const;
455 SSAVariable GetRawOperandAsSSAVariable(size_t operand) const;
456 SSAVariable GetRawOperandAsPartialSSAVariableSource(size_t operand) const;
457 MediumLevelILIndexList GetRawOperandAsIndexList(size_t operand) const;
458 MediumLevelILIndexMap GetRawOperandAsIndexMap(size_t operand) const;
459 MediumLevelILVariableList GetRawOperandAsVariableList(size_t operand) const;
460 MediumLevelILSSAVariableList GetRawOperandAsSSAVariableList(size_t operand) const;
461 MediumLevelILInstructionList GetRawOperandAsExprList(size_t operand) const;
462 PossibleValueSet GetRawOperandAsPossibleValueSet(size_t operand) const;
463
464 void UpdateRawOperand(size_t operandIndex, ExprId value);
465 void UpdateRawOperandAsSSAVariableList(size_t operandIndex, const _STD_VECTOR<SSAVariable>& vars);
466 void UpdateRawOperandAsExprList(size_t operandIndex, const _STD_VECTOR<MediumLevelILInstruction>& exprs);
467 void UpdateRawOperandAsExprList(size_t operandIndex, const _STD_VECTOR<size_t>& exprs);
468
469 RegisterValue GetValue() const;
470 PossibleValueSet GetPossibleValues(
471 const _STD_SET<BNDataFlowQueryOption>& options = _STD_SET<BNDataFlowQueryOption>()) const;
472 Confidence<Ref<Type>> GetType() const;
473
474 // Return (and leak) a string describing the instruction for debugger use
475 char* Dump() const;
476
477 size_t GetSSAVarVersion(const Variable& var);
478 size_t GetSSAMemoryVersion();
479 Variable GetVariableForRegister(uint32_t reg);
480 Variable GetVariableForFlag(uint32_t flag);
481 Variable GetVariableForStackLocation(int64_t offset);
482
483 PossibleValueSet GetPossibleSSAVarValues(const SSAVariable& var);
484 RegisterValue GetRegisterValue(uint32_t reg);
485 RegisterValue GetRegisterValueAfter(uint32_t reg);
486 PossibleValueSet GetPossibleRegisterValues(uint32_t reg);
487 PossibleValueSet GetPossibleRegisterValuesAfter(uint32_t reg);
488 RegisterValue GetFlagValue(uint32_t flag);
489 RegisterValue GetFlagValueAfter(uint32_t flag);
490 PossibleValueSet GetPossibleFlagValues(uint32_t flag);

Callers

nothing calls this directly

Tested by

no test coverage detected