diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-08-06 00:35:36 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-06 01:14:03 +0200 |
commit | c4437e19bdb28af3dc45c973fa46b4be3e2ab3ee (patch) | |
tree | 8e6be344793d3dd1a5b67ca5ca3350c9b5526ec0 /Userland/Libraries/LibSymbolication | |
parent | 521217735bf436c22c9d6cda772b6cd4db46a1f6 (diff) | |
download | serenity-c4437e19bdb28af3dc45c973fa46b4be3e2ab3ee.zip |
LibDebug+Everywhere: Make DebugInfo not own the ELF image
This is required to avoid copying the image where otherwise a reference
would be enough.
Diffstat (limited to 'Userland/Libraries/LibSymbolication')
-rw-r--r-- | Userland/Libraries/LibSymbolication/Symbolication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSymbolication/Symbolication.cpp b/Userland/Libraries/LibSymbolication/Symbolication.cpp index 13bc9840d4..f9adaa05e0 100644 --- a/Userland/Libraries/LibSymbolication/Symbolication.cpp +++ b/Userland/Libraries/LibSymbolication/Symbolication.cpp @@ -18,6 +18,7 @@ namespace Symbolication { struct CachedELF { NonnullRefPtr<MappedFile> mapped_file; NonnullOwnPtr<Debug::DebugInfo> debug_info; + NonnullOwnPtr<ELF::Image> image; }; static HashMap<String, OwnPtr<CachedELF>> s_cache; @@ -73,7 +74,7 @@ Optional<Symbol> symbolicate(String const& path, FlatPtr address) s_cache.set(path, {}); {}; } - auto cached_elf = make<CachedELF>(mapped_file.release_value(), make<Debug::DebugInfo>(move(elf))); + auto cached_elf = make<CachedELF>(mapped_file.release_value(), make<Debug::DebugInfo>(*elf), move(elf)); s_cache.set(path, move(cached_elf)); } |