diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-22 00:47:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-22 08:57:01 +0200 |
commit | db1c5c483045e9c5e7afedb6b11f2fbbef79a9dc (patch) | |
tree | 05bc7816fedf372598149d58445a522b864caedd /Userland/Libraries/LibDebug/DebugSession.cpp | |
parent | 36c3927169c407d06811e416a7eb0672a0c4f04b (diff) | |
download | serenity-db1c5c483045e9c5e7afedb6b11f2fbbef79a9dc.zip |
LibELF+Utilities: Avoid truncating 64-bit values
This fixes displaying 64-bit addresses in readelf and also fixes
showing backtraces from core dumps on x86_64.
Diffstat (limited to 'Userland/Libraries/LibDebug/DebugSession.cpp')
-rw-r--r-- | Userland/Libraries/LibDebug/DebugSession.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibDebug/DebugSession.cpp b/Userland/Libraries/LibDebug/DebugSession.cpp index fccd487e05..a66fd3cc42 100644 --- a/Userland/Libraries/LibDebug/DebugSession.cpp +++ b/Userland/Libraries/LibDebug/DebugSession.cpp @@ -451,7 +451,7 @@ void DebugSession::update_loaded_libs() if (file_or_error.is_error()) return IterationDecision::Continue; - FlatPtr base_address = entry.as_object().get("address").as_u32(); + 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); m_loaded_libraries.set(lib_name, move(lib)); |