retdec
Classes | Enumerations | Functions
retdec::loader Namespace Reference

Classes

class  CoffImage
 
class  ElfImage
 
class  Image
 
class  IntelHexImage
 
class  MachOImage
 
class  PeImage
 
class  RawDataImage
 
class  Segment
 
class  SegmentDataSource
 
class  NameGenerator
 
class  OverlapResolver
 

Enumerations

enum class  Overlap {
  None , OverStart , InMiddle , OverEnd ,
  Full
}
 

Functions

std::unique_ptr< ImagecreateImage (const std::string &filePath, bool isRaw=false)
 
std::unique_ptr< ImagecreateImage (const std::shared_ptr< retdec::fileformat::FileFormat > &fileFormat)
 
std::uint64_t distanceBetween (std::uint64_t value1, std::uint64_t value2)
 

Enumeration Type Documentation

◆ Overlap

Defines different type of overlaps that can happen.

Enumerator
None 

No overlap.

OverStart 

Overlap over starting value.

InMiddle 

Overlap somewhere in the middle of the range.

OverEnd 

Overlap over ending value.

Full 

Full overlap of one range over another.

Function Documentation

◆ createImage() [1/2]

std::unique_ptr< Image > retdec::loader::createImage ( const std::shared_ptr< retdec::fileformat::FileFormat > &  fileFormat)

Create instance of Image class from existing file format instance. If the input file cannot be loaded, function will return nullptr, Loaded image does not become owner of the provided FileFormat.

Parameters
fileFormatFile format.
Returns
Pointer to instance of Image class or nullptr if any error

◆ createImage() [2/2]

std::unique_ptr< Image > retdec::loader::createImage ( const std::string &  filePath,
bool  isRaw 
)

Create instance of Image class from path to file. If the input file cannot be loaded, function will return nullptr. Loaded image becomes owner of the provided FileFormat.

Parameters
filePathPath to input file.
isRawIs the input a raw binary file format?
Returns
Pointer to instance of Image class or nullptr if any error

◆ distanceBetween()

std::uint64_t retdec::loader::distanceBetween ( std::uint64_t  value1,
std::uint64_t  value2 
)

Returns the distance between two values. The distance is absolute value of their subtraction.

Parameters
value1First value.
value2Second value.
Returns
The distance between the values.