retdec
Public Member Functions | Private Attributes | List of all members
retdec::fileinfo::CoffDetector Class Reference

#include <coff_detector.h>

Inheritance diagram for retdec::fileinfo::CoffDetector:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileinfo::CoffDetector:
Collaboration graph
[legend]

Public Member Functions

 CoffDetector (std::string pathToInputFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
- Public Member Functions inherited from retdec::fileinfo::FileDetector
 FileDetector (const std::string &pathToInputFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
virtual ~FileDetector ()=default
 
void setConfigFile (retdec::config::Config &config)
 
void getAllInformation ()
 
const retdec::fileformat::FileFormatgetFileParser () const
 

Protected Member Functions

Detection methods
virtual void detectFileClass () override
 
virtual void detectArchitecture () override
 
virtual void detectFileType () override
 
virtual void getAdditionalInfo () override
 
virtual retdec::cpdetect::CompilerDetectorcreateCompilerDetector () const override
 
Pure virtual detection methods

Private Member Functions

Auxiliary detection methods
void getFileFlags ()
 
void getHeaderInfo ()
 
void getCoffSymbols ()
 
void getCoffRelocations ()
 
void getSections ()
 

Private Attributes

std::shared_ptr< CoffWrappercoffParser
 file parser More...
 

Additional Inherited Members

- Protected Attributes inherited from retdec::fileinfo::FileDetector
FileInformationfileInfo
 information about file More...
 
retdec::cpdetect::DetectParamscpParams
 parameters for detection of used compiler More...
 
retdec::config::ConfigfileConfig
 configuration of input file More...
 
std::shared_ptr< retdec::fileformat::FileFormatfileParser
 parser of input file More...
 
retdec::fileformat::LoadFlags loadFlags
 load flags for configurable running More...
 
bool loaded
 internal state of instance More...
 

Detailed Description

CoffDetector - find info about COFF binary file

Constructor & Destructor Documentation

◆ CoffDetector()

retdec::fileinfo::CoffDetector::CoffDetector ( std::string  pathToInputFile,
FileInformation finfo,
retdec::cpdetect::DetectParams searchPar,
retdec::fileformat::LoadFlags  loadFlags 
)

Constructor

Parameters
pathToInputFilePath to input file
finfoInstance of class for storing information about file
searchParParameters for detection of used compiler (or packer)
loadFlagsLoad flags

Member Function Documentation

◆ createCompilerDetector()

retdec::cpdetect::CompilerDetector * retdec::fileinfo::CoffDetector::createCompilerDetector ( ) const
overrideprotectedvirtual

Pointer to detector is dynamically allocated and must be released (otherwise there is a memory leak) More detailed description of this method is in the super class

Implements retdec::fileinfo::FileDetector.

◆ detectArchitecture()

void retdec::fileinfo::CoffDetector::detectArchitecture ( )
overrideprotectedvirtual

Detect of target architecture

Implements retdec::fileinfo::FileDetector.

◆ detectFileClass()

void retdec::fileinfo::CoffDetector::detectFileClass ( )
overrideprotectedvirtual

Detect class of file

Implements retdec::fileinfo::FileDetector.

◆ detectFileType()

void retdec::fileinfo::CoffDetector::detectFileType ( )
overrideprotectedvirtual

Detect of type of file

Implements retdec::fileinfo::FileDetector.

◆ getAdditionalInfo()

void retdec::fileinfo::CoffDetector::getAdditionalInfo ( )
overrideprotectedvirtual

Get additional information about file

Implements retdec::fileinfo::FileDetector.

◆ getCoffRelocations()

void retdec::fileinfo::CoffDetector::getCoffRelocations ( )
private

Get relocations from COFF relocation table

◆ getCoffSymbols()

void retdec::fileinfo::CoffDetector::getCoffSymbols ( )
private

Get symbols from COFF symbol table

◆ getFileFlags()

void retdec::fileinfo::CoffDetector::getFileFlags ( )
private

Get file flags

◆ getHeaderInfo()

void retdec::fileinfo::CoffDetector::getHeaderInfo ( )
private

Get information from file headers

◆ getSections()

void retdec::fileinfo::CoffDetector::getSections ( )
private

Get information about sections

Member Data Documentation

◆ coffParser

std::shared_ptr<CoffWrapper> retdec::fileinfo::CoffDetector::coffParser
private

file parser


The documentation for this class was generated from the following files: