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:
parent
34d07e35bd
commit
8aab8faf30
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue