Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | RZ_SERIALIZE_ERR(res, ...) |
Push an error to the local RzSerializeResultInfo \res RzSerializeInfoResult *. More... | |
#define | RZ_KEY_PARSER_UNKNOWN -1 |
#define | RZ_KEY_PARSER_SWITCH(parser, key) |
switch-like macro over RzKeyParser values More... | |
#define | RZ_KEY_PARSER_JSON(parser, json, child, body) |
Iterate over all keys in a json object and call RZ_KEY_PARSER_SWITCH on each. More... | |
#define | RZ_SERIALIZE_SUB(db, subdb, res, ns, rip) |
Get an sdb sub-namespace or fail. More... | |
#define | RZ_SERIALIZE_SUB_DO(db, subdb, res, ns, call, rip) |
Get an sdb sub-namespace and evaluate call or fail. More... | |
Typedefs | |
typedef RzList | RzSerializeResultInfo |
Detailed info about a (de)serialization result. More... | |
typedef HtPP | RzKeyParser |
Hashtable-based key parser to prevent strcmp chains. More... | |
Functions | |
static RzSerializeResultInfo * | rz_serialize_result_info_new (void) |
static void | rz_serialize_result_info_free (RzSerializeResultInfo *info) |
static RzKeyParser * | rz_key_parser_new (void) |
static void | rz_key_parser_free (RzKeyParser *parser) |
static void | rz_key_parser_add (RzKeyParser *parser, const char *key, int val) |
#define RZ_KEY_PARSER_JSON | ( | parser, | |
json, | |||
child, | |||
body | |||
) |
Iterate over all keys in a json object and call RZ_KEY_PARSER_SWITCH on each.
parser | RzKeyParser * |
json | RzJson * |
child | var name for the RzJson *child |
body | code block with cases |
Definition at line 82 of file rz_serialize.h.
#define RZ_KEY_PARSER_SWITCH | ( | parser, | |
key | |||
) |
switch-like macro over RzKeyParser values
parser | RzKeyParser * |
key | const char * |
Definition at line 67 of file rz_serialize.h.
#define RZ_KEY_PARSER_UNKNOWN -1 |
Definition at line 60 of file rz_serialize.h.
#define RZ_SERIALIZE_ERR | ( | res, | |
... | |||
) |
Push an error to the local RzSerializeResultInfo \res RzSerializeInfoResult *.
... | printf-style arguments to be pushed as the error to res |
Definition at line 33 of file rz_serialize.h.
#define RZ_SERIALIZE_SUB | ( | db, | |
subdb, | |||
res, | |||
ns, | |||
rip | |||
) |
Get an sdb sub-namespace or fail.
db | Sdb * the Sdb from which to take the sub-namespace |
subdb | Sdb * where to put the sub-namespace |
res | RzSerializeResult * where to push an error on failure |
ns | const char * |
rip | code to execute if the function failed |
Example:
Sdb *subdb; RZ_SERIALIZE_SUB(db, subdb, res, "files", return false;) // do something with subdb
Definition at line 104 of file rz_serialize.h.
Get an sdb sub-namespace and evaluate call
or fail.
db | Sdb * the Sdb from which to take the sub-namespace |
subdb | Sdb * where to put the sub-namespace |
res | RzSerializeResult * where to push an error on failure |
ns | const char * |
call | function call |
rip | code to execute if the function failed |
Example:
Sdb *subdb; RZ_SERIALIZE_SUB_DO(db, subdb, res, "files", rz_serialize_io_files_load(subdb, io, res), return false;)
Definition at line 129 of file rz_serialize.h.
typedef HtPP RzKeyParser |
Hashtable-based key parser to prevent strcmp chains.
This enables string values to be used in a switch/case-like fashion.
Definition at line 46 of file rz_serialize.h.
typedef RzList RzSerializeResultInfo |
Detailed info about a (de)serialization result.
This is currently just a list of strings which may be warnings or detailed error messages.
Definition at line 16 of file rz_serialize.h.
|
inlinestatic |
Definition at line 56 of file rz_serialize.h.
References key, cmd_descs_generate::parser, and val.
Referenced by load_flags(), rz_serialize_analysis_blocks_load(), rz_serialize_analysis_diff_parser_new(), rz_serialize_analysis_functions_load(), rz_serialize_analysis_global_var_parser_new(), rz_serialize_analysis_hints_load(), rz_serialize_analysis_var_parser_new(), and rz_serialize_bp_parser_new().
|
inlinestatic |
Definition at line 52 of file rz_serialize.h.
References cmd_descs_generate::parser.
Referenced by load_flags(), rz_serialize_analysis_blocks_load(), rz_serialize_analysis_diff_parser_free(), rz_serialize_analysis_functions_load(), rz_serialize_analysis_global_var_load(), rz_serialize_analysis_global_var_parser_free(), rz_serialize_analysis_hints_load(), rz_serialize_analysis_var_parser_free(), and rz_serialize_bp_load().
|
inlinestatic |
Definition at line 48 of file rz_serialize.h.
Referenced by load_flags(), rz_serialize_analysis_blocks_load(), rz_serialize_analysis_diff_parser_new(), rz_serialize_analysis_functions_load(), rz_serialize_analysis_global_var_parser_new(), rz_serialize_analysis_hints_load(), rz_serialize_analysis_var_parser_new(), and rz_serialize_bp_parser_new().
|
inlinestatic |
Definition at line 22 of file rz_serialize.h.
References info(), and rz_list_free().
Referenced by rz_core_project_load_for_cli().
|
inlinestatic |
Definition at line 18 of file rz_serialize.h.
References free(), and rz_list_newf().
Referenced by rz_core_project_load_for_cli().