1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Everywhere: Move shared library checks into a common function

While we're at it, unify the various different conditions that are
scattered accross the codebase.
This commit is contained in:
Tim Schumacher 2021-11-03 12:05:23 +01:00 committed by Andreas Kling
parent 31c634be5a
commit 80cb44afae
7 changed files with 25 additions and 6 deletions

View file

@ -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) || path.contains(".so."sv)))
if (!path.starts_with('/') && Core::File::looks_like_shared_library(path))
path = LexicalPath::join("/usr/lib", path).string();
auto maybe_ptr = m_debug_info_cache.get(path);