You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
it's confuse for me to use R_API bool r_bin_open(RBin *bin, const char *file, RBinFileOptions *opt); this c api in r2,i hope to use r2 for my own security tools,but,i got this assert WARN: r_bin_open: assertion 'bin && bin->iob.io && opt' failed (line 231) when i run my the demo in r2-building
code is in here:
int main() {
RBinFileOptions *opt;
RBin *bin = r_bin_new();
r_bin_file_options_init(opt,0,0x400000,0,1);
bin->verbose = false;
ut64 baseaddr = UT64_MAX;
r_bin_file_open (bin, "./afs",opt);
bool isLoaded = r_bin_open (bin, "./afs",opt);
if (isLoaded) {
RListIter *iter;
RBinAddr *ent;
const RList *entries = r_bin_get_entries (bin);
r_list_foreach (entries, iter, ent) {
printf ("-> 0x%"PFMT64x"\n", ent->vaddr);
}
RBinSymbol *sym;
const RList *symbols = r_bin_get_symbols (bin);
r_list_foreach (symbols, iter, sym) {
printf ("-> %s\n", sym->name);
}
}
r_bin_free (bin);
return 0;
}
i hope to get a demo just how to open bin
Beta Was this translation helpful? Give feedback.
All reactions