1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:38:12 +00:00

Profiler: Unbreak DisassemblyModel after shared library introduction

This was failing to take the library base address into account when
tallying up the samples at each instruction.
This commit is contained in:
Andreas Kling 2021-02-27 17:26:57 +01:00
parent 19fc62f445
commit 2f0ea9ae33

View file

@ -97,7 +97,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
auto insn = disassembler.next();
if (!insn.has_value())
break;
FlatPtr address_in_profiled_program = symbol.value().value() + offset_into_symbol;
FlatPtr address_in_profiled_program = base_address + symbol.value().value() + offset_into_symbol;
auto disassembly = insn.value().to_string(address_in_profiled_program, &symbol_provider);