retdec
|
New frontend replacing llvm-ar. More...
#include <limits>
#include <vector>
#include <rapidjson/document.h>
#include <rapidjson/prettywriter.h>
#include "retdec/utils/filesystem.h"
#include "retdec/utils/io/log.h"
#include "retdec/ar-extractor/archive_wrapper.h"
#include "retdec/ar-extractor/detection.h"
Enumerations | |
enum class | ACTION { LIST , EXTRACT_ALL , EXTRACT_NAME , EXTRACT_INDEX , CHECK_AR , CHECK_THIN , CHECK_NORMAL , OBJECT_COUNT } |
Functions | |
void | printUsage (Logger &log) |
void | printErrorPlainText (const std::string &message) |
void | printErrorJson (const std::string &message) |
int | printErrorAndReturn (const std::string &message) |
int | printTable (const ArchiveWrapper &archive, bool fixNames=true, bool isNum=true) |
bool | getArgFromArgs (const std::size_t index, const std::vector< std::string > &args, std::string &result) |
int | processArguments (const std::vector< std::string > &args) |
int | main (int argc, char **argv) |
Variables | |
bool | isJson = false |
New frontend replacing llvm-ar.
|
strong |
Possible actions.
bool getArgFromArgs | ( | const std::size_t | index, |
const std::vector< std::string > & | args, | ||
std::string & | result | ||
) |
Get argument on given position.
index | argument position |
args | vector with arguments |
result | argument on position |
true
if argument exists
, false
otherwise int main | ( | int | argc, |
char ** | argv | ||
) |
int printErrorAndReturn | ( | const std::string & | message | ) |
Print error and return non-zero.
message | error message |
void printErrorJson | ( | const std::string & | message | ) |
Print error in JSON format.
message | error message |
void printErrorPlainText | ( | const std::string & | message | ) |
Print error in plain-text.
message | error message |
int printTable | ( | const ArchiveWrapper & | archive, |
bool | fixNames = true , |
||
bool | isNum = true |
||
) |
Print archive table.
archive | target archive |
fixNames | names will be fixed if true |
isNum | list will be numbered if true |
void printUsage | ( | Logger & | log | ) |
Print usage.
log | usage logger object |
int processArguments | ( | const std::vector< std::string > & | args | ) |
Process inputs.
args | vector with command line arguments |
bool isJson = false |
Output style selector.
Made this global so it does not have to be passed around.