Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | V1V2TypesCtx |
struct | V2V3TypesCtx |
Functions | |
bool | v1_v2_types_foreach_cb (void *user, const char *k, const char *v) |
RZ_API bool | rz_project_migrate_v1_v2 (RzProject *prj, RzSerializeResultInfo *res) |
bool | v2_v3_types_foreach_cb (void *user, const char *k, const char *v) |
RZ_API bool | rz_project_migrate_v2_v3 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate_v3_v4 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate_v4_v5 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate_v5_v6 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate_v6_v7 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate_v7_v8 (RzProject *prj, RzSerializeResultInfo *res) |
RZ_API bool | rz_project_migrate (RzProject *prj, unsigned long version, RzSerializeResultInfo *res) |
Migrate the given project to the current version in-place. More... | |
Variables | |
static bool(*const | migrations [])(RzProject *prj, RzSerializeResultInfo *res) |
About Project Migrations: The project format is versioned, which means that a project saved with a certain version will always follow the exact same format. The current version is defined as RZ_PROJECT_VERSION
and is completely independent of Rizin release versions. Do not confuse them! When any change in Rizin happens that changes the project format, this version must be raised and a migration must be implemented, which converts a given project from the previous version to the current and will be executed when loading an old project with new Rizin. These migrations always bring a project from version x to version x+1 and they may be executed sequentially if multiple versions are skipped. For example loading a project with version 1 in Rizin with version 3 will execute (1->2), then (2->3) and finally load the project just like any regular project of version 3.
After introducing format changes in Rizin, do the following:
bool rz_project_migrate_migrate_v1_v2(RzProject *prj, RzSerializeResultInfo *res)
which edits prj in-place and converts it from the previous to the current version.migrations
array below.test/unit/test_project_migrate.c
that cover all changes (see the documentation there). Definition in file project_migrate.c.
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 bool rz_project_migrate_v4_v5 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 201 of file project_migrate.c.
References bits(), RZ_SERIALIZE_SUB, sdb_num_get(), and sdb_set().
RZ_API bool rz_project_migrate_v5_v6 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
RZ_API bool rz_project_migrate_v6_v7 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 264 of file project_migrate.c.
References NULL, RZ_SERIALIZE_SUB, and sdb_ns_unset().
RZ_API bool rz_project_migrate_v7_v8 | ( | RzProject * | prj, |
RzSerializeResultInfo * | res | ||
) |
Definition at line 280 of file project_migrate.c.
References NULL, RZ_SERIALIZE_SUB, sdb_ns_unset(), and sdb_unset().
Definition at line 43 of file project_migrate.c.
References k, rz_list_push(), rz_str_endswith(), rz_str_startswith(), sdb_set(), strdup(), and v.
Referenced by rz_project_migrate_v1_v2().
Definition at line 94 of file project_migrate.c.
References free(), k, rz_list_push(), rz_str_newf(), rz_str_startswith(), sdb_set(), strdup(), and v.
Referenced by rz_project_migrate_v2_v3().
|
static |
Definition at line 307 of file project_migrate.c.
Referenced by rz_project_migrate().