diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-09-21 15:12:33 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-09-21 15:12:33 +0200 |
commit | 1d978a3618838670f3a24932bfe9a316bfb5e307 (patch) | |
tree | d22d23cd10065649ee80192ff936f9d5fe6a15cb /src/plugins/debugger/stackframe.cpp | |
parent | 0e318bfcf5244dde62e8afa46bd90d68bdaa0534 (diff) | |
download | qt-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.cpp | 16 |
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>" |