73 #define SUB(ns, call) RZ_SERIALIZE_SUB_DO(db, subdb, res, ns, call, return false;)
88 core->offset = strtoull(
str,
NULL, 0);
164 if (!
desc->plugin || strcmp(
desc->plugin->name,
"default")) {
165 eprintf(
"Warning: The current file is not loaded as a regular file. "
166 "This is not supported in projects yet and it will be necessary to manually re-load to use the project.\n");
178 sdb_set(db,
"absolute", abs, 0);
186 sdb_set(db,
"relative", rel, 0);
225 if (rel && prj_file) {
RZ_API ut64 rz_bin_file_delete_all(RzBin *bin)
RZ_API RZ_BORROW RzCoreFile * rz_core_file_open(RZ_NONNULL RzCore *r, RZ_NONNULL const char *file, int flags, ut64 loadaddr)
Tries to open the file as is, otherwise tries as is a compilation of files.
RZ_API bool rz_core_file_close_fd(RzCore *core, int fd)
RZ_API bool rz_core_bin_load(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *filenameuri, ut64 baddr)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API bool rz_core_block_size(RzCore *core, ut32 bsize)
RZ_API Sdb * sdb_ns(Sdb *s, const char *name, int create)
#define rz_return_if_fail(expr)
RZ_API char * rz_file_relpath(const char *base, const char *path)
RZ_API bool rz_file_is_regular(const char *str)
RZ_API char * rz_file_path_local_to_unix(const char *path)
RZ_API char * rz_file_abspath(const char *file)
RZ_API char * rz_file_dirname(const char *path)
RZ_API char * rz_file_abspath_rel(const char *cwd, const char *file)
RZ_API char * rz_file_path_unix_to_local(const char *path)
RZ_API RzIODesc * rz_io_desc_get(RzIO *io, int fd)
RZ_API int rz_io_close_all(RzIO *io)
#define RZ_SERIALIZE_ERR(res,...)
Push an error to the local RzSerializeResultInfo \res RzSerializeInfoResult *.
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API char * sdb_get(Sdb *s, const char *key, ut32 *cas)
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
RZ_API bool rz_serialize_analysis_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_config_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzConfig *config)
RZ_API bool rz_serialize_config_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzConfig *config, RZ_NULLABLE const char *const *exclude, RZ_NULLABLE RzSerializeResultInfo *res)
static void file_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core, RZ_NULLABLE const char *prj_file)
static char * prj_dir_abs(const char *prj_file)
static char * prj_relative_make(const char *prj_dir, const char *abs_file)
static char * prj_relative_restore(const char *prj_dir, const char *rel_file)
RZ_API bool rz_serialize_core_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core, bool load_bin_io, RZ_NULLABLE const char *prj_file, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_core_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core, RZ_NULLABLE const char *prj_file)
static FileRet try_load_file(RZ_NONNULL RzCore *core, const char *file, RZ_NULLABLE RzSerializeResultInfo *res)
static bool file_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core, RZ_NULLABLE const char *prj_file, RZ_NULLABLE RzSerializeResultInfo *res)
static const char *const config_exclude[]
RZ_API void rz_serialize_debug_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzDebug *dbg)
Serialize debug state (RzDebug) and save to a sdb.
RZ_API bool rz_serialize_debug_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzDebug *dbg, RZ_NULLABLE RzSerializeResultInfo *res)
Load a serialized debug state to a RzDebug instance.
RZ_API void rz_serialize_flag_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzFlag *flag)
RZ_API bool rz_serialize_flag_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzFlag *flag, RZ_NULLABLE RzSerializeResultInfo *res)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()