diff options
-rw-r--r-- | app/perfsymboltable.cpp | 5 | ||||
-rw-r--r-- | app/perfsymboltable.h | 3 | ||||
-rw-r--r-- | tests/auto/finddebugsym/tst_finddebugsym.cpp | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index bdadf0c..e3737d5 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -343,8 +343,9 @@ Dwfl_Module *PerfSymbolTable::module(quint64 addr, const PerfElfMap::ElfInfo &el return reportElf(elf); } -static QFileInfo findDebugInfoFile(const QString &root, const QString &file, - const QString &debugLinkString) +QFileInfo PerfSymbolTable::findDebugInfoFile( + const QString &root, const QString &file, + const QString &debugLinkString) { auto dir = QFileInfo(root).dir(); const auto folder = QFileInfo(file).path(); diff --git a/app/perfsymboltable.h b/app/perfsymboltable.h index 366c9f5..27ba205 100644 --- a/app/perfsymboltable.h +++ b/app/perfsymboltable.h @@ -44,6 +44,9 @@ public: PerfSymbolTable(qint32 pid, Dwfl_Callbacks *callbacks, PerfUnwind *parent); ~PerfSymbolTable(); + static QFileInfo findDebugInfoFile( + const QString& root, const QString& file, const QString& debugLinkString); + struct PerfMapSymbol { PerfMapSymbol(quint64 start = 0, quint64 length = 0, QByteArray name = QByteArray()) : start(start), length(length), name(name) {} diff --git a/tests/auto/finddebugsym/tst_finddebugsym.cpp b/tests/auto/finddebugsym/tst_finddebugsym.cpp index c298749..fb45852 100644 --- a/tests/auto/finddebugsym/tst_finddebugsym.cpp +++ b/tests/auto/finddebugsym/tst_finddebugsym.cpp @@ -29,8 +29,6 @@ #include "perfsymboltable.h" -QFileInfo findDebugInfoFile(const QString& root, const QString& file, const QString& debugLinkString); - class TestFindDebugSymbols : public QObject { Q_OBJECT @@ -86,7 +84,8 @@ private slots: QFETCH(QString, file); QFETCH(QString, debugLinkString); - auto debugFile = findDebugInfoFile(tempDir.path() + QDir::separator(), root, file); + auto debugFile = PerfSymbolTable::findDebugInfoFile( + tempDir.path() + QDir::separator(), root, file); QCOMPARE(debugFile.absoluteFilePath(), QFileInfo(tempDir.path() + debugLinkString).absoluteFilePath()); } |