From 43e8640d90e46e4f4bdc6a8f5a1549c573112347 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 8 Sep 2016 15:59:19 +0200 Subject: [PATCH] Increase verbosity and leave the first line in a try to solve #5 --- shared/shared.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index e611662..00adf31 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -141,19 +141,24 @@ LddInfo findDependencyInfo(const QString &binaryPath) return info; } - static const QRegularExpression regexp(QStringLiteral( - "^.+ => (.+) \\(")); + static const QRegularExpression regexp(QStringLiteral("^.+ => (.+) \\(")); QString output = ldd.readAllStandardOutput(); QStringList outputLines = output.split("\n", QString::SkipEmptyParts); if (outputLines.size() < 2) { if (output.contains("statically linked") == false){ - LogError() << "Could not parse objdump output:" << output; + LogError() << "Could not parse ldd output:" << output; } return info; } - outputLines.removeFirst(); // remove line containing the binary path + foreach (QString outputLine, outputLines) { + LogDebug() << "ldd outputLine:" << outputLine; + if (outputLine.contains("not found")){ + LogError() << "ldd outputLine:" << outputLine; + } + } + if (binaryPath.contains(".so.") || binaryPath.endsWith(".so")) { const auto match = regexp.match(outputLines.first()); if (match.hasMatch()) {