1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:37:42 +00:00

LibCore+AK: Move MappedFile from AK to LibCore

MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
This commit is contained in:
Andreas Kling 2021-11-23 11:32:25 +01:00
parent c1c9da6c35
commit 58fb3ebf66
48 changed files with 101 additions and 103 deletions

View file

@ -5,8 +5,8 @@
*/
#include "DisassemblyModel.h"
#include <AK/MappedFile.h>
#include <AK/StringBuilder.h>
#include <LibCore/MappedFile.h>
#include <LibDebug/DebugSession.h>
#include <LibELF/Image.h>
#include <LibSymbolication/Symbolication.h>
@ -33,7 +33,7 @@ DisassemblyModel::DisassemblyModel(const Debug::DebugSession& debug_session, con
auto maybe_kernel_base = Symbolication::kernel_base();
if (maybe_kernel_base.has_value() && containing_function.value().address_low >= maybe_kernel_base.value()) {
auto file_or_error = MappedFile::map("/boot/Kernel.debug");
auto file_or_error = Core::MappedFile::map("/boot/Kernel.debug");
if (file_or_error.is_error())
return;
kernel_elf = make<ELF::Image>(file_or_error.value()->bytes());