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

Method Dump

lowlevelilinstruction.cpp:1778–1807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1776
1777
1778char* LowLevelILInstructionBase::Dump() const
1779{
1780 vector<InstructionTextToken> tokens;
1781#ifdef BINARYNINJACORE_LIBRARY
1782 bool success = function->GetExprText(function->GetFunction(), function->GetArchitecture(), *this, tokens);
1783#else
1784 bool success = function->GetExprText(function->GetArchitecture(), exprIndex, tokens);
1785#endif
1786 if (success)
1787 {
1788 string text;
1789 if (exprIndex != BN_INVALID_EXPR && (exprIndex & 0xffff000000000000) == 0)
1790 {
1791 text += "[expr " + to_string(exprIndex) + "] ";
1792 }
1793 if (instructionIndex != BN_INVALID_EXPR && (instructionIndex & 0xffff000000000000) == 0)
1794 {
1795 text += "[instr " + to_string(instructionIndex) + "] ";
1796 }
1797 for (auto& token: tokens)
1798 {
1799 text += token.text;
1800 }
1801 return strdup(text.c_str());
1802 }
1803 else
1804 {
1805 return strdup("???");
1806 }
1807}
1808
1809
1810void LowLevelILInstructionBase::Replace(ExprId expr)

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
GetExprTextMethod · 0.45
GetFunctionMethod · 0.45
GetArchitectureMethod · 0.45

Tested by

no test coverage detected