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

Method presentCompiler

src/fileinfo/file_presentation/plain_presentation.cpp:360–390  ·  view source on GitHub ↗

* Present information about used compiler (or packer) */

Source from the content-addressed store, hash-verified

358 * Present information about used compiler (or packer)
359 */
360void PlainPresentation::presentCompiler() const
361{
362 for(std::size_t i = 0, e = fileinfo.getNumberOfDetectedCompilers(); i < e; ++i)
363 {
364 const DetectResult& tool = fileinfo.toolInfo.detectedTools[i];
365
366 Log::info() << "Detected tool : " << tool.name;
367 if (!tool.versionInfo.empty())
368 {
369 Log::info() << " (" << tool.versionInfo << ")";
370 }
371 if (!tool.additionalInfo.empty())
372 {
373 Log::info() << " " << tool.additionalInfo;
374 }
375 Log::info() << " (" << toolTypeToString(tool.type) << ")";
376 if (tool.source == DetectionMethod::SIGNATURE)
377 {
378 std::string nibbles = tool.impCount ? "nibbles" : "nibble";
379 auto ratio = static_cast<double>(tool.agreeCount) / tool.impCount * 100;
380
381 Log::info() << ", " << tool.agreeCount << " from " << tool.impCount << " significant " << nibbles;
382 Log::info() << " (" << ratio << "%)";
383 }
384 else
385 {
386 Log::info() << ", " << detectionMetodToString(tool.source);
387 }
388 Log::info() << "\n";
389 }
390}
391
392/**
393 * Present information about original programming language(s)

Callers

nothing calls this directly

Calls 4

toolTypeToStringFunction · 0.85
detectionMetodToStringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected