diff --git a/libr/bin/dbginfo.c b/libr/bin/dbginfo.c index 263def29e3180..7f0882a36e744 100644 --- a/libr/bin/dbginfo.c +++ b/libr/bin/dbginfo.c @@ -15,8 +15,7 @@ static void r_bin_dbgitem_free(RBinDbgItem *di) { } } -// R2_600 - make this api public -static RBinDbgItem *r_bin_dbgitem_at(RBin *bin, ut64 addr) { +R_API RBinDbgItem *r_bin_dbgitem_at(RBin *bin, ut64 addr) { r_strf_var (key, 64, "0x%"PFMT64x, addr); // TODO: use sdb_itoa because its faster char *data = sdb_get (bin->cur->sdb_addrinfo, key, 0); if (data) { diff --git a/libr/include/r_bin.h b/libr/include/r_bin.h index 6f0196f284c69..49f5c771c20fb 100644 --- a/libr/include/r_bin.h +++ b/libr/include/r_bin.h @@ -888,9 +888,12 @@ R_API const char *r_bin_get_meth_flag_string(ut64 flag, bool compact); R_API RBinSection *r_bin_get_section_at(RBinObject *o, ut64 off, int va); /* dbginfo.c */ +// R2_600 - refactor and optimize storage +R_API RBinDbgItem *r_bin_dbgitem_at(RBin *bin, ut64 addr); R_API bool r_bin_addr2line(RBin *bin, ut64 addr, char *file, int len, int *line, int *column); R_API char *r_bin_addr2text(RBin *bin, ut64 addr, int origin); R_API char *r_bin_addr2fileline(RBin *bin, ut64 addr); + /* bin_write.c */ R_API bool r_bin_wr_addlib(RBin *bin, const char *lib); R_API ut64 r_bin_wr_scn_resize(RBin *bin, const char *name, ut64 size);