File indexing completed on 2024-04-21 16:12:22

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
0004 */
0005 
0006 #pragma once
0007 
0008 #include <QByteArray>
0009 
0010 namespace LinuxProc
0011 {
0012 enum class Check {
0013     DeletedMarker, // < checks the data without disk IO (purely relies on deleted annotation - process must be running!)
0014     Stat, // < includes inode check
0015 };
0016 
0017 // Checks if the /maps content has deleted libraries, or the executable is deleted.
0018 bool hasMapsDeletedFiles(const QString &exePathString, const QByteArray &maps, Check check);
0019 
0020 // Checks if a given path is a library path (this is also true if it has a "(deleted)" qualifier)
0021 // This is a standalone function to ease testing.
0022 bool isLibraryPath(const QString &path);
0023 }