forked from qt-creator/qt-creator
Added ToolTip support for CDB.
Make debugger tooltip API more general, have the engines check the correct file type, figure out the expression and context from the text editor. Put common functionality in watchutils.cpp. In the CDB engine, check whether a tooltip expression is a known variable within the stack frame context. If so, retrieve via symbol group or dumpers. Cache by function and expression. Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -118,6 +118,27 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa
|
||||
return true;
|
||||
}
|
||||
|
||||
int CdbStackTraceContext::indexOf(const QString &function) const
|
||||
{
|
||||
|
||||
const QChar exclamationMark = QLatin1Char('!');
|
||||
const int count = m_frames.size();
|
||||
// Module contained ('module!foo'). Exact match
|
||||
if (function.contains(exclamationMark)) {
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
if (m_frames.at(i).function == function)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
// No module, fuzzy match
|
||||
QString pattern = exclamationMark + function;
|
||||
for (int i = 0; i < count; i++)
|
||||
if (m_frames.at(i).function.endsWith(pattern))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
CdbStackFrameContext *CdbStackTraceContext::frameContextAt(int index, QString *errorMessage)
|
||||
{
|
||||
// Create a frame on demand
|
||||
|
||||
Reference in New Issue
Block a user