MCPcopy Create free account
hub / github.com/avast/retdec / run

Method run

src/bin2llvmir/optimizations/decoder/decoder.cpp:98–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98bool Decoder::run()
99{
100 if (_config == nullptr || _image == nullptr)
101 {
102 LOG << "[ABORT] Config or object image is not available.\n";
103 return false;
104 }
105
106 initTranslator();
107 initDryRunCsInstruction();
108 initEnvironment();
109 initRanges();
110 initJumpTargets();
111
112 LOG << _ranges << std::endl;
113 LOG << _jumpTargets << std::endl;
114
115 decode();
116
117 if (debug_enabled && fs::exists(_config->getOutputDirectory()))
118 {
119 dumpModuleToFile(_module, _config->getOutputDirectory());
120 }
121
122 resolvePseudoCalls();
123 patternsRecognize();
124 finalizePseudoCalls();
125
126 if (debug_enabled && fs::exists(_config->getOutputDirectory()))
127 {
128 dumpControFlowToJson(_module, _config->getOutputDirectory());
129 dumpModuleToFile(_module, _config->getOutputDirectory());
130 }
131
132 initConfigFunctions();
133
134 if (debug_enabled && fs::exists(_config->getOutputDirectory()))
135 {
136 dumpModuleToFile(_module, _config->getOutputDirectory());
137 }
138
139 initializeGpReg_mips();
140
141 return false;
142}
143
144void Decoder::decode()
145{

Callers

nothing calls this directly

Calls 3

dumpModuleToFileFunction · 0.85
dumpControFlowToJsonFunction · 0.85
getOutputDirectoryMethod · 0.80

Tested by

no test coverage detected