Skip to content

Commit

Permalink
Make r_bin_dbgitem_at api public
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Jan 14, 2025
1 parent 92d45a6 commit 0f85675
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions libr/bin/dbginfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions libr/include/r_bin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0f85675

Please sign in to comment.