mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09: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:
parent
521217735b
commit
c4437e19bd
Notes:
sideshowbarker
2024-07-18 07:25:13 +09:00
Author: https://github.com/alimpfard
Commit: c4437e19bd
Pull-request: https://github.com/SerenityOS/serenity/pull/9227
9 changed files with 23 additions and 14 deletions
|
@ -448,8 +448,9 @@ void DebugSession::update_loaded_libs()
|
|||
return IterationDecision::Continue;
|
||||
|
||||
FlatPtr base_address = entry.as_object().get("address").to_addr();
|
||||
auto debug_info = make<DebugInfo>(make<ELF::Image>(file_or_error.value()->bytes()), m_source_root, base_address);
|
||||
auto lib = make<LoadedLibrary>(lib_name, file_or_error.release_value(), move(debug_info), base_address);
|
||||
auto image = make<ELF::Image>(file_or_error.value()->bytes());
|
||||
auto debug_info = make<DebugInfo>(*image, m_source_root, base_address);
|
||||
auto lib = make<LoadedLibrary>(lib_name, file_or_error.release_value(), move(image), move(debug_info), base_address);
|
||||
m_loaded_libraries.set(lib_name, move(lib));
|
||||
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue