blob: e140d7a178e1d140bf2d1b81baa4925ad4400fc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/****************************************************************************
**
** Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Enterprise Perf Profiler Add-on.
**
** GNU General Public License Usage
** This file may be used under the terms of the GNU General Public License
** version 3 as published by the Free Software Foundation and appearing in
** the file LICENSE.GPLv3 included in the packaging of this file. Please
** review the following information to ensure the GNU General Public License
** requirements will be met: https://www.gnu.org/licenses/gpl.html.
**
** If you have questions regarding the use of this file, please use
** contact form at http://www.qt.io/contact-us
**
****************************************************************************/
#pragma once
#include <QByteArray>
#include <QCoreApplication>
#include <QList>
struct PerfKallsymEntry
{
quint64 address = 0;
QByteArray symbol;
QByteArray module;
};
QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(PerfKallsymEntry, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
class PerfKallsyms
{
Q_DECLARE_TR_FUNCTIONS(PerfKallsyms)
public:
bool parseMapping(const QString &path);
QString errorString() const { return m_errorString; }
bool isEmpty() const { return m_entries.isEmpty(); }
PerfKallsymEntry findEntry(quint64 address) const;
private:
QList<PerfKallsymEntry> m_entries;
QString m_errorString;
};
|