mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 23:50:40 +00:00
Get current section baddr if multiple files are open
This commit is contained in:
parent
abc5575dfc
commit
a494a59901
@ -65,7 +65,7 @@ R_API int r_core_lines_initcache (RCore *core, ut64 start_addr, ut64 end_addr) {
|
||||
int bsz = core->blocksize;
|
||||
char *buf;
|
||||
ut64 off = start_addr;
|
||||
ut64 baddr = r_config_get_i (core->config, "bin.baddr");
|
||||
ut64 baddr;
|
||||
if (start_addr == UT64_MAX || end_addr == UT64_MAX) {
|
||||
return -1;
|
||||
}
|
||||
@ -76,6 +76,11 @@ R_API int r_core_lines_initcache (RCore *core, ut64 start_addr, ut64 end_addr) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
{
|
||||
RIOSection *s = r_io_section_mget_in (core->io, core->offset);
|
||||
baddr = s ? s->offset : r_config_get_i (core->config, "bin.baddr");
|
||||
}
|
||||
|
||||
line_count = start_addr ? 0 : 1;
|
||||
core->print->lines_cache[0] = start_addr ? 0 : baddr;
|
||||
r_cons_break (NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user