Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_bin_string_database_t |
RZ_IPI void rz_bin_class_add_field | ( | RzBinFile * | binfile, |
const char * | classname, | ||
const char * | name | ||
) |
RZ_IPI RzBinSymbol* rz_bin_class_add_method | ( | RzBinFile * | binfile, |
const char * | classname, | ||
const char * | name, | ||
int | nargs | ||
) |
RZ_IPI void rz_bin_class_free | ( | RzBinClass * | c | ) |
Definition at line 512 of file bfile.c.
References free(), k, and rz_list_free().
Referenced by parse_categories(), parse_classes(), and rz_bin_object_new().
RZ_IPI RZ_OWN char* rz_bin_file_golang_compiler | ( | RZ_NONNULL RzBinFile * | bf | ) |
Returns the golang compiler info if buildinfo struct is found.
RzBinFile | The RzBinFile to use for the search |
Definition at line 265 of file golang.c.
References scan_go_info_s::bf, find_go_build_info(), free(), scan_go_info_s::go_info, rz_bin_plugin_t::name, NULL, rz_bin_file_t::o, parse_go_build_info(), rz_bin_object_t::plugin, rz_bin_object_get_sections(), rz_list_free(), RZ_LOG_INFO, rz_return_val_if_fail, rz_str_newf(), sections(), golang_build_info_t::settings, section::size, and golang_build_info_t::version.
Referenced by rz_bin_object_set_items().
RZ_IPI RzBinFile* rz_bin_file_new | ( | RzBin * | bin, |
const char * | file, | ||
ut64 | file_sz, | ||
int | fd, | ||
const char * | xtrname, | ||
bool | steal_ptr | ||
) |
Definition at line 22 of file bfile.c.
References rz_bin_file_t::curxtr, fd, rz_bin_file_t::fd, rz_bin_file_t::file, rz_bin_file_t::id, NULL, rz_bin_file_t::rbin, rz_bin_get_xtrplugin_by_name(), rz_bin_xtrdata_free(), rz_id_pool_grab_id(), rz_list_newf(), RZ_NEW0, RZ_STR_DUP, rz_bin_file_t::sdb, sdb_new0(), rz_bin_file_t::size, rz_bin_file_t::xtr_data, and rz_bin_file_t::xtr_obj.
Referenced by rz_bin_file_new_from_buffer(), and rz_bin_file_xtr_load_buffer().
RZ_IPI RzBinFile* rz_bin_file_new_from_buffer | ( | RzBin * | bin, |
const char * | file, | ||
RzBuffer * | buf, | ||
RzBinObjectLoadOptions * | opts, | ||
int | fd, | ||
const char * | pluginname | ||
) |
Definition at line 139 of file bfile.c.
References rz_bin_file_t::buf, fd, get_plugin_from_buffer(), NULL, rz_bin_file_new(), rz_bin_object_new(), rz_buf_ref(), rz_buf_size(), rz_list_append(), rz_list_delete(), rz_return_val_if_fail, and rz_bin_object_t::size.
Referenced by rz_bin_open_buf().
RZ_IPI RzBinObject* rz_bin_file_object_find_by_id | ( | RzBinFile * | binfile, |
ut32 | binobj_id | ||
) |
RZ_IPI bool rz_bin_file_set_bytes | ( | RzBinFile * | binfile, |
const ut8 * | bytes, | ||
ut64 | sz, | ||
bool | steal_ptr | ||
) |
Definition at line 337 of file bfile.c.
References rz_bin_file_t::buf, bytes, NULL, rz_buf_free(), rz_buf_new_with_bytes(), rz_buf_new_with_pointers(), and rz_return_val_if_fail.
RZ_IPI bool rz_bin_file_set_obj | ( | RzBin * | bin, |
RzBinFile * | bf, | ||
RzBinObject * | obj | ||
) |
Definition at line 263 of file bfile.c.
References rz_bin_file_t::file, rz_bin_object_t::info, rz_bin_info_t::lang, rz_bin_object_t::lang, rz_bin_plugin_t::minstrlen, rz_bin_file_t::narch, rz_bin_file_t::o, rz_bin_file_cur_plugin(), rz_bin_language_to_string(), and rz_return_val_if_fail.
Referenced by rz_bin_file_set_cur_binfile(), rz_bin_object_new(), rz_bin_select(), rz_bin_select_bfid(), rz_bin_select_object(), and rz_bin_use_arch().
RZ_IPI RzBinFile* rz_bin_file_xtr_load_buffer | ( | RzBin * | bin, |
RzBinXtrPlugin * | xtr, | ||
const char * | filename, | ||
RzBuffer * | buf, | ||
RzBinObjectLoadOptions * | obj_opts, | ||
int | idx, | ||
int | fd | ||
) |
Definition at line 299 of file bfile.c.
References bytes, rz_bin_xtr_plugin_t::extractall_from_buffer, rz_bin_xtr_plugin_t::extractall_from_bytes, fd, rz_bin_file_load_options_t::loadaddr, rz_bin_file_t::loadaddr, rz_bin_xtr_plugin_t::name, NULL, rz_bin_file_find_by_name(), rz_bin_file_new(), rz_buf_data(), rz_buf_size(), rz_list_append(), rz_list_free(), RZ_LOG_INFO, rz_return_val_if_fail, ut64(), x, and rz_bin_file_t::xtr_data.
Referenced by rz_bin_open_buf().
RZ_IPI RzBinFile* rz_bin_file_xtr_load_bytes | ( | RzBin * | bin, |
RzBinXtrPlugin * | xtr, | ||
const char * | filename, | ||
const ut8 * | bytes, | ||
ut64 | sz, | ||
ut64 | file_sz, | ||
ut64 | baseaddr, | ||
ut64 | loadaddr, | ||
int | idx, | ||
int | fd | ||
) |
RZ_IPI RzBinPlugin* rz_bin_get_binplugin_any | ( | RzBin * | bin | ) |
RZ_IPI RzBinPlugin* rz_bin_get_binplugin_by_filename | ( | RzBin * | bin | ) |
Definition at line 365 of file bin.c.
References rz_bin_plugin_t::check_filename, NULL, rz_return_val_if_fail, and RZ_SYS_DIR.
Referenced by get_plugin_from_buffer().
RZ_IPI RzBinPlugin* rz_bin_get_binplugin_by_name | ( | RzBin * | bin, |
const char * | name | ||
) |
Definition at line 335 of file bin.c.
References rz_bin_plugin_t::name, NULL, and rz_return_val_if_fail.
Referenced by get_plugin_from_buffer(), and rz_bin_create().
RZ_IPI RzBinXtrPlugin* rz_bin_get_xtrplugin_by_name | ( | RzBin * | bin, |
const char * | name | ||
) |
Definition at line 383 of file bin.c.
References rz_bin_xtr_plugin_t::name, NULL, and rz_return_val_if_fail.
Referenced by rz_bin_file_new().
RZ_IPI RzBinObject* rz_bin_object_find_by_arch_bits | ( | RzBinFile * | binfile, |
const char * | arch, | ||
int | bits, | ||
const char * | name | ||
) |
Definition at line 644 of file bobj.c.
References rz_bin_info_t::arch, arch, rz_bin_info_t::bits, bits(), rz_bin_info_t::file, info(), rz_bin_object_t::info, NULL, rz_bin_file_t::o, and rz_return_val_if_fail.
Referenced by rz_bin_select(), rz_bin_select_object(), and rz_bin_use_arch().
RZ_IPI void rz_bin_object_free | ( | RzBinObject * | o | ) |
Definition at line 188 of file bobj.c.
References rz_bin_object_t::addrzklassmethod, rz_bin_object_t::binsym, rz_bin_object_t::classes, rz_bin_object_t::classes_ht, rz_bin_object_t::entries, rz_bin_object_t::fields, free(), i, rz_bin_object_t::import_name_symbols, rz_bin_object_t::imports, rz_bin_object_t::info, rz_bin_object_t::libs, rz_bin_object_t::lines, rz_bin_object_t::maps, rz_bin_object_t::mem, rz_bin_object_t::methods_ht, rz_bin_object_t::regstate, rz_bin_object_t::relocs, rz_bin_info_free(), rz_bin_reloc_storage_free(), rz_bin_source_line_info_free(), RZ_BIN_SPECIAL_SYMBOL_LAST, rz_bin_string_database_free(), rz_list_free(), rz_bin_object_t::sections, rz_bin_object_t::strings, rz_bin_object_t::symbols, and rz_bin_object_t::vfiles.
Referenced by rz_bin_file_free(), and rz_bin_object_new().
RZ_IPI ut64 rz_bin_object_get_baddr | ( | RzBinObject * | o | ) |
RZ_IPI RzBinObject* rz_bin_object_get_cur | ( | RzBin * | bin | ) |
Definition at line 639 of file bobj.c.
References NULL, and rz_return_val_if_fail.
RZ_IPI RzBinObject* rz_bin_object_new | ( | RzBinFile * | binfile, |
RzBinPlugin * | plugin, | ||
RzBinObjectLoadOptions * | opts, | ||
ut64 | offset, | ||
ut64 | sz | ||
) |
Definition at line 278 of file bobj.c.
References rz_bin_object_t::baddr_shift, rz_bin_file_load_options_t::baseaddr, rz_bin_object_t::boffset, rz_bin_file_t::buf, rz_bin_object_t::classes, rz_bin_object_t::classes_ht, rz_bin_file_t::fd, free(), rz_bin_object_t::kv, rz_bin_plugin_t::load_buffer, rz_bin_file_load_options_t::loadaddr, rz_bin_object_t::methods_ht, rz_bin_plugin_t::name, NULL, rz_bin_object_t::obj_size, rz_bin_object_t::opts, rz_bin_object_t::plugin, rz_bin_file_t::rbin, sdb_t::refs, rz_bin_object_t::regstate, rz_bin_class_free(), rz_bin_file_set_obj(), rz_bin_object_free(), rz_bin_object_set_items(), rz_bin_set_baddr(), rz_buf_size(), rz_list_newf(), RZ_LOG_ERROR, RZ_LOG_WARN, RZ_NEW0, rz_return_val_if_fail, rz_str_newf(), rz_bin_file_t::sdb, rz_bin_t::sdb, sdb_ns_set(), ut64(), UT64_MAX, and rz_bin_t::verbose.
Referenced by rz_bin_file_new_from_buffer(), and rz_bin_file_object_new_from_xtr_data().