mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-13 05:48:12 +00:00
Use correct type for phdr addresses.
This commit is contained in:
@@ -7472,14 +7472,14 @@ phdr_callback_mock (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED,
|
||||
|
||||
// calculate the end address as well, so we can quickly determine if a PC is within the range of this image
|
||||
// headers aren't guaranteed to be in address order; find the max
|
||||
ptr->dlpi_end_addr = uintptr_t(info->dlpi_addr);
|
||||
ptr->dlpi_end_addr = ElfW(Addr)(info->dlpi_addr);
|
||||
for (uint32_t i = 0; i < info->dlpi_phnum; i++)
|
||||
{
|
||||
const auto &phdr = info->dlpi_phdr[i];
|
||||
if (phdr.p_type != PT_LOAD)
|
||||
continue;
|
||||
|
||||
const auto phdr_end = uintptr_t(info->dlpi_addr + phdr.p_vaddr + phdr.p_memsz);
|
||||
const auto phdr_end = ElfW(Addr)(info->dlpi_addr + phdr.p_vaddr + phdr.p_memsz);
|
||||
ptr->dlpi_end_addr = std::max(phdr_end, ptr->dlpi_end_addr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user