1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:17:45 +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

@ -452,7 +452,7 @@ void DebugSession::update_loaded_libs()
return IterationDecision::Continue;
}
auto file_or_error = MappedFile::map(object_path.value());
auto file_or_error = Core::MappedFile::map(object_path.value());
if (file_or_error.is_error())
return IterationDecision::Continue;

View file

@ -8,12 +8,12 @@
#include <AK/Demangle.h>
#include <AK/HashMap.h>
#include <AK/MappedFile.h>
#include <AK/NonnullRefPtr.h>
#include <AK/Optional.h>
#include <AK/OwnPtr.h>
#include <AK/String.h>
#include <LibC/sys/arch/i386/regs.h>
#include <LibCore/MappedFile.h>
#include <LibDebug/DebugInfo.h>
#include <LibDebug/ProcessInspector.h>
#include <signal.h>

View file

@ -7,19 +7,19 @@
#pragma once
#include "DebugInfo.h"
#include <AK/MappedFile.h>
#include <AK/Types.h>
#include <LibCore/MappedFile.h>
#include <LibELF/Image.h>
namespace Debug {
struct LoadedLibrary {
String name;
NonnullRefPtr<MappedFile> file;
NonnullRefPtr<Core::MappedFile> file;
NonnullOwnPtr<ELF::Image> image;
NonnullOwnPtr<DebugInfo> debug_info;
FlatPtr base_address {};
LoadedLibrary(String const& name, NonnullRefPtr<MappedFile> file, NonnullOwnPtr<ELF::Image> image, NonnullOwnPtr<DebugInfo>&& debug_info, FlatPtr base_address)
LoadedLibrary(String const& name, NonnullRefPtr<Core::MappedFile> file, NonnullOwnPtr<ELF::Image> image, NonnullOwnPtr<DebugInfo>&& debug_info, FlatPtr base_address)
: name(name)
, file(move(file))
, image(move(image))