Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_project.h>
Go to the source code of this file.
Macros | |
#define | RZ_PROJECT_KEY_TYPE "type" |
#define | RZ_PROJECT_KEY_VERSION "version" |
#define | RZ_PROJECT_TYPE "rizin rz-db project" |
Functions | |
RZ_API RZ_NONNULL const char * | rz_project_err_message (RzProjectErr err) |
RZ_API RzProjectErr | rz_project_save (RzCore *core, RzProject *prj, const char *file) |
RZ_API RzProjectErr | rz_project_save_file (RzCore *core, const char *file, bool compress) |
RZ_API RzProject * | rz_project_load_file_raw (const char *file) |
Load a file into an RzProject but don't actually migrate anything or load it into an RzCore. More... | |
RZ_API void | rz_project_free (RzProject *prj) |
RZ_API RzProjectErr | rz_project_load (RzCore *core, RzProject *prj, bool load_bin_io, RZ_NULLABLE const char *file, RzSerializeResultInfo *res) |
RZ_API RzProjectErr | rz_project_load_file (RzCore *core, const char *file, bool load_bin_io, RzSerializeResultInfo *res) |
RZ_API RZ_NONNULL const char* rz_project_err_message | ( | RzProjectErr | err | ) |
Definition at line 11 of file project.c.
References err, RZ_PROJECT_ERR_COMPRESSION_FAILED, RZ_PROJECT_ERR_FILE, RZ_PROJECT_ERR_INVALID_CONTENTS, RZ_PROJECT_ERR_INVALID_TYPE, RZ_PROJECT_ERR_INVALID_VERSION, RZ_PROJECT_ERR_MIGRATION_FAILED, RZ_PROJECT_ERR_NEWER_VERSION, RZ_PROJECT_ERR_SUCCESS, and RZ_PROJECT_ERR_UNKNOWN.
Referenced by rz_core_project_load_for_cli(), rz_main_rizin(), and rz_project_save_handler().
RZ_API RzProjectErr rz_project_load | ( | RzCore * | core, |
RzProject * | prj, | ||
bool | load_bin_io, | ||
RZ_NULLABLE const char * | file, | ||
RzSerializeResultInfo * | res | ||
) |
load_bin_io | whether to also load the underlying RIO and RBin state from the project. If false, the current state will be kept and the project loaded on top. |
file | filename of the project that db comes from. This is only used to re-locate the loaded RIO descs, the project file itself is not touched by this function. |
Definition at line 133 of file project.c.
References rz_core_t::config, NULL, rz_config_set(), RZ_PROJECT_ERR_INVALID_CONTENTS, RZ_PROJECT_ERR_INVALID_TYPE, RZ_PROJECT_ERR_INVALID_VERSION, RZ_PROJECT_ERR_MIGRATION_FAILED, RZ_PROJECT_ERR_NEWER_VERSION, RZ_PROJECT_ERR_SUCCESS, RZ_PROJECT_ERR_UNKNOWN, RZ_PROJECT_KEY_TYPE, RZ_PROJECT_KEY_VERSION, rz_project_migrate(), RZ_PROJECT_TYPE, RZ_PROJECT_VERSION, rz_return_val_if_fail, rz_serialize_core_load(), RZ_SERIALIZE_ERR, sdb_const_get(), sdb_ns(), and type.
Referenced by rz_project_load_file().
RZ_API RzProjectErr rz_project_load_file | ( | RzCore * | core, |
const char * | file, | ||
bool | load_bin_io, | ||
RzSerializeResultInfo * | res | ||
) |
load_bin_io | whether to also load the underlying RIO and RBin state from the project. If false, the current state will be kept and the project loaded on top. |
file | filename of the project to load from |
Definition at line 168 of file project.c.
References RZ_PROJECT_ERR_FILE, rz_project_load(), rz_project_load_file_raw(), RZ_SERIALIZE_ERR, and sdb_free().
Referenced by rz_core_project_load_for_cli().
Load a file into an RzProject but don't actually migrate anything or load it into an RzCore.
Definition at line 88 of file project.c.
References close, file, free(), NULL, rz_file_exists(), rz_file_inflate(), rz_file_is_deflated(), rz_file_mkstemp(), rz_file_rm(), sdb_free(), sdb_new0(), and sdb_text_load().
Referenced by rz_project_load_file().
RZ_API RzProjectErr rz_project_save | ( | RzCore * | core, |
RzProject * | prj, | ||
const char * | file | ||
) |
Definition at line 35 of file project.c.
References RZ_PROJECT_ERR_SUCCESS, RZ_PROJECT_KEY_TYPE, RZ_PROJECT_KEY_VERSION, RZ_PROJECT_TYPE, RZ_PROJECT_VERSION, rz_serialize_core_save(), sdb_fmt(), sdb_ns(), and sdb_set().
Referenced by rz_project_save_file().
RZ_API RzProjectErr rz_project_save_file | ( | RzCore * | core, |
const char * | file, | ||
bool | compress | ||
) |
Definition at line 42 of file project.c.
References close, compress(), rz_core_t::config, err, file, free(), NULL, rz_config_set(), rz_file_deflate(), rz_file_mkstemp(), rz_file_rm(), RZ_PROJECT_ERR_COMPRESSION_FAILED, RZ_PROJECT_ERR_FILE, RZ_PROJECT_ERR_SUCCESS, RZ_PROJECT_ERR_UNKNOWN, rz_project_save(), sdb_free(), sdb_new0(), and sdb_text_save().
Referenced by rz_main_rizin(), and rz_project_save_handler().