From 8aab8faf305c8e9ba2883232e30f27822feb4ba5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Apr 2020 23:37:11 +0200 Subject: [PATCH] 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! :^) --- DevTools/ProfileViewer/DisassemblyModel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DevTools/ProfileViewer/DisassemblyModel.cpp b/DevTools/ProfileViewer/DisassemblyModel.cpp index 52f6552a737..e2ca4028c55 100644 --- a/DevTools/ProfileViewer/DisassemblyModel.cpp +++ b/DevTools/ProfileViewer/DisassemblyModel.cpp @@ -54,7 +54,12 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node) : m_profile(profile) , m_node(node) { - m_file = make(profile.executable_path()); + String path; + if (m_node.address() >= 0xc0000000) + path = "/boot/kernel"; + else + path = profile.executable_path(); + m_file = make(path); if (!m_file->is_valid()) return;