GammaRay  2.4.0
probeabidetector.h
1 /*
2  probeabidetector.h
3 
4  This file is part of GammaRay, the Qt application inspection and
5  manipulation tool.
6 
7  Copyright (C) 2014-2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
8  Author: Volker Krause <volker.krause@kdab.com>
9 
10  Licensees holding valid commercial KDAB GammaRay licenses may use this file in
11  acuordance with GammaRay Commercial License Agreement provided with the Software.
12 
13  Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 
15  This program is free software; you can redistribute it and/or modify
16  it under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 2 of the License, or
18  (at your option) any later version.
19 
20  This program is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  GNU General Public License for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with this program. If not, see <http://www.gnu.org/licenses/>.
27 */
28 
29 #ifndef GAMMARAY_PROBEABIDETECTOR_H
30 #define GAMMARAY_PROBEABIDETECTOR_H
31 
32 #include "gammaray_launcher_export.h"
33 
34 #include "probeabi.h"
35 
36 #include <QHash>
37 #include <QString>
38 
39 namespace GammaRay {
40 
44 class GAMMARAY_LAUNCHER_EXPORT ProbeABIDetector
45 {
46 public:
48 
50  ProbeABI abiForExecutable(const QString &path) const;
51 
53  ProbeABI abiForProcess(qint64 pid) const;
54 
56  QString qtCoreForExecutable(const QString &path) const;
57 
59  QString qtCoreForProcess(quint64 pid) const;
60 
64  static bool containsQtCore(const QByteArray &line);
65 
66 private:
70  ProbeABI abiForQtCore(const QString &path) const;
71 
75  ProbeABI detectAbiForQtCore(const QString &path) const;
76 
80  QString qtCoreFromLsof(qint64 pid) const;
81 
82  mutable QHash<QString, ProbeABI> m_abiForQtCoreCache;
83 };
84 
85 }
86 
87 #endif // GAMMARAY_PROBEABIDETECTOR_H
Describes a probe ABI. The probe ABI is everything that determines if a probe is compatible with a gi...
Definition: probeabi.h:44
Definition: endpoint.h:42
Detect the probe ABI required for a given target. A target can be specified as either a process id or...
Definition: probeabidetector.h:44

Klarälvdalens Datakonsult AB (KDAB)
"The Qt Experts"
http://www.kdab.com/
GammaRay
Qt-application inspection and manipulation tool
http://www.kdab.com/kdab-products/gammaray/