mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27: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
|
@ -7,6 +7,7 @@
|
|||
#include <AK/JsonObject.h>
|
||||
#include <AK/JsonValue.h>
|
||||
#include <LibCompress/Gzip.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCoredump/Reader.h>
|
||||
#include <signal_numbers.h>
|
||||
#include <string.h>
|
||||
|
@ -273,7 +274,7 @@ const Reader::LibraryData* Reader::library_containing(FlatPtr address) const
|
|||
auto name = region->object_name();
|
||||
|
||||
String path;
|
||||
if (name.ends_with(".so"))
|
||||
if (Core::File::looks_like_shared_library(name))
|
||||
path = String::formatted("/usr/lib/{}", name);
|
||||
else {
|
||||
path = name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue