mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 20:39:46 +00:00
add r_io-wrappers in r_bin
This commit is contained in:
parent
5663e41177
commit
06076207fb
@ -1880,3 +1880,19 @@ R_API void r_bin_force_plugin (RBin *bin, const char *name) {
|
||||
bin->force = strdup (name);
|
||||
} else bin->force = NULL;
|
||||
}
|
||||
|
||||
R_API int r_bin_read_at (RBin *bin, ut64 addr, ut8 *buf, int size)
|
||||
{
|
||||
RIOBind *iob;
|
||||
if (!bin || !(iob = &(bin->iob)))
|
||||
return R_FALSE;
|
||||
return iob->read_at (iob->io, addr, buf, size);
|
||||
}
|
||||
|
||||
R_API int r_bin_write_at (RBin *bin, ut64 addr, const ut8 *buf, int size)
|
||||
{
|
||||
RIOBind *iob;
|
||||
if (!bin || !(iob = &(bin->iob)))
|
||||
return R_FALSE;
|
||||
return iob->write_at (iob->io, addr, buf, size);
|
||||
}
|
||||
|
@ -392,6 +392,10 @@ R_API int r_bin_xtr_add(RBin *bin, RBinXtrPlugin *foo);
|
||||
R_API void* r_bin_free(RBin *bin);
|
||||
R_API int r_bin_load_languages(RBinFile *binfile);
|
||||
R_API int r_bin_dump_strings(RBinFile *a, int min);
|
||||
//io-wrappers
|
||||
R_API int r_bin_read_at (RBin *bin, ut64 addr, ut8 *buf, int size);
|
||||
R_API int r_bin_write_at (RBin *bin, ut64 addr, const ut8 *buf, int size);
|
||||
|
||||
// ref
|
||||
R_API int r_bin_file_deref_by_bind (RBinBind * binb);
|
||||
R_API int r_bin_file_deref (RBin *bin, RBinFile * a);
|
||||
|
Loading…
x
Reference in New Issue
Block a user