summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCoredump/Backtrace.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-10-09 16:41:43 +0200
committerLinus Groh <mail@linusgroh.de>2021-10-17 17:09:58 +0100
commit1b63c8f3b001e3f4fd7d2ced823403c57616da66 (patch)
tree3c35745eba96c26bfde81af515d45650b84edf1e /Userland/Libraries/LibCoredump/Backtrace.cpp
parent9869b598d5033da437ad8896214c6feae486cf64 (diff)
downloadserenity-1b63c8f3b001e3f4fd7d2ced823403c57616da66.zip
LibCoredump: Accept dynamic libraries with versioned names
Our Clang toolchain uses versioned names for its shared libraries, meaning that our applications link against `libc++.so.1.0`, not simply `libc++.so`. Without this change, the LLVM runtime libraries are excluded from backtraces, which makes debugging toolchain issues harder.
Diffstat (limited to 'Userland/Libraries/LibCoredump/Backtrace.cpp')
-rw-r--r--Userland/Libraries/LibCoredump/Backtrace.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCoredump/Backtrace.cpp b/Userland/Libraries/LibCoredump/Backtrace.cpp
index 814d6f1d38..6ee694440b 100644
--- a/Userland/Libraries/LibCoredump/Backtrace.cpp
+++ b/Userland/Libraries/LibCoredump/Backtrace.cpp
@@ -20,7 +20,7 @@ namespace Coredump {
ELFObjectInfo const* Backtrace::object_info_for_region(ELF::Core::MemoryRegionInfo const& region)
{
auto path = region.object_name();
- if (!path.starts_with('/') && path.ends_with(".so"sv))
+ if (!path.starts_with('/') && (path.ends_with(".so"sv) || path.contains(".so."sv)))
path = LexicalPath::join("/usr/lib", path).string();
auto maybe_ptr = m_debug_info_cache.get(path);