diff options
-rw-r--r-- | src/plugins/debugger/stackframe.cpp | 21 | ||||
-rw-r--r-- | src/plugins/debugger/stackhandler.cpp | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/plugins/debugger/stackframe.cpp b/src/plugins/debugger/stackframe.cpp index 6c4fdbb62a..09841a7769 100644 --- a/src/plugins/debugger/stackframe.cpp +++ b/src/plugins/debugger/stackframe.cpp @@ -106,7 +106,26 @@ QString StackFrame::toToolTip() const str << "<tr><td>" << tr("From:") << "</td><td>" << from << "</td></tr>"; if (!to.isEmpty()) str << "<tr><td>" << tr("To:") << "</td><td>" << to << "</td></tr>"; - str << "</table></body></html>"; + str << "</table>"; + + str <<"<br> <br><i>" << tr("Note:") << " </i> "; + if (isUsable()) { + str << tr("Sources for this frame are available.<br>Double-click on " + "the file name to open an editor."); + } else if (line <= 0) { + str << tr("Binary debug information is not accessible for this " + "frame. This either means the core was not compiled " + "with debug information, or the debug information is not " + "accessible. Note that most distributions ship debug information " + "in separate packages."); + } else { + str << tr("Binary debug information is accessible for this " + "frame. However, matching sources have not been found. " + "Note that some distributions ship debug sources in " + "in separate packages."); + } + + str << "</body></html>"; return res; } diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 04efb34b3c..674aa8709c 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -109,7 +109,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const case 2: // File name return frame.file.isEmpty() ? frame.from : QFileInfo(frame.file).fileName(); case 3: // Line number - return frame.line >= 0 ? QVariant(frame.line) : QVariant(); + return frame.line > 0 ? QVariant(frame.line) : QVariant(); case 4: // Address if (frame.address) return QString::fromLatin1("0x%1").arg(frame.address, 0, 16); |