return -1;
}
- stack_size = map->end - sp;
+ stack_size = map__end(map) - sp;
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
return -1;
}
- stack_size = map->end - sp;
+ stack_size = map__end(map) - sp;
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
return -1;
}
- stack_size = map->end - sp;
+ stack_size = map__end(map) - sp;
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
return skip_slot;
}
- rc = check_return_addr(dso, al.map->start, ip);
+ rc = check_return_addr(dso, map__start(al.map), ip);
pr_debug("[DSO %s, sym %s, ip 0x%" PRIx64 "] rc %d\n",
dso->long_name, al.sym->name, ip, rc);
return -1;
}
- stack_size = map->end - sp;
+ stack_size = map__end(map) - sp;
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
event->mmap.header.size = size;
- event->mmap.start = map->start;
- event->mmap.len = map->end - map->start;
+ event->mmap.start = map__start(map);
+ event->mmap.len = map__size(map);
event->mmap.pgoff = map->pgoff;
event->mmap.pid = machine->pid;
memset(bid_buf, 0, sizeof(bid_buf));
if (dso->has_build_id)
build_id__sprintf(&dso->bid, bid_buf);
- printf("%s %16" PRIx64 " %16" PRIx64, bid_buf, map->start, map->end);
+ printf("%s %16" PRIx64 " %16" PRIx64, bid_buf, map__start(map), map__end(map));
if (dso->long_name != NULL) {
printf(" %s", dso->long_name);
} else if (dso->short_name != NULL) {
const struct dso *dso = map__dso(map);
printed += fprintf(fp, "%*s %" PRIx64 "-%" PRIx64 " %c%c%c%c %08" PRIx64 " %" PRIu64 " %s\n",
- indent, "", map->start, map->end,
+ indent, "", map__start(map), map__end(map),
map->prot & PROT_READ ? 'r' : '-',
map->prot & PROT_WRITE ? 'w' : '-',
map->prot & PROT_EXEC ? 'x' : '-',
if (al.addr < al.sym->end)
off = al.addr - al.sym->start;
else
- off = al.addr - al.map->start - al.sym->start;
+ off = al.addr - map__start(al.map) - al.sym->start;
printed += fprintf(fp, "\t%s", al.sym->name);
if (off)
printed += fprintf(fp, "%+d", off);
"Not all samples will be on the annotation output.\n\n"
"Please report to linux-kernel@vger.kernel.org\n",
ip, dso->long_name, dso__symtab_origin(dso),
- map->start, map->end, sym->start, sym->end,
+ map__start(map), map__end(map), sym->start, sym->end,
sym->binding == STB_GLOBAL ? 'g' :
sym->binding == STB_LOCAL ? 'l' : 'w', sym->name,
err ? "[unknown]" : uts.machine,
len = BUFSZ;
/* Do not go off the map */
- if (addr + len > al.map->end)
- len = al.map->end - addr;
+ if (addr + len > map__end(al.map))
+ len = map__end(al.map) - addr;
/* Read the object code using perf */
ret_len = dso__data_read_offset(dso, maps__machine(thread->maps),
size_t d;
for (d = 0; d < state->done_cnt; d++) {
- if (state->done[d] == al.map->start) {
+ if (state->done[d] == map__start(al.map)) {
pr_debug("kcore map tested already");
pr_debug(" - skipping\n");
goto out;
pr_debug("Too many kcore maps - skipping\n");
goto out;
}
- state->done[state->done_cnt++] = al.map->start;
+ state->done[state->done_cnt++] = map__start(al.map);
}
objdump_name = dso->long_name;
if (i > 0)
TEST_ASSERT_VAL("less maps expected", (map && i < size) || (!map && i == size));
- TEST_ASSERT_VAL("wrong map start", map->start == merged[i].start);
- TEST_ASSERT_VAL("wrong map end", map->end == merged[i].end);
+ TEST_ASSERT_VAL("wrong map start", map__start(map) == merged[i].start);
+ TEST_ASSERT_VAL("wrong map end", map__end(map) == merged[i].end);
TEST_ASSERT_VAL("wrong map name", !strcmp(map__dso(map)->name, merged[i].name));
TEST_ASSERT_VAL("wrong map refcnt", refcount_read(&map->refcnt) == 1);
break;
}
- pr_debug("map %p, addr %" PRIx64 "\n", al.map, al.map->start);
+ pr_debug("map %p, addr %" PRIx64 "\n", al.map, map__start(al.map));
}
machine__delete_threads(machine);
continue;
}
- } else if (mem_start == kallsyms.vmlinux_map->end) {
+ } else if (mem_start == map__end(kallsyms.vmlinux_map)) {
/*
* Ignore aliases to _etext, i.e. to the end of the kernel text area,
* such as __indirect_thunk_end.
maps__for_each_entry(maps, rb_node) {
struct map *pair, *map = rb_node->map;
- mem_start = vmlinux_map->unmap_ip(vmlinux_map, map->start);
- mem_end = vmlinux_map->unmap_ip(vmlinux_map, map->end);
+ mem_start = vmlinux_map->unmap_ip(vmlinux_map, map__start(map));
+ mem_end = vmlinux_map->unmap_ip(vmlinux_map, map__end(map));
pair = maps__find(kallsyms.kmaps, mem_start);
if (pair == NULL || pair->priv)
continue;
- if (pair->start == mem_start) {
+ if (map__start(pair) == mem_start) {
struct dso *dso = map__dso(map);
if (!header_printed) {
}
pr_info("WARN: %" PRIx64 "-%" PRIx64 " %" PRIx64 " %s in kallsyms as",
- map->start, map->end, map->pgoff, dso->name);
- if (mem_end != pair->end)
+ map__start(map), map__end(map), map->pgoff, dso->name);
+ if (mem_end != map__end(pair))
pr_info(":\nWARN: *%" PRIx64 "-%" PRIx64 " %" PRIx64,
- pair->start, pair->end, pair->pgoff);
+ map__start(pair), map__end(pair), pair->pgoff);
pr_info(" %s\n", dso->name);
pair->priv = 1;
}
if (start &&
(start->ms.sym == ams->ms.sym ||
(ams->ms.sym &&
- start->addr == ams->ms.sym->start + ams->ms.map->start)))
+ start->addr == ams->ms.sym->start + map__start(ams->ms.map))))
saddr = start->al_addr;
if (saddr == 0)
pr_debug2("BB with bad start: addr %"PRIx64" start %"PRIx64" sym %"PRIx64" saddr %"PRIx64"\n",
ams->addr,
start ? start->addr : 0,
- ams->ms.sym ? ams->ms.sym->start + ams->ms.map->start : 0,
+ ams->ms.sym ? ams->ms.sym->start + map__start(ams->ms.map) : 0,
saddr);
err = symbol__account_cycles(ams->al_addr, saddr, ams->ms.sym, cycles);
if (err)
if (al->addr < sym->end)
d_al->symoff = al->addr - sym->start;
else
- d_al->symoff = al->addr - al->map->start - sym->start;
+ d_al->symoff = al->addr - map__start(al->map) - sym->start;
d_al->sym_binding = sym->binding;
} else {
d_al->sym = NULL;
map = al->map;
- if (map && ip >= map->start && ip < map->end &&
+ if (map && ip >= map__start(map) && ip < map__end(map) &&
machine__kernel_ip(d->machine, ip) == machine__kernel_ip(d->machine, d->sample->ip))
goto have_map;
map = a.map;
have_map:
offset = map->map_ip(map, ip);
- if (ip + len >= map->end)
- len = map->end - ip;
+ if (ip + len >= map__end(map))
+ len = map__end(map) - ip;
return dso__data_read_offset(map__dso(map), d->machine, offset, buf, len);
}
goto out_no_cache;
}
- if (*ip >= al.map->end)
+ if (*ip >= map__end(al.map))
break;
offset += intel_pt_insn->length;
if (sym->binding == STB_GLOBAL &&
!strcmp(sym->name, "__switch_to")) {
ip = map->unmap_ip(map, sym->start);
- if (ip >= map->start && ip < map->end) {
+ if (ip >= map__start(map) && ip < map__end(map)) {
switch_ip = ip;
break;
}
for (sym = start; sym; sym = dso__next_symbol(sym)) {
if (!strcmp(sym->name, ptss)) {
ip = map->unmap_ip(map, sym->start);
- if (ip >= map->start && ip < map->end) {
+ if (ip >= map__start(map) && ip < map__end(map)) {
*ptss_ip = ip;
break;
}
static int intel_pt_find_map(struct thread *thread, u8 cpumode, u64 addr,
struct addr_location *al)
{
- if (!al->map || addr < al->map->start || addr >= al->map->end) {
+ if (!al->map || addr < map__start(al->map) || addr >= map__end(al->map)) {
if (!thread__find_map(thread, cpumode, addr, al))
return -1;
}
}
map->start = event->ksymbol.addr;
- map->end = map->start + event->ksymbol.len;
+ map->end = map__start(map) + event->ksymbol.len;
err = maps__insert(machine__kernel_maps(machine), map);
map__put(map);
if (err)
dso = map__dso(map);
}
- sym = symbol__new(map->map_ip(map, map->start),
+ sym = symbol__new(map->map_ip(map, map__start(map)),
event->ksymbol.len,
0, 0, event->ksymbol.name);
if (!sym)
else {
struct dso *dso = map__dso(map);
- sym = dso__find_symbol(dso, map->map_ip(map, map->start));
+ sym = dso__find_symbol(dso, map->map_ip(map, map__start(map)));
if (sym)
dso__delete_symbol(dso, sym);
}
if (!err) {
pr_debug2("Added extra kernel map %s %" PRIx64 "-%" PRIx64 "\n",
- kmap->name, map->start, map->end);
+ kmap->name, map__start(map), map__end(map));
}
map__put(map);
struct map_rb_node *next = map_rb_node__next(rb_node);
if (next)
- machine__set_kernel_mmap(machine, start, next->map->start);
+ machine__set_kernel_mmap(machine, start, map__start(next->map));
}
out_put:
if (map == NULL)
goto out_problem;
- map->end = map->start + xm->end - xm->start;
+ map->end = map__start(map) + xm->end - xm->start;
if (build_id__is_defined(bid))
dso__set_build_id(map__dso(map), bid);
* kernel_start = 1ULL << 63 for x86_64.
*/
if (!err && !machine__is(machine, "x86_64"))
- machine->kernel_start = map->start;
+ machine->kernel_start = map__start(map);
}
return err;
}
const struct dso *dso = map__dso(map);
return fprintf(fp, " %" PRIx64 "-%" PRIx64 " %" PRIx64 " %s\n",
- map->start, map->end, map->pgoff, dso->name);
+ map__start(map), map__end(map), map->pgoff, dso->name);
}
size_t map__fprintf_dsoname(struct map *map, FILE *fp)
{
u64 ip = map->unmap_ip(map, sym->start);
- return ip >= map->start && ip < map->end;
+ return ip >= map__start(map) && ip < map__end(map);
}
struct kmap *__map__kmap(struct map *map)
u64 map__map_ip(const struct map *map, u64 ip)
{
- return ip - map->start + map->pgoff;
+ return ip - map__start(map) + map->pgoff;
}
u64 map__unmap_ip(const struct map *map, u64 ip)
{
- return ip + map->start - map->pgoff;
+ return ip + map__start(map) - map->pgoff;
}
u64 identity__map_ip(const struct map *map __maybe_unused, u64 ip)
return map->dso;
}
+static inline u64 map__start(const struct map *map)
+{
+ return map->start;
+}
+
+static inline u64 map__end(const struct map *map)
+{
+ return map->end;
+}
+
static inline size_t map__size(const struct map *map)
{
- return map->end - map->start;
+ return map__end(map) - map__start(map);
}
/* rip/ip <-> addr suitable for passing to `objdump --start-address=` */
{
struct rb_node **p = &maps__entries(maps)->rb_node;
struct rb_node *parent = NULL;
- const u64 ip = map->start;
+ const u64 ip = map__start(map);
struct map_rb_node *m, *new_rb_node;
new_rb_node = malloc(sizeof(*new_rb_node));
while (*p != NULL) {
parent = *p;
m = rb_entry(parent, struct map_rb_node, rb_node);
- if (ip < m->map->start)
+ if (ip < map__start(m->map))
p = &(*p)->rb_left;
else
p = &(*p)->rb_right;
int maps__find_ams(struct maps *maps, struct addr_map_symbol *ams)
{
- if (ams->addr < ams->ms.map->start || ams->addr >= ams->ms.map->end) {
+ if (ams->addr < map__start(ams->ms.map) || ams->addr >= map__end(ams->ms.map)) {
if (maps == NULL)
return -1;
ams->ms.map = maps__find(maps, ams->addr);
while (next) {
struct map_rb_node *pos = rb_entry(next, struct map_rb_node, rb_node);
- if (pos->map->end > map->start) {
+ if (map__end(pos->map) > map__start(map)) {
first = next;
- if (pos->map->start <= map->start)
+ if (map__start(pos->map) <= map__start(map))
break;
next = next->rb_left;
} else
* Stop if current map starts after map->end.
* Maps are ordered by start: next will not overlap for sure.
*/
- if (pos->map->start >= map->end)
+ if (map__start(pos->map) >= map__end(map))
break;
if (verbose >= 2) {
* Now check if we need to create new maps for areas not
* overlapped by the new map:
*/
- if (map->start > pos->map->start) {
+ if (map__start(map) > map__start(pos->map)) {
struct map *before = map__clone(pos->map);
if (before == NULL) {
goto put_map;
}
- before->end = map->start;
+ before->end = map__start(map);
err = __maps__insert(maps, before);
if (err)
goto put_map;
map__put(before);
}
- if (map->end < pos->map->end) {
+ if (map__end(map) < map__end(pos->map)) {
struct map *after = map__clone(pos->map);
if (after == NULL) {
goto put_map;
}
- after->start = map->end;
- after->pgoff += map->end - pos->map->start;
- assert(pos->map->map_ip(pos->map, map->end) ==
- after->map_ip(after, map->end));
+ after->start = map__end(map);
+ after->pgoff += map__end(map) - map__start(pos->map);
+ assert(pos->map->map_ip(pos->map, map__end(map)) ==
+ after->map_ip(after, map__end(map)));
err = __maps__insert(maps, after);
if (err)
goto put_map;
p = maps__entries(maps)->rb_node;
while (p != NULL) {
m = rb_entry(p, struct map_rb_node, rb_node);
- if (ip < m->map->start)
+ if (ip < map__start(m->map))
p = p->rb_left;
- else if (ip >= m->map->end)
+ else if (ip >= map__end(m->map))
p = p->rb_right;
else
goto out;
return -ENOENT;
*addr = map->unmap_ip(map, sym->start) -
((reloc) ? 0 : map->reloc) -
- ((reladdr) ? map->start : 0);
+ ((reladdr) ? map__start(map) : 0);
}
return 0;
}
map = kernel_get_module_map(NULL);
if (map) {
- ret = address <= map->start || map->end < address;
+ ret = address <= map__start(map) || map__end(map) < address;
if (ret)
pr_warning("%s is out of .text, skip it.\n", symbol);
map__put(map);
if (al->addr < sym->end)
offset = al->addr - sym->start;
else
- offset = al->addr - al->map->start - sym->start;
+ offset = al->addr - map__start(al->map) - sym->start;
return offset;
}
pydict_set_item_string_decref(dict, dso_bid_field,
_PyUnicode_FromString(sbuild_id));
pydict_set_item_string_decref(dict, dso_map_start,
- PyLong_FromUnsignedLong(al->map->start));
+ PyLong_FromUnsignedLong(map__start(al->map)));
pydict_set_item_string_decref(dict, dso_map_end,
- PyLong_FromUnsignedLong(al->map->end));
+ PyLong_FromUnsignedLong(map__end(al->map)));
}
if (al->sym) {
pydict_set_item_string_decref(dict, sym_field,
if (*remap_kernel && dso->kernel && !kmodule) {
*remap_kernel = false;
map->start = shdr->sh_addr + ref_reloc(kmap);
- map->end = map->start + shdr->sh_size;
+ map->end = map__start(map) + shdr->sh_size;
map->pgoff = shdr->sh_offset;
map->map_ip = map__map_ip;
map->unmap_ip = map__unmap_ip;
u64 start = sym->st_value;
if (kmodule)
- start += map->start + shdr->sh_offset;
+ start += map__start(map) + shdr->sh_offset;
curr_dso = dso__new(dso_name);
if (curr_dso == NULL)
if (adjust_kernel_syms) {
curr_map->start = shdr->sh_addr + ref_reloc(kmap);
- curr_map->end = curr_map->start + shdr->sh_size;
+ curr_map->end = map__start(curr_map) + shdr->sh_size;
curr_map->pgoff = shdr->sh_offset;
} else {
curr_map->map_ip = curr_map->unmap_ip = identity__map_ip;
* attempted to prelink vdso to its virtual address.
*/
if (dso__is_vdso(dso))
- map->reloc = map->start - dso->text_offset;
+ map->reloc = map__start(map) - dso->text_offset;
dso->adjust_symbols = runtime_ss->adjust_symbols || ref_reloc(kmap);
/*
down_write(maps__lock(maps));
maps__for_each_entry(maps, curr) {
- if (prev != NULL && !prev->map->end)
- prev->map->end = curr->map->start;
+ if (prev != NULL && !map__end(prev->map))
+ prev->map->end = map__start(curr->map);
prev = curr;
}
* We still haven't the actual symbols, so guess the
* last map final address.
*/
- if (curr && !curr->map->end)
+ if (curr && !map__end(curr->map))
curr->map->end = ~0ULL;
up_write(maps__lock(maps));
continue;
}
curr_map_dso = map__dso(curr_map);
- pos->start -= curr_map->start - curr_map->pgoff;
- if (pos->end > curr_map->end)
- pos->end = curr_map->end;
+ pos->start -= map__start(curr_map) - curr_map->pgoff;
+ if (pos->end > map__end(curr_map))
+ pos->end = map__end(curr_map);
if (pos->end)
- pos->end -= curr_map->start - curr_map->pgoff;
+ pos->end -= map__start(curr_map) - curr_map->pgoff;
symbols__insert(&curr_map_dso->symbols, pos);
++count;
}
dso = map__dso(old_map);
/* Module must be in memory at the same address */
mi = find_module(dso->short_name, &modules);
- if (!mi || mi->start != old_map->start) {
+ if (!mi || mi->start != map__start(old_map)) {
err = -EINVAL;
goto out;
}
return -ENOMEM;
}
- list_node->map->end = list_node->map->start + len;
+ list_node->map->end = map__start(list_node->map) + len;
list_node->map->pgoff = pgoff;
list_add(&list_node->node, &md->maps);
struct map *old_map = rb_node->map;
/* no overload with this one */
- if (new_map->end < old_map->start ||
- new_map->start >= old_map->end)
+ if (map__end(new_map) < map__start(old_map) ||
+ map__start(new_map) >= map__end(old_map))
continue;
- if (new_map->start < old_map->start) {
+ if (map__start(new_map) < map__start(old_map)) {
/*
* |new......
* |old....
*/
- if (new_map->end < old_map->end) {
+ if (map__end(new_map) < map__end(old_map)) {
/*
* |new......| -> |new..|
* |old....| -> |old....|
*/
- new_map->end = old_map->start;
+ new_map->end = map__start(old_map);
} else {
/*
* |new.............| -> |new..| |new..|
goto out;
}
- m->map->end = old_map->start;
+ m->map->end = map__start(old_map);
list_add_tail(&m->node, &merged);
- new_map->pgoff += old_map->end - new_map->start;
- new_map->start = old_map->end;
+ new_map->pgoff += map__end(old_map) - map__start(new_map);
+ new_map->start = map__end(old_map);
}
} else {
/*
* |new......
* |old....
*/
- if (new_map->end < old_map->end) {
+ if (map__end(new_map) < map__end(old_map)) {
/*
* |new..| -> x
* |old.........| -> |old.........|
* |new......| -> |new...|
* |old....| -> |old....|
*/
- new_map->pgoff += old_map->end - new_map->start;
- new_map->start = old_map->end;
+ new_map->pgoff += map__end(old_map) - map__start(new_map);
+ new_map->start = map__end(old_map);
}
}
}
list_for_each_entry(new_node, &md.maps, node) {
struct map *new_map = new_node->map;
- u64 new_size = new_map->end - new_map->start;
+ u64 new_size = map__size(new_map);
- if (!(stext >= new_map->start && stext < new_map->end))
+ if (!(stext >= map__start(new_map) && stext < map__end(new_map)))
continue;
/*
list_del_init(&new_node->node);
if (new_map == replacement_map) {
- map->start = new_map->start;
- map->end = new_map->end;
+ map->start = map__start(new_map);
+ map->end = map__end(new_map);
map->pgoff = new_map->pgoff;
map->map_ip = new_map->map_ip;
map->unmap_ip = new_map->unmap_ip;
if (al->addr < sym->end)
offset = al->addr - sym->start;
else
- offset = al->addr - al->map->start - sym->start;
+ offset = al->addr - map__start(al->map) - sym->start;
length += fprintf(fp, "+0x%lx", offset);
}
return length;
(sizeof(event->mmap2.filename) - size));
memset(event->mmap2.filename + size, 0, machine->id_hdr_size);
event->mmap2.header.size += machine->id_hdr_size;
- event->mmap2.start = map->start;
- event->mmap2.len = map->end - map->start;
+ event->mmap2.start = map__start(map);
+ event->mmap2.len = map__size(map);
event->mmap2.pid = machine->pid;
memcpy(event->mmap2.filename, dso->long_name, dso->long_name_len + 1);
(sizeof(event->mmap.filename) - size));
memset(event->mmap.filename + size, 0, machine->id_hdr_size);
event->mmap.header.size += machine->id_hdr_size;
- event->mmap.start = map->start;
- event->mmap.len = map->end - map->start;
+ event->mmap.start = map__start(map);
+ event->mmap.len = map__size(map);
event->mmap.pid = machine->pid;
memcpy(event->mmap.filename, dso->long_name, dso->long_name_len + 1);
event->mmap2.header.size = (sizeof(event->mmap2) -
(sizeof(event->mmap2.filename) - size) + machine->id_hdr_size);
event->mmap2.pgoff = kmap->ref_reloc_sym->addr;
- event->mmap2.start = map->start;
- event->mmap2.len = map->end - event->mmap.start;
+ event->mmap2.start = map__start(map);
+ event->mmap2.len = map__end(map) - event->mmap.start;
event->mmap2.pid = machine->pid;
perf_record_mmap2__read_build_id(&event->mmap2, machine, true);
event->mmap.header.size = (sizeof(event->mmap) -
(sizeof(event->mmap.filename) - size) + machine->id_hdr_size);
event->mmap.pgoff = kmap->ref_reloc_sym->addr;
- event->mmap.start = map->start;
- event->mmap.len = map->end - event->mmap.start;
+ event->mmap.start = map__start(map);
+ event->mmap.len = map__end(map) - event->mmap.start;
event->mmap.pid = machine->pid;
}
Dwarf_Addr s;
dwfl_module_info(mod, NULL, &s, NULL, NULL, NULL, NULL, NULL);
- if (s != al->map->start - al->map->pgoff)
+ if (s != map__start(al->map) - al->map->pgoff)
mod = 0;
}
if (!mod)
mod = dwfl_report_elf(ui->dwfl, dso->short_name, dso->long_name, -1,
- al->map->start - al->map->pgoff, false);
+ map__start(al->map) - al->map->pgoff, false);
if (!mod) {
char filename[PATH_MAX];
if (dso__build_id_filename(dso, filename, sizeof(filename), false))
mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1,
- al->map->start - al->map->pgoff, false);
+ map__start(al->map) - al->map->pgoff, false);
}
if (mod) {
maps__for_each_entry(ui->thread->maps, map_node) {
struct map *map = map_node->map;
+ u64 start = map__start(map);
- if (map__dso(map) == dso && map->start < base_addr)
- base_addr = map->start;
+ if (map__dso(map) == dso && start < base_addr)
+ base_addr = start;
}
base_addr -= dso->data.elf_base_addr;
/* Address of .eh_frame_hdr */
if (!read_unwind_spec_eh_frame(dso, ui, &table_data, &segbase, &fde_count)) {
memset(&di, 0, sizeof(di));
di.format = UNW_INFO_FORMAT_REMOTE_TABLE;
- di.start_ip = map->start;
- di.end_ip = map->end;
+ di.start_ip = map__start(map);
+ di.end_ip = map__end(map);
di.u.rti.segbase = segbase;
di.u.rti.table_data = table_data;
di.u.rti.table_len = fde_count * sizeof(struct table_entry)
!read_unwind_spec_debug_frame(dso, ui->machine, &segbase)) {
int fd = dso__data_get_fd(dso, ui->machine);
int is_exec = elf_is_exec(fd, dso->name);
- unw_word_t base = is_exec ? 0 : map->start;
+ u64 start = map__start(map);
+ unw_word_t base = is_exec ? 0 : start;
const char *symfile;
if (fd >= 0)
symfile = dso->symsrc_filename ?: dso->name;
memset(&di, 0, sizeof(di));
- if (dwarf_find_debug_frame(0, &di, ip, base, symfile,
- map->start, map->end))
+ if (dwarf_find_debug_frame(0, &di, ip, base, symfile, start, map__end(map)))
return dwarf_search_unwind_table(as, ip, &di, pi,
need_unwind_info, arg);
}