37 return a &&
a->cur &&
a->cur->arch && strstr(
a->cur->arch,
"mips");
64 RZ_LOG_WARN(
"No sections found, functions and flags won't be rebased\n");
69 rz_list_foreach (
sections, it, sec) {
90 #define __is_inside_section(item_addr, section) \
91 (item_addr >= old_base + section->vaddr && item_addr <= old_base + section->vaddr + section->vsize)
118 HtUP *ht = (HtUP *)
v;
141 ut64 new_sec_addr = new_base + old_section->
vaddr;
142 rz_list_foreach (fcn->
bbs, ititit, bb) {
143 if (bb->
addr >= new_sec_addr && bb->
addr <= new_sec_addr + old_section->
vsize) {
178 ht_up_free(xrefs_from);
179 ht_up_free(xrefs_to);
202 RZ_LOG_ERROR(
"Cannot load binary info of '%s'.\n", filepath);
208 RZ_LOG_WARN(
"Cannot make maps for %s writable.\n", filepath);
249 if (
desc->plugin->isdbg) {
281 RZ_LOG_ERROR(
"Cannot debug file (%s) with permissions set to 0x%x.\n"
282 "Reopening the original file in read-only mode.\n",
337 }
else if (odesc->
uri) {
338 ofilepath = odesc->
uri;
345 if (new_baddr && new_baddr !=
UT64_MAX) {
361 int newpid = odesc ? odesc->
fd : -1;
386 obinfilepath =
strdup(ofilepath);
415 bool had_rbin_info =
false;
419 had_rbin_info =
true;
428 (perm &
RZ_PERM_W) ?
"read-write" :
"read-only");
430 if (loadbin && (loadbin == 2 || had_rbin_info)) {
453 RZ_LOG_ERROR(
"rz_core_file_reopen: Cannot reopen file: '%s' with perms 0x%x,"
454 " attempting to open read-only.\n",
492 newsize = oldsize +
delta;
494 bool grow = (newsize > oldsize);
554 char *config_sdb_path =
NULL;
556 if (config_sdb_fd >= 0) {
557 close(config_sdb_fd);
572 free(config_sdb_path);
575 #if !__linux__ && !__WINDOWS__
583 if ((
map->perm & 5) == 5) {
586 if (
map->name && strstr(
map->name,
"copy/")) {
601 if (
map->perm == 5) {
610 #if __linux__ || __APPLE__
611 static bool setbpint(
RzCore *
r,
const char *
mode,
const char *sym) {
640 if (!strncmp(
"dbg://", filenameuri, 6)) {
664 int fd = cf ? cf->
fd : -1;
668 opt.obj_opts.elf_load_sections =
rz_config_get_b(
r->config,
"elf.load.sections");
669 opt.obj_opts.elf_checks_sections =
rz_config_get_b(
r->config,
"elf.checks.sections");
670 opt.obj_opts.elf_checks_segments =
rz_config_get_b(
r->config,
"elf.checks.segments");
672 opt.xtr_idx = xtr_idx;
675 RZ_LOG_ERROR(
"bin: debug: Cannot open '%s'\n", filenameuri);
686 setbpint(
r,
"dbg.libs",
"sym.imp.dlopen");
687 setbpint(
r,
"dbg.libs",
"sym.imp.dlmopen");
688 setbpint(
r,
"dbg.unlibs",
"sym.imp.dlclose");
690 setbpint(
r,
"dbg.libs",
"sym._dlopen");
691 setbpint(
r,
"dbg.libs",
"sym._dlclose");
697 if (plugin && !strcmp(plugin->
name,
"any")) {
703 }
else if (binfile) {
706 if (plugin &&
info) {
716 int fd = cf ? cf->
fd : -1;
726 opt.xtr_idx = xtr_idx;
736 if (!
r->analysis->sdb_cc->path) {
737 RZ_LOG_WARN(
"No calling convention defined for this file, analysis may be inaccurate.\n");
741 if (plugin && !strcmp(plugin->
name,
"any")) {
754 }
else if (binfile) {
760 if (plugin &&
info) {
780 if (!dirlibs || !*dirlibs) {
783 const char *ldlibrarypath[] = {
794 const char **libpath = (
const char **)&ldlibrarypath;
798 if (strlen(lib) >= 3 && lib[1] ==
':' && lib[2] ==
'\\') {
844 if (!rz_list_empty(
files)) {
867 if (!strcmp(
desc->name, filedata->
name)) {
868 filedata->
found =
true;
876 return filedata.
found;
950 bool is_io_load =
false;
951 const char *cmd_load;
958 filenameuri =
desc->name;
975 if (!strncmp(filenameuri,
"apk://", 6) &&
r->io->files->size > 1) {
976 RZ_LOG_INFO(
"Found multidex APK, mapping extra files\n");
986 if (cf && binfile &&
desc) {
1004 if (cmd_load && *cmd_load) {
1008 if (plugin && plugin->
name) {
1009 if (!strcmp(plugin->
name,
"any")) {
1020 }
else if (binfile) {
1061 rz_list_foreach (
libs,
iter, lib) {
1073 ut64 ocurr =
r->offset;
1119 RZ_LOG_WARN(
"Setting up coredump: Problem while setting the registers\n");
1121 RZ_LOG_INFO(
"Setting up coredump: Registers have been set\n");
1136 if (rz_list_empty(list_fds)) {
1141 if (!base_address) {
1148 rz_list_foreach (list_fds, it,
desc) {
1152 }
else if (!first) {
1168 base_address +=
size;
1188 if (!strcmp(
file,
"=")) {
1189 file =
"malloc://512";
1195 r->io->bits =
r->rasm->bits;
1200 if (!
fd && openmany) {
1225 RZ_LOG_ERROR(
"rz_core_file_open: failed to allocate RzCoreFile.\n");
1247 if (
r->dbg->cur &&
r->dbg->cur->canstep) {
1252 if (
fd->plugin &&
fd->plugin->isdbg) {
1275 rz_list_foreach (core->
files, it, cf) {
1284 rz_list_foreach (core->
files, it, cf) {
1294 rz_list_foreach (core->
files, it, cf) {
1322 if (
r->file ==
fh) {
1344 rz_list_foreach (core->
files, it1,
f) {
1349 bool header_loaded =
false;
1351 if (bf->
fd ==
f->fd) {
1352 header_loaded =
true;
1356 if (!header_loaded) {
1360 rz_list_foreach (
maps, it3, current_map) {
1410 bool fileHaveBin =
false;
1413 if (bf->
fd ==
f->fd) {
1418 if (!fileHaveBin && !strstr(absfile,
"://")) {
1433 core->
io->
desc->
fd ==
f->fd ?
'*' :
'-',
1477 rz_list_foreach (binfiles,
iter, binfile) {
1478 int fd = binfile->
fd;
1514 while (!rz_list_empty(core->
files)) {
1531 rz_list_foreach (core->
files,
iter, cf) {
1532 if (cf && cf->
fd ==
fd) {
1549 rz_list_foreach (core->
files,
iter, cf) {
1585 if (core && core->
file) {
1617 ut64 orig_baddr = core->bin->cur->o->baddr_shift;
1630 core->num->value =
cfile->fd;
1660 if (
map->fd ==
fd) {
1675 info->perm_orig = perm_orig;
RZ_API bool rz_analysis_function_relocate(RzAnalysisFunction *fcn, ut64 addr)
RZ_API int rz_reg_arena_set_bytes(RzReg *reg, const char *str)
RZ_API bool rz_bin_file_set_cur_binfile(RzBin *bin, RzBinFile *bf)
RZ_API ut64 rz_bin_file_delete_all(RzBin *bin)
RZ_API RzList * rz_bin_file_get_symbols(RzBinFile *bf)
RZ_API RzBinFile * rz_bin_file_find_by_fd(RzBin *bin, ut32 bin_fd)
RZ_API bool rz_bin_file_delete(RzBin *bin, RzBinFile *bf)
RZ_API RzBinPlugin * rz_bin_file_cur_plugin(RzBinFile *bf)
RZ_API void rz_bin_info_free(RzBinInfo *rb)
RZ_API RzBinObject * rz_bin_cur_object(RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_imports(RZ_NONNULL RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_libs(RZ_NONNULL RzBin *bin)
RZ_API RzBinFile * rz_bin_open_io(RzBin *bin, RzBinOptions *opt)
RZ_API ut64 rz_bin_get_baddr(RzBin *bin)
RZ_API void rz_bin_options_init(RzBinOptions *opt, int fd, ut64 baseaddr, ut64 loadaddr, bool patch_relocs)
RZ_API RzBinFile * rz_bin_open(RzBin *bin, const char *file, RzBinOptions *opt)
RZ_API RzBinFile * rz_bin_cur(RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_sections(RZ_NONNULL RzBin *bin)
static ut64 baddr(RzBinFile *bf)
static RzList * maps(RzBinFile *bf)
static RzList * libs(RzBinFile *bf)
RzBinInfo * info(RzBinFile *bf)
RzList * symbols(RzBinFile *bf)
RzList * imports(RzBinFile *bf)
RzList * sections(RzBinFile *bf)
int bits(struct state *s, int need)
RZ_API bool rz_analysis_block_relocate(RzAnalysisBlock *block, ut64 addr, ut64 size)
RZ_API int rz_bin_object_set_items(RzBinFile *bf, RzBinObject *o)
RZ_API RZ_BORROW RzBreakpointItem * rz_bp_add_sw(RZ_NONNULL RzBreakpoint *bp, ut64 addr, int size, int perm)
Add a software breakpoint size preferred size of the breakpoint, or 0 to determine automatically.
RZ_API int rz_core_bin_set_by_fd(RzCore *core, ut64 bin_fd)
RZ_API int rz_core_bin_update_arch_bits(RzCore *r)
RZ_API void rz_core_bin_options_init(RzCore *core, RZ_OUT RzBinOptions *opts, int fd, ut64 baseaddr, ut64 loadaddr)
RZ_API bool rz_core_bin_raise(RzCore *core, ut32 bfid)
RZ_API int rz_core_bin_set_arch_bits(RzCore *r, const char *name, const char *arch, ut16 bits)
RZ_API bool rz_core_bin_apply_all_info(RzCore *r, RzBinFile *binfile)
RZ_API void rz_core_debug_map_update_flags(RzCore *core)
RZ_API bool rz_core_debug_step_one(RzCore *core, int times)
static bool filecb(void *user, void *data, ut32 id)
RZ_API ut32 rz_core_file_cur_fd(RzCore *core)
RZ_API RZ_BORROW RzCoreFile * rz_core_file_open_many(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *file, int perm, ut64 base_address)
Open the file as a compilation of files.
static bool __isMips(RzAsm *a)
RZ_IPI void rz_core_file_io_desc_closed(RzCore *core, RzIODesc *desc)
RZ_API bool rz_core_file_close_all_but(RzCore *core)
RZ_API void rz_core_sysenv_begin(RzCore *core)
RZ_API bool rz_core_file_loadlib(RzCore *core, const char *lib, ut64 libaddr)
static void loadGP(RzCore *core)
static bool core_file_do_load_for_debug(RzCore *r, ut64 loadaddr, const char *filenameuri)
RZ_API RzCoreFile * rz_core_file_cur(RzCore *r)
RZ_IPI RzCoreIOMapInfo * rz_core_io_map_info_new(RzCoreFile *cf, int perm_orig)
RZ_API bool rz_core_file_reopen(RzCore *core, const char *args, int perm, int loadbin)
RZ_API RzCoreFile * rz_core_file_find_by_fd(RzCore *core, ut64 fd)
RZ_API bool rz_core_file_print(RzCore *core, RzOutputMode mode)
static RzCoreFile * core_file_new(RzCore *core, int fd)
static ut64 get_base_from_maps(RzCore *core, const char *file)
#define __is_inside_section(item_addr, section)
RZ_API void rz_core_file_reopen_debug(RzCore *core, const char *args)
RZ_API void rz_core_file_close(RzCoreFile *fh)
RZ_API void rz_core_io_file_open(RZ_NONNULL RzCore *core, int fd)
Open file use read-only Permission.
RZ_API int rz_core_file_set_by_file(RzCore *core, RzCoreFile *cf)
RZ_API bool rz_core_file_resize(RzCore *core, ut64 newsize)
RZ_API bool rz_core_file_bin_raise(RzCore *core, ut32 bfid)
RZ_API void rz_core_file_reopen_remote_debug(RzCore *core, const char *uri, ut64 addr)
static void __rebase_everything(RzCore *core, RzList *old_sections, ut64 old_base)
RZ_API bool rz_core_raw_file_print(RzCore *core)
static bool core_file_do_load_for_io_plugin(RzCore *r, ut64 baseaddr, ut64 loadaddr)
RZ_API int rz_core_bin_rebase(RzCore *core, ut64 baddr)
RZ_IPI void rz_core_io_map_info_free(RzCoreIOMapInfo *info)
static bool file_resize(RzCore *core, ut64 newsize, st64 delta)
static void load_scripts_for(RzCore *core, const char *name)
RZ_API void rz_core_io_file_reopen(RZ_NONNULL RzCore *core, int fd, int perms)
Reopen file.
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_IPI void rz_core_file_io_map_deleted(RzCore *core, RzIOMap *map)
RZ_API void rz_core_sysenv_end(RzCore *core)
RZ_API RzCoreFile * rz_core_file_get_by_fd(RzCore *core, int fd)
RZ_API RzCoreFile * rz_core_file_find_by_name(RzCore *core, const char *name)
static bool __rebase_flags(RzFlagItem *flag, void *user)
RZ_IPI void rz_core_file_bin_file_deleted(RzCore *core, RzBinFile *bf)
static bool try_loadlib(RzCore *core, const char *lib, ut64 addr)
static bool resolve_import_cb(RzCoreLinkData *ld, RzIODesc *desc, ut32 id)
static bool map_multi_dex(RzCore *core, RzIODesc *desc, ut32 id)
static bool __rebase_xrefs_i(void *user, const ut64 k, const void *v)
RZ_API int rz_core_file_binlist(RzCore *core)
RZ_API int rz_core_file_set_by_name(RzCore *core, const char *name)
RZ_API bool rz_core_file_close_fd(RzCore *core, int fd)
static bool file_is_loaded(RzCore *core, const char *lib)
static RZ_OWN RzList * __save_old_sections(RzCore *core)
RZ_API bool rz_core_file_resize_delta(RzCore *core, st64 delta)
RZ_IPI void rz_core_file_free(RzCoreFile *cf)
static bool __rebase_xrefs(void *user, const ut64 k, const void *v)
RZ_API bool rz_core_file_open_load(RZ_NONNULL RzCore *core, RZ_NONNULL const char *filepath, ut64 addr, int perms, bool write_mode)
Tries to open the file, load binary info and make RzIOMap.
RZ_API bool rz_core_bin_load(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *filenameuri, ut64 baddr)
static bool close_but_cb(void *user, void *data, ut32 id)
RZ_API int rz_core_file_set_by_fd(RzCore *core, ut64 fd)
RZ_API int rz_core_setup_debugger(RzCore *r, const char *debugbackend, bool attach)
RZ_API int rz_core_block_read(RzCore *core)
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd)
RZ_API int rz_core_cmd(RzCore *core, const char *cstr, int log)
RZ_API bool rz_core_run_script(RzCore *core, RZ_NONNULL const char *file)
RZ_IPI bool rz_core_seek_to_register(RzCore *core, const char *regname, bool is_silent)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API bool rz_config_get_b(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set(RzConfig *cfg, RZ_NONNULL const char *name, const char *value)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set_b(RzConfig *cfg, RZ_NONNULL const char *name, bool value)
RZ_API void rz_config_serialize(RZ_NONNULL RzConfig *config, RZ_NONNULL Sdb *db)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API bool rz_cons_is_breaked(void)
RZ_API void rz_cons_println(const char *str)
#define RZ_CORE_BASE_ADDRESS_DEFAULT
#define rz_core_align_base_address(x)
#define RZ_CORE_BASE_ADDRESS_DEX
RZ_API void rz_core_reg_update_flags(RzCore *core)
Update or create flags for all registers where it makes sense.
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static fork const void static count close
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
RZ_API bool rz_debug_map_sync(RzDebug *dbg)
RZ_API bool rz_debug_reg_profile_sync(RzDebug *dbg)
size_t map(int syms, int left, int len)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
RZ_API RzFlagItem * rz_flag_get(RzFlag *f, const char *name)
RZ_API RzFlagItem * rz_flag_set(RzFlag *f, const char *name, ut64 off, ut32 size)
RZ_API void rz_flag_foreach(RzFlag *f, RzFlagItemCb cb, void *user)
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
RZ_API bool rz_core_serve(RzCore *core, RzIODesc *file)
RZ_API int rz_debug_kill(RzDebug *dbg, int pid, int tid, int sig)
RZ_API void rz_debug_bp_rebase(RzDebug *dbg, ut64 old_base, ut64 new_base)
RZ_API int rz_debug_detach(RzDebug *dbg, int pid)
RZ_API int rz_debug_continue(RzDebug *dbg)
RZ_API ut64 rz_debug_get_baddr(RzDebug *dbg, const char *file)
RZ_API bool rz_debug_is_dead(RzDebug *dbg)
RZ_API bool rz_debug_select(RzDebug *dbg, int pid, int tid)
RZ_API RZ_BORROW RzListIter * rz_list_find_ptr(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr)
Returns the RzListIter of the given pointer, if found.
RZ_API void rz_list_delete(RZ_NONNULL RzList *list, RZ_NONNULL RzListIter *iter)
Removes an entry in the list by using the RzListIter pointer.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW void * rz_list_first(RZ_NONNULL const RzList *list)
Returns the first element of the list.
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API bool rz_debug_use(RzDebug *dbg, const char *str)
RZ_API ut64 rz_reg_getv(RzReg *reg, const char *name)
@ RZ_ANALYSIS_XREF_TYPE_NULL
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
RZ_API bool rz_file_exists(const char *str)
RZ_API char * rz_file_abspath(const char *file)
RZ_API int rz_file_mkstemp(RZ_NULLABLE const char *prefix, char **oname)
RZ_API bool rz_file_rm(const char *file)
RZ_API RZ_OWN char * rz_file_path_join(RZ_NONNULL const char *s1, RZ_NULLABLE const char *s2)
Concatenate two paths to create a new one with s1+s2 with the correct path separator.
bool(* RzIDStorageForeachCb)(void *user, void *data, ut32 id)
RZ_API bool rz_id_storage_foreach(RzIDStorage *storage, RzIDStorageForeachCb cb, void *user)
RZ_API ut64 rz_io_fd_size(RzIO *io, int fd)
RZ_API void rz_io_desc_free(RzIODesc *desc)
RZ_API int rz_io_fd_get_tid(RzIO *io, int fd)
RZ_API RzList * rz_io_open_many(RzIO *io, const char *uri, int flags, int mode)
RZ_API bool rz_io_map_del(RzIO *io, ut32 id)
RZ_API bool rz_io_shift(RzIO *io, ut64 start, ut64 end, st64 move)
RZ_API bool rz_io_resize(RzIO *io, ut64 newsize)
RZ_API bool rz_io_desc_add(RzIO *io, RzIODesc *desc)
RZ_API ut64 rz_io_desc_size(RzIODesc *desc)
RZ_API RzIODesc * rz_io_desc_get(RzIO *io, int fd)
RZ_API RzList * rz_io_map_get_for_fd(RzIO *io, int fd)
RZ_API void rz_io_bind(RzIO *io, RzIOBind *bnd)
RZ_API bool rz_io_is_listener(RzIO *io)
RZ_API int rz_io_close_all(RzIO *io)
RZ_API RZ_BORROW RzPVector * rz_io_maps(RzIO *io)
Returns the pointer to vector containing maps list.
RZ_API bool rz_io_reopen(RzIO *io, int fd, int flags, int mode)
RZ_API RzIODesc * rz_io_open_nomap(RzIO *io, const char *uri, int flags, int mode)
RZ_API int rz_io_fd_get_pid(RzIO *io, int fd)
RZ_API bool rz_io_use_fd(RzIO *io, int fd)
RZ_API RzIOMap * rz_io_map_new(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size)
RZ_API bool rz_io_desc_is_dbg(RzIODesc *desc)
RZ_API ut64 rz_io_map_location(RzIO *io, ut64 size)
Returns a memory location that can hold enough bytes without overlapping.
RZ_API bool rz_io_fd_close(RzIO *io, int fd)
RZ_API bool rz_io_desc_close(RzIODesc *desc)
RZ_API bool rz_io_desc_get_base(RzIODesc *desc, ut64 *base)
#define RZ_LOG_INFO(fmtstr,...)
#define RZ_LOG_WARN(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API bool rz_name_filter(char *name, int len, bool strict)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
RZ_API RZ_OWN char * rz_path_libdir(void)
Return the directory where the Rizin libraries are placed.
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_ndup(RZ_NULLABLE const char *ptr, int len)
Create new copy of string ptr limited to size len.
#define RZ_STR_ISEMPTY(x)
RZ_API char * rz_str_path_escape(const char *path)
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
RZ_API bool rz_str_endswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string ends with a specifc sequence of characters (case sensitive)
RZ_API char * rz_str_arg_escape(const char *arg)
#define rz_strf(buf,...)
Convenience macro for local temporary strings.
RZ_API char * rz_sys_getenv(const char *key)
Get the value of an environment variable named key or NULL if none exists.
RZ_API int rz_sys_setenv(const char *key, const char *value)
Set an environment variable in the calling process.
RZ_API RzList * rz_sys_dir(const char *path)
RZ_API ut64 rz_time_now_mono(void)
Returns the current time in microseconds, using the monotonic clock.
RzOutputMode
Enum to describe the way data are printed.
static void * rz_pvector_tail(RzPVector *vec)
RZ_API void rz_pvector_remove_data(RzPVector *vec, void *x)
RZ_API void rz_pvector_init(RzPVector *vec, RzPVectorFree free)
RZ_API void rz_pvector_fini(RzPVector *vec)
static size_t rz_pvector_len(const RzPVector *vec)
#define rz_pvector_foreach_prev(vec, it)
static bool rz_pvector_empty(RzPVector *vec)
static void ** rz_pvector_push(RzPVector *vec, void *x)
static void * rz_pvector_at(const RzPVector *vec, size_t index)
#define rz_pvector_foreach(vec, it)
RZ_API Sdb * sdb_new(const char *path, const char *name, int lock)
RZ_API bool sdb_free(Sdb *s)
RZ_API bool sdb_sync(Sdb *s)
RZ_API bool rz_core_seek_opt(RzCore *core, ut64 addr, bool rb, bool save)
Seek to addr and optionally save the current offset in seek history.
RZ_API bool rz_core_seek(RzCore *core, ut64 addr, bool rb)
Seek to addr.
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void flags
static struct sockaddr static addrlen static backlog const void msg
ut64 loadaddr
starting physical address to read from the target file
ut64 baseaddr
where the linker maps the binary in memory
XX curplugin == o->plugin.
int fd
when used in combination with RzIO, this refers to the io fd.
RzBinObjectLoadOptions opts
int(* file_type)(RzBinFile *bf)
RzBinInfo *(* info)(RzBinFile *bf)
RZ_DEPRECATE RzBinFile * cur
never use this in new code! Get a file from the binfiles list or track it yourself.
RzPVector binfiles
all bin files that have been created for this core file
RzPVector extra_files
additional files opened during mapping, for example for zeroed maps
RzPVector maps
all maps that have been created as a result of loading this file
RzDebugRecoilMode recoil_mode
struct rz_io_desc_t * desc
RZ_API bool rz_analysis_function_rebase_vars(RzAnalysis *a, RzAnalysisFunction *fcn)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
RZ_API bool rz_analysis_xrefs_init(RzAnalysis *analysis)
RZ_API bool rz_analysis_xrefs_set(RzAnalysis *analysis, ut64 from, ut64 to, RzAnalysisXRefType type)
static const z80_opcode fd[]
int inf(FILE *source, FILE *dest)