| 1098 | |
| 1099 | |
| 1100 | char* 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 | |
| 1137 | size_t MediumLevelILInstructionBase::GetSSAVarVersion(const Variable& var) |
nothing calls this directly
no test coverage detected