Skip to content

Iovaseeeks #23831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions libr/core/cbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,9 +1579,11 @@ static bool bin_entry(RCore *r, PJ *pj, int mode, ut64 laddr, int va, bool inifi
free (s);
r_table_free (table);
} else if (IS_MODE_SET (mode)) {
if (entry) {
ut64 at = rva (r->bin, entry->paddr, entry->vaddr, va);
r_core_seek (r, at, false);
if (r_config_get_b (r->config, "io.va")) {
if (entry) {
ut64 at = rva (r->bin, entry->paddr, entry->vaddr, va);
r_core_seek (r, at, false);
}
}
} else if (IS_MODE_RAD (mode)) {
r_cons_println ("'fs-");
Expand Down Expand Up @@ -4835,12 +4837,11 @@ R_API bool r_core_bin_info(RCore *core, int action, PJ *pj, int mode, int va, RC
}
if ((action & R_CORE_BIN_ACC_FIELDS)) {
if (IS_MODE_SIMPLE (mode)) {
// ret &= bin_fields (core, NULL, mode, va);
ret &= bin_fields (core, NULL, mode, va);
// ret &= bin_header (core, mode);
} else if (IS_MODE_NORMAL (mode)) {
// ret &= bin_header (core, mode);
ret &= bin_fields (core, NULL, mode, va);
// ret &= bin_header (core, mode);
} else {
if ((action & R_CORE_BIN_ACC_HEADER) || action & R_CORE_BIN_ACC_FIELDS) {
ret &= bin_fields (core, pj, mode, va);
Expand Down
22 changes: 22 additions & 0 deletions test/db/cmd/cmd_io
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,25 @@ nth vaddr bind type lib name
6 ---------- WEAK FUNC __cxa_finalize
EOF
RUN

NAME=opseeks
FILE=bins/mach0/ls-m1
CMDS=<<EOF
o
e io.va=0
s 0
op 3
s
op 4
s
op 3
s
EOF
EXPECT=<<EOF
3 * r-x 0x0002daa0 bins/mach0/ls-m1
4 - r-- 0x00002560 null://9568
0x0
0x0
0x0
EOF
RUN
Loading