The IntelHexParser class - Intel HEX semantical analysis.
More...
#include <intel_hex_parser.h>
|
|
static unsigned long long | strToInt (const std::string &str) |
|
static bool | isHexadec (char c) |
|
static bool | isHexadec (const std::string &vec) |
|
The IntelHexParser class - Intel HEX semantical analysis.
◆ IntelHexParser()
retdec::fileformat::IntelHexParser::IntelHexParser |
( |
| ) |
|
◆ getEntryPoint()
unsigned long long retdec::fileformat::IntelHexParser::getEntryPoint |
( |
| ) |
const |
Get entry point
- Returns
- Entry point
◆ getSectionsByAlignment()
std::vector< IntelHexSection > retdec::fileformat::IntelHexParser::getSectionsByAlignment |
( |
unsigned long long |
alignByValue = 0x10000 | ) |
|
Divide sections to more sections by chosen alignment. Function won't affect original vector.
- Parameters
-
alignByValue | size of alignment blocks (default 0x10000) |
- Returns
- Result sections
◆ handleData()
void retdec::fileformat::IntelHexParser::handleData |
( |
const IntelHexToken & |
token | ) |
|
|
private |
Parse data Intel HEX data record
- Parameters
-
token | Data token received from tokenizer |
◆ hasEntryPoint()
bool retdec::fileformat::IntelHexParser::hasEntryPoint |
( |
| ) |
const |
Check if entry point record is in input file
- Returns
true
if entry point record is in input file, false
otherwise
◆ isHexadec() [1/2]
bool retdec::fileformat::IntelHexParser::isHexadec |
( |
char |
c | ) |
|
|
static |
Checks whether character is hexadecimal digit
- Parameters
-
- Returns
true
if c is hexadecimal ASCII digit, false
otherwise
◆ isHexadec() [2/2]
bool retdec::fileformat::IntelHexParser::isHexadec |
( |
const std::string & |
vec | ) |
|
|
static |
Checks whether characters are hexadecimal digits
- Parameters
-
vec | Vector of characters to check |
- Returns
true
if vec contains only hexadecimal ASCII digits
◆ parse()
bool retdec::fileformat::IntelHexParser::parse |
( |
| ) |
|
|
private |
Parsing
- Returns
true
on success, false
otherwise
◆ parseFile()
bool retdec::fileformat::IntelHexParser::parseFile |
( |
const std::string & |
pathToFile | ) |
|
Parse Intel HEX
- Parameters
-
pathToFile | Path to input Intel HEX file |
- Returns
true
on success, false
otherwise
◆ parseStream()
bool retdec::fileformat::IntelHexParser::parseStream |
( |
std::istream & |
inputStream | ) |
|
Parse Intel HEX
- Parameters
-
inputStream | Reference to istream to parse |
- Returns
true
on success, false
otherwise
◆ setCSIP()
void retdec::fileformat::IntelHexParser::setCSIP |
( |
const IntelHexToken & |
token | ) |
|
|
private |
Sets value of entry point
- Parameters
-
◆ setEIP()
void retdec::fileformat::IntelHexParser::setEIP |
( |
const IntelHexToken & |
token | ) |
|
|
private |
Sets value of entry point
- Parameters
-
◆ setOffset()
void retdec::fileformat::IntelHexParser::setOffset |
( |
const IntelHexToken & |
token | ) |
|
|
private |
Sets new address offset value
- Parameters
-
token | Extended address token |
◆ setSegment()
void retdec::fileformat::IntelHexParser::setSegment |
( |
const IntelHexToken & |
token | ) |
|
|
private |
Sets new segment value
- Parameters
-
◆ strToInt()
unsigned long long retdec::fileformat::IntelHexParser::strToInt |
( |
const std::string & |
str | ) |
|
|
static |
Converts hexadecimal characters to integer
- Parameters
-
- Returns
- Decimal value
- Warning
- No validity control, use only on valid data
◆ actualAddress
Address of last byte saved to actual section.
◆ actualSection
Actual section (one section may be constructed from more than one record)
◆ CS
std::uint16_t retdec::fileformat::IntelHexParser::CS |
|
private |
Entry point segment (CS register)
◆ EIP
std::uint32_t retdec::fileformat::IntelHexParser::EIP |
|
private |
Entry point (EIP register)
◆ errorDesc
std::string retdec::fileformat::IntelHexParser::errorDesc |
◆ hasEP
bool retdec::fileformat::IntelHexParser::hasEP |
|
private |
true
if entry point record is in file
◆ index
unsigned long long retdec::fileformat::IntelHexParser::index |
|
private |
◆ IP
std::uint16_t retdec::fileformat::IntelHexParser::IP |
|
private |
Entry point instruction (IP register)
◆ mode
bool retdec::fileformat::IntelHexParser::mode |
|
private |
true
when 32bit address mode, false
when 20bit segment mode
◆ sections
◆ segmenetAddress
std::uint16_t retdec::fileformat::IntelHexParser::segmenetAddress |
|
private |
◆ tokenizer
◆ upperAddress
std::uint16_t retdec::fileformat::IntelHexParser::upperAddress |
|
private |
Upper 16bits of 32bit address.
The documentation for this class was generated from the following files:
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/include/retdec/fileformat/file_format/intel_hex/intel_hex_parser/intel_hex_parser.h
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/src/fileformat/file_format/intel_hex/intel_hex_parser/intel_hex_parser.cpp