mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +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
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "Process.h"
|
||||
#include <LibCore/File.h>
|
||||
|
||||
namespace Profiler {
|
||||
|
||||
|
@ -90,7 +91,7 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, const String& name)
|
|||
} else {
|
||||
String path_string = path.to_string();
|
||||
String full_path;
|
||||
if (path_string.ends_with(".so"sv))
|
||||
if (Core::File::looks_like_shared_library(path_string))
|
||||
full_path = String::formatted("/usr/lib/{}", path);
|
||||
else
|
||||
full_path = path_string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue