retdec
|
#include <file_section.h>
Public Member Functions | |
Getters | |
std::string | getName () const |
std::string | getType () const |
std::string | getCrc32 () const |
std::string | getMd5 () const |
std::string | getSha256 () const |
std::string | getIndexStr () const |
std::string | getOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSizeInFileStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getEntrySizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getStartAddressStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSizeInMemoryStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getRelocationsOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getNumberOfRelocationsStr () const |
std::string | getLineNumbersOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getNumberOfLineNumbersStr () const |
std::string | getMemoryAlignmentStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getLinkToAnotherSectionStr () const |
std::string | getExtraInfoStr () const |
std::string | getLineOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getRelocationsLineOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getEntropyStr (std::ios_base &(*format)(std::ios_base &)) const |
unsigned long long | getFlagsSize () const |
unsigned long long | getFlags () const |
std::string | getFlagsStr () const |
std::size_t | getNumberOfFlagsDescriptors () const |
void | getFlagsDescriptors (std::vector< std::string > &desc, std::vector< std::string > &abb) const |
Setters | |
void | setName (const std::string &name) |
void | setType (std::string type) |
void | setCrc32 (std::string sectionCrc32) |
void | setMd5 (std::string sectionMd5) |
void | setSha256 (std::string sectionSha256) |
void | setIndex (unsigned long long sectionIndex) |
void | setOffset (unsigned long long sectionOffset) |
void | setSizeInFile (unsigned long long size) |
void | setEntrySize (unsigned long long sizeOfOneEntry) |
void | setStartAddress (unsigned long long memoryAddress) |
void | setSizeInMemory (unsigned long long size) |
void | setRelocationsOffset (unsigned long long relocOffset) |
void | setNumberOfRelocations (unsigned long long relocations) |
void | setLineNumbersOffset (unsigned long long lineNumOffset) |
void | setNumberOfLineNumbers (unsigned long long lineNumbers) |
void | setMemoryAlignment (unsigned long long alignment) |
void | setLinkToAnotherSection (unsigned long long link) |
void | setExtraInfo (unsigned long long extraInformation) |
void | setLineOffset (unsigned long long sectionOffset) |
void | setRelocationsLineOffset (unsigned long long relocOffset) |
void | setEntropy (double entr) |
void | setFlagsSize (unsigned long long flagsSize) |
void | setFlags (unsigned long long flags) |
Other methods | |
void | addFlagsDescriptor (std::string descriptor, std::string abbreviation) |
void | clearFlagsDescriptors () |
Private Attributes | |
std::string | sectionName |
name of section More... | |
std::string | sectionType |
type of section More... | |
std::string | crc32 |
CRC32 of section content. More... | |
std::string | md5 |
MD5 of section content. More... | |
std::string | sha256 |
SHA256 of section content. More... | |
unsigned long long | index = std::numeric_limits<unsigned long long>::max() |
index of section More... | |
unsigned long long | offset = std::numeric_limits<unsigned long long>::max() |
offset in file More... | |
unsigned long long | sizeInFile = std::numeric_limits<unsigned long long>::max() |
size of section in file More... | |
unsigned long long | entrySize = std::numeric_limits<unsigned long long>::max() |
size of one entry in section More... | |
unsigned long long | startAddress = std::numeric_limits<unsigned long long>::max() |
start address in memory More... | |
unsigned long long | sizeInMemory = std::numeric_limits<unsigned long long>::max() |
size of section in memory More... | |
unsigned long long | relocationsOffset = std::numeric_limits<unsigned long long>::max() |
offset of relocation entries for this section More... | |
unsigned long long | numberOfRelocations = std::numeric_limits<unsigned long long>::max() |
number of relocation entries for this section More... | |
unsigned long long | lineNumbersOffset = std::numeric_limits<unsigned long long>::max() |
offset of line-number entries for this section More... | |
unsigned long long | numberOfLineNumbers = std::numeric_limits<unsigned long long>::max() |
number of line-number entries for this section More... | |
unsigned long long | memoryAlignment = std::numeric_limits<unsigned long long>::max() |
alignment in memory More... | |
unsigned long long | linkToSection = std::numeric_limits<unsigned long long>::max() |
link to another section More... | |
unsigned long long | extraInfo = std::numeric_limits<unsigned long long>::max() |
extra information about section More... | |
unsigned long long | lineOffset = std::numeric_limits<unsigned long long>::max() |
start line in file More... | |
unsigned long long | relocationsLineOffset = std::numeric_limits<unsigned long long>::max() |
start line of relocation entries for this section More... | |
double | entropy = std::numeric_limits<double>::min() |
section data entropy More... | |
Flags | flags |
section flags More... | |
Class for save information about section
Value std::numeric_limits<unsigned long long>::max()/min() mean unspecified value or error for numeric types.
void retdec::fileinfo::FileSection::addFlagsDescriptor | ( | std::string | descriptor, |
std::string | abbreviation | ||
) |
Add flag descriptor
descriptor | Descriptor (full description of flag) |
abbreviation | Abbreviation (short description of flag) |
void retdec::fileinfo::FileSection::clearFlagsDescriptors | ( | ) |
Delete all flags descriptors
std::string retdec::fileinfo::FileSection::getCrc32 | ( | ) | const |
Get CRC32
std::string retdec::fileinfo::FileSection::getEntropyStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get entropy of section data
std::string retdec::fileinfo::FileSection::getEntrySizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of one entry of section
std::string retdec::fileinfo::FileSection::getExtraInfoStr | ( | ) | const |
Get section extra information
unsigned long long retdec::fileinfo::FileSection::getFlags | ( | ) | const |
Get flags of section
void retdec::fileinfo::FileSection::getFlagsDescriptors | ( | std::vector< std::string > & | desc, |
std::vector< std::string > & | abb | ||
) | const |
Get flags descriptors and its abbreviations
desc | Vector for save descriptors |
abb | Vector for save abbreviations of descriptors |
It is guaranteed that the number of stored descriptors and abbreviations are the same
unsigned long long retdec::fileinfo::FileSection::getFlagsSize | ( | ) | const |
Get flags size
std::string retdec::fileinfo::FileSection::getFlagsStr | ( | ) | const |
Get flags of section
std::string retdec::fileinfo::FileSection::getIndexStr | ( | ) | const |
Get section index
std::string retdec::fileinfo::FileSection::getLineNumbersOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get offset of line-number entries for section
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getLineOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get start line of section in file
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getLinkToAnotherSectionStr | ( | ) | const |
Get link to another section
std::string retdec::fileinfo::FileSection::getMd5 | ( | ) | const |
Get MD5
std::string retdec::fileinfo::FileSection::getMemoryAlignmentStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get section memory alignment
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getName | ( | ) | const |
Get section name
std::size_t retdec::fileinfo::FileSection::getNumberOfFlagsDescriptors | ( | ) | const |
Get number of flags descriptors
std::string retdec::fileinfo::FileSection::getNumberOfLineNumbersStr | ( | ) | const |
Get number of line-number entries for section
std::string retdec::fileinfo::FileSection::getNumberOfRelocationsStr | ( | ) | const |
Get number of relocation entries for section
std::string retdec::fileinfo::FileSection::getOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get offset of section in file
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getRelocationsLineOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get start line of relocations for this section
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getRelocationsOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get offset of relocation entries for section
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getSha256 | ( | ) | const |
Get SHA256
std::string retdec::fileinfo::FileSection::getSizeInFileStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get section size in file
std::string retdec::fileinfo::FileSection::getSizeInMemoryStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of section in memory
std::string retdec::fileinfo::FileSection::getStartAddressStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get start address of section in memory
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSection::getType | ( | ) | const |
Get section type
void retdec::fileinfo::FileSection::setCrc32 | ( | std::string | sectionCrc32 | ) |
Set section CRC32
sectionCrc32 | CRC32 of section content |
void retdec::fileinfo::FileSection::setEntropy | ( | double | entr | ) |
Set section data entropy
entr | Data entropy of section |
void retdec::fileinfo::FileSection::setEntrySize | ( | unsigned long long | sizeOfOneEntry | ) |
Set size of one entry in section
sizeOfOneEntry | Size of one entry in section |
void retdec::fileinfo::FileSection::setExtraInfo | ( | unsigned long long | extraInformation | ) |
Set section extra information
extraInformation | Section extra information |
void retdec::fileinfo::FileSection::setFlags | ( | unsigned long long | flagsValue | ) |
Set section flags
flagsValue | Section flags |
void retdec::fileinfo::FileSection::setFlagsSize | ( | unsigned long long | flagsSize | ) |
Set number of section flags
flagsSize | Number of section flags |
void retdec::fileinfo::FileSection::setIndex | ( | unsigned long long | sectionIndex | ) |
Set index of section
sectionIndex | Index of section |
void retdec::fileinfo::FileSection::setLineNumbersOffset | ( | unsigned long long | lineNumOffset | ) |
Set offset of line-number entries for section
lineNumOffset | Offset of line-number entries for section |
void retdec::fileinfo::FileSection::setLineOffset | ( | unsigned long long | sectionOffset | ) |
Set line offset
sectionOffset | Line offset of section |
void retdec::fileinfo::FileSection::setLinkToAnotherSection | ( | unsigned long long | link | ) |
Set link to another section
link | Link to another file section |
void retdec::fileinfo::FileSection::setMd5 | ( | std::string | sectionMd5 | ) |
Set section MD5
sectionMd5 | MD5 of section content |
void retdec::fileinfo::FileSection::setMemoryAlignment | ( | unsigned long long | alignment | ) |
Set section memory alignment
alignment | Section nemory alignment |
void retdec::fileinfo::FileSection::setName | ( | const std::string & | name | ) |
Set section name
name | Section name |
void retdec::fileinfo::FileSection::setNumberOfLineNumbers | ( | unsigned long long | lineNumbers | ) |
Set number of line-number entries for section
lineNumbers | Number of line-number entries for section |
void retdec::fileinfo::FileSection::setNumberOfRelocations | ( | unsigned long long | relocations | ) |
Set number of relocation entries for section
relocations | Number of relocation entries for section |
void retdec::fileinfo::FileSection::setOffset | ( | unsigned long long | sectionOffset | ) |
Set section offset
sectionOffset | Section offset |
void retdec::fileinfo::FileSection::setRelocationsLineOffset | ( | unsigned long long | relocOffset | ) |
Set relocations line offset
relocOffset | Relocations line offset for this section |
void retdec::fileinfo::FileSection::setRelocationsOffset | ( | unsigned long long | relocOffset | ) |
Set offset of relocation entries for section
relocOffset | Offset of relocation entries for section |
void retdec::fileinfo::FileSection::setSha256 | ( | std::string | sectionSha256 | ) |
Set section SHA256
sectionSha256 | SHA256 of section content |
void retdec::fileinfo::FileSection::setSizeInFile | ( | unsigned long long | size | ) |
Set section size in file
size | Section size in file |
void retdec::fileinfo::FileSection::setSizeInMemory | ( | unsigned long long | size | ) |
Set size of section in memory
size | Size of section in memory |
void retdec::fileinfo::FileSection::setStartAddress | ( | unsigned long long | memoryAddress | ) |
Set section memory address
memoryAddress | Start address of section in memory |
void retdec::fileinfo::FileSection::setType | ( | std::string | type | ) |
Set section type
type | Section type |
|
private |
CRC32 of section content.
|
private |
section data entropy
|
private |
size of one entry in section
|
private |
extra information about section
|
private |
section flags
|
private |
index of section
|
private |
offset of line-number entries for this section
|
private |
start line in file
|
private |
link to another section
|
private |
MD5 of section content.
|
private |
alignment in memory
|
private |
number of line-number entries for this section
|
private |
number of relocation entries for this section
|
private |
offset in file
|
private |
start line of relocation entries for this section
|
private |
offset of relocation entries for this section
|
private |
name of section
|
private |
type of section
|
private |
SHA256 of section content.
|
private |
size of section in file
|
private |
size of section in memory
|
private |
start address in memory