summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/Debugger
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/HackStudio/Debugger
parent4fdee56ba35b7d42ed8f729ec60ebbec86adbf5f (diff)
downloadserenity-60b52cfb02a9a0a4e844f11c186e8b61eaa158ac.zip
Userland: Hardcode the x86_64 kernel base address for now
Diffstat (limited to 'Userland/DevTools/HackStudio/Debugger')
-rw-r--r--Userland/DevTools/HackStudio/Debugger/DisassemblyModel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/Debugger/DisassemblyModel.cpp b/Userland/DevTools/HackStudio/Debugger/DisassemblyModel.cpp
index 8c5909fe10..da6ae10f78 100644
--- a/Userland/DevTools/HackStudio/Debugger/DisassemblyModel.cpp
+++ b/Userland/DevTools/HackStudio/Debugger/DisassemblyModel.cpp
@@ -30,7 +30,14 @@ DisassemblyModel::DisassemblyModel(const Debug::DebugSession& debug_session, con
OwnPtr<ELF::Image> kernel_elf;
const ELF::Image* elf = nullptr;
- if (containing_function.value().address_low >= 0xc0000000) {
+ // FIXME: Use /proc for this
+#if ARCH(I386)
+ FlatPtr kernel_base = 0xc0000000;
+#else
+ FlatPtr kernel_base = 0x2000000000;
+#endif
+
+ if (containing_function.value().address_low >= kernel_base) {
auto file_or_error = MappedFile::map("/boot/Kernel.debug");
if (file_or_error.is_error())
return;