1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:55:08 +00:00

ProfileViewer: Open /boot/kernel for disassembly if possible

If you have access to /boot/kernel, you can see the disassembly of
kernel code in ProfileViewer. This is really useful! :^)
This commit is contained in:
Andreas Kling 2020-04-11 23:37:11 +02:00
parent 34d07e35bd
commit 8aab8faf30

View file

@ -54,7 +54,12 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
: m_profile(profile)
, m_node(node)
{
m_file = make<MappedFile>(profile.executable_path());
String path;
if (m_node.address() >= 0xc0000000)
path = "/boot/kernel";
else
path = profile.executable_path();
m_file = make<MappedFile>(path);
if (!m_file->is_valid())
return;