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:
parent
31c634be5a
commit
80cb44afae
7 changed files with 25 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue