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

Method Dump

mediumlevelilinstruction.cpp:1100–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098
1099
1100char* MediumLevelILInstructionBase::Dump() const
1101{
1102 vector<InstructionTextToken> tokens;
1103#ifdef BINARYNINJACORE_LIBRARY
1104 bool success = function->GetExprText(function->GetFunction(), function->GetArchitecture(), *this, tokens, new DisassemblySettings());
1105#else
1106 bool success = function->GetExprText(function->GetArchitecture(), exprIndex, tokens);
1107#endif
1108 if (success)
1109 {
1110 string text;
1111 if (exprIndex != BN_INVALID_EXPR && (exprIndex & 0xffff000000000000) == 0)
1112 {
1113 text += "[expr " + to_string(exprIndex) + "] ";
1114 }
1115 if (instructionIndex != BN_INVALID_EXPR && (instructionIndex & 0xffff000000000000) == 0)
1116 {
1117 text += "[instr " + to_string(instructionIndex) + "] ";
1118 }
1119 Ref<Type> type = GetType();
1120 if (type)
1121 {
1122 text += "[type: " + type->GetString() + "] ";
1123 }
1124 for (auto& token: tokens)
1125 {
1126 text += token.text;
1127 }
1128 return strdup(text.c_str());
1129 }
1130 else
1131 {
1132 return strdup("???");
1133 }
1134}
1135
1136
1137size_t MediumLevelILInstructionBase::GetSSAVarVersion(const Variable& var)

Callers

nothing calls this directly

Calls 6

GetTypeFunction · 0.85
c_strMethod · 0.80
GetExprTextMethod · 0.45
GetFunctionMethod · 0.45
GetArchitectureMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected