if (line.startsWith(QLatin1String("* thread"))) {
// also SignalHandlerStart
d->m_type = BacktraceLine::ThreadIndicator;
- d->m_rating = BacktraceLine::Good;
+ d->m_rating = BacktraceLine::MissingEverything;
} else if (line.contains(QLatin1String(" thread #"))) {
d->m_type = BacktraceLine::ThreadStart;
- d->m_rating = BacktraceLine::Good;
+ d->m_rating = BacktraceLine::MissingEverything;
} else if (line.contains(QLatin1String(" frame #"))) {
d->m_type = BacktraceLine::StackFrame;
d->m_rating = BacktraceLine::Good;
+
+ int partscounter = 0;
+ const QStringList textparts = line.trimmed().split(QLatin1Char(' '));
+ foreach (const QString &textpart, textparts) {
+ if (textpart.contains(QLatin1Char('`'))) {
+ const int tildeindex = textpart.indexOf(QLatin1Char('`'));
+ d->m_library = textpart.mid(0, tildeindex);
+ d->m_functionName = textpart.mid(tildeindex + 1, textpart.length() - tildeindex + 1);
+ const int bracketindex = d->m_functionName.indexOf(QLatin1Char('('));
+ if (bracketindex > 0) {
+ d->m_functionName = d->m_functionName.mid(0, bracketindex);
+ }
+ } else if (partscounter > 0 && textparts.at(partscounter - 1) == QLatin1String("at")) {
+ d->m_file = textpart;
+ }
+ partscounter += 1;
+ }
+
+ if (d->m_functionName.isEmpty()) {
+ d->m_rating = BacktraceLine::MissingFunction;
+ }
+ if (d->m_library.isEmpty()) {
+ d->m_rating = BacktraceLine::MissingLibrary;
+ }
+ if (d->m_file.isEmpty()) {
+ d->m_rating = BacktraceLine::MissingSourceFile;
+ }
+ // qDebug() << Q_FUNC_INFO << line << d->m_functionName << d->m_library << d->m_file;
} else {
d->m_type = BacktraceLine::Crap;
}
Q_D(BacktraceParserLldb);
BacktraceLineLldb lldbline(line);
d->m_linesList.append(lldbline);
- d->m_linesToRate.append(lldbline);
+ switch (lldbline.type()) {
+ case BacktraceLine::Unknown:
+ case BacktraceLine::EmptyLine:
+ case BacktraceLine::Crap:
+ case BacktraceLine::KCrash: {
+ break;
+ }
+ case BacktraceLine::ThreadIndicator:
+ case BacktraceLine::ThreadStart:
+ case BacktraceLine::SignalHandlerStart:
+ case BacktraceLine::StackFrame: {
+ d->m_linesToRate.append(lldbline);
+ break;
+ }
+ }
}
//END BacktraceParserLldb