summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/stackframe.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-09-21 15:12:33 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-09-21 15:12:33 +0200
commit1d978a3618838670f3a24932bfe9a316bfb5e307 (patch)
treed22d23cd10065649ee80192ff936f9d5fe6a15cb /src/plugins/debugger/stackframe.cpp
parent0e318bfcf5244dde62e8afa46bd90d68bdaa0534 (diff)
downloadqt-creator-1d978a3618838670f3a24932bfe9a316bfb5e307.tar.gz
Debugger: Sanitize Datatypes, part 2: Stackframes.
Make address a quint64. Enable DisassemblerViewAgent to match the disassembly-addresses by converting the numbers, making it more robust. Remove the complicated formatting needed for CDB.
Diffstat (limited to 'src/plugins/debugger/stackframe.cpp')
-rw-r--r--src/plugins/debugger/stackframe.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/plugins/debugger/stackframe.cpp b/src/plugins/debugger/stackframe.cpp
index dc7e45dec6..18062920a8 100644
--- a/src/plugins/debugger/stackframe.cpp
+++ b/src/plugins/debugger/stackframe.cpp
@@ -48,7 +48,7 @@ namespace Internal {
////////////////////////////////////////////////////////////////////////
StackFrame::StackFrame()
- : level(0), line(0)
+ : level(0), line(0), address(0)
{}
void StackFrame::clear()
@@ -58,7 +58,7 @@ void StackFrame::clear()
file.clear();
from.clear();
to.clear();
- address.clear();
+ address = 0;
}
bool StackFrame::isUsable() const
@@ -70,7 +70,11 @@ QString StackFrame::toString() const
{
QString res;
QTextStream str(&res);
- str << StackHandler::tr("Address:") << ' ' << address << ' '
+ str << StackHandler::tr("Address:") << ' ';
+ str.setIntegerBase(16);
+ str << address;
+ str.setIntegerBase(10);
+ str << ' '
<< StackHandler::tr("Function:") << ' ' << function << ' '
<< StackHandler::tr("File:") << ' ' << file << ' '
<< StackHandler::tr("Line:") << ' ' << line << ' '
@@ -85,7 +89,11 @@ QString StackFrame::toToolTip() const
QString res;
QTextStream str(&res);
str << "<html><body><table>"
- << "<tr><td>" << StackHandler::tr("Address:") << "</td><td>" << address << "</td></tr>"
+ << "<tr><td>" << StackHandler::tr("Address:") << "</td><td>0x";
+ str.setIntegerBase(16);
+ str << address;
+ str.setIntegerBase(10);
+ str << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("Function:") << "</td><td>" << function << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("File:") << "</td><td width="
<< QFontMetrics(QToolTip::font()).width(filePath) << ">" << filePath << "</td></tr>"