summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler/DisassemblyModel.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-07-20 13:40:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-20 15:12:19 +0200
commit60b52cfb02a9a0a4e844f11c186e8b61eaa158ac (patch)
tree1005a659c5658f91d7347df852457b1cf62c24eb /Userland/DevTools/Profiler/DisassemblyModel.cpp
parent4fdee56ba35b7d42ed8f729ec60ebbec86adbf5f (diff)
downloadserenity-60b52cfb02a9a0a4e844f11c186e8b61eaa158ac.zip
Userland: Hardcode the x86_64 kernel base address for now
Diffstat (limited to 'Userland/DevTools/Profiler/DisassemblyModel.cpp')
-rw-r--r--Userland/DevTools/Profiler/DisassemblyModel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/DevTools/Profiler/DisassemblyModel.cpp b/Userland/DevTools/Profiler/DisassemblyModel.cpp
index 7dd9b99502..20dc66237e 100644
--- a/Userland/DevTools/Profiler/DisassemblyModel.cpp
+++ b/Userland/DevTools/Profiler/DisassemblyModel.cpp
@@ -40,7 +40,13 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
OwnPtr<ELF::Image> kernel_elf;
const ELF::Image* elf;
FlatPtr base_address = 0;
- if (m_node.address() >= 0xc0000000) {
+ // FIXME: Use /proc for this
+#if ARCH(I386)
+ FlatPtr kernel_base = 0xc0000000;
+#else
+ FlatPtr kernel_base = 0x2000000000;
+#endif
+ if (m_node.address() >= kernel_base) {
if (!m_kernel_file) {
auto file_or_error = MappedFile::map("/boot/Kernel.debug");
if (file_or_error.is_error())