forked from qt-creator/qt-creator
Debugger: Use the code model to detect unitialized variables.
This should save debugger round trips and crashes in the debugging helpers. Add respective option to debugging helper option page, defaulting to true.On this occasion, make CDB detect shadowed variables correctly and display them as "<shadowed n>" as does the Gdb engine by reversing the direction in which CdbSymbolGroupContext::populateINameIndexMap works. Rubber-stamped-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -45,6 +45,10 @@ namespace Core {
|
||||
class IEditor;
|
||||
}
|
||||
|
||||
namespace CPlusPlus {
|
||||
class Snapshot;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -89,6 +93,15 @@ QString cppExpressionAt(TextEditor::ITextEditor *editor, int pos,
|
||||
// Decode string data as returned by the dumper helpers.
|
||||
QString decodeData(const QByteArray &baIn, int encoding);
|
||||
|
||||
// Get variables that are not initialized at a certain line
|
||||
// of a function from the code model. Shadowed variables will
|
||||
// be reported using the debugger naming conventions '<shadowed n>'
|
||||
bool getUninitializedVariables(const CPlusPlus::Snapshot &snapshot,
|
||||
const QString &function,
|
||||
const QString &file,
|
||||
int line,
|
||||
QStringList *uninitializedVariables);
|
||||
|
||||
/* Attempt to put common code of the dumper handling into a helper
|
||||
* class.
|
||||
* "Custom dumper" is a library compiled against the current
|
||||
|
||||
Reference in New Issue
Block a user