Profiler: Use absolute mmap paths as-is

This commit is contained in:
Tim Schumacher 2022-04-26 04:39:58 +02:00 committed by Linus Groh
parent 89da0f2da5
commit f8aea2a7e5
Notes: sideshowbarker 2024-07-17 11:13:31 +09:00

View file

@ -91,7 +91,9 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, String const& name)
} else {
String path_string = path.to_string();
String full_path;
if (Core::File::looks_like_shared_library(path_string))
if (path_string.starts_with('/'))
full_path = path_string;
else if (Core::File::looks_like_shared_library(path_string))
full_path = String::formatted("/usr/lib/{}", path);
else
full_path = path_string;