Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | RZ_PROJECT_VERSION 8 |
Typedefs | |
typedef Sdb | RzProject |
typedef enum rz_project_err | RzProjectErr |
#define RZ_PROJECT_VERSION 8 |
Definition at line 15 of file rz_project.h.
Definition at line 17 of file rz_project.h.
typedef enum rz_project_err RzProjectErr |
enum rz_project_err |
Definition at line 19 of file rz_project.h.
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 bool rz_project_migrate | ( | RzProject * | prj, |
unsigned long | version, | ||
RzSerializeResultInfo * | res | ||
) |
Migrate the given project to the current version in-place.
Definition at line 318 of file project_migrate.c.
References migrations, RZ_ARRAY_SIZE, rz_list_push(), RZ_PROJECT_VERSION, RZ_STATIC_ASSERT, and rz_str_newf().
Referenced by rz_project_load().
RZ_API bool rz_project_migrate_v1_v2 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 53 of file project_migrate.c.
References free(), rz_list_free(), rz_list_newf(), RZ_SERIALIZE_SUB, s, sdb_foreach(), sdb_ns(), sdb_unset(), and v1_v2_types_foreach_cb().
RZ_API bool rz_project_migrate_v2_v3 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 110 of file project_migrate.c.
References free(), rz_list_free(), rz_list_newf(), RZ_SERIALIZE_SUB, s, sdb_foreach(), sdb_ns(), sdb_unset(), and v2_v3_types_foreach_cb().
RZ_API bool rz_project_migrate_v3_v4 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 166 of file project_migrate.c.
References free(), rz_list_free(), rz_list_newf(), RZ_SERIALIZE_SUB, s, sdb_foreach(), sdb_ns(), and sdb_unset().
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().