1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibDebug+Everywhere: Make DebugInfo not own the ELF image

This is required to avoid copying the image where otherwise a reference
would be enough.
This commit is contained in:
Ali Mohammad Pur 2021-08-06 00:35:36 +04:30 committed by Andreas Kling
parent 521217735b
commit c4437e19bd
9 changed files with 23 additions and 14 deletions

View file

@ -129,12 +129,14 @@ public:
struct LoadedLibrary {
String name;
NonnullRefPtr<MappedFile> file;
NonnullOwnPtr<ELF::Image> image;
NonnullOwnPtr<DebugInfo> debug_info;
FlatPtr base_address;
LoadedLibrary(String const& name, NonnullRefPtr<MappedFile> file, 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)
: name(name)
, file(move(file))
, image(move(image))
, debug_info(move(debug_info))
, base_address(base_address)
{