forked from qt-creator/qt-creator
remove trailing whitespace
doing it in 1.3 as well to avoid possible later conflicts
This commit is contained in:
@@ -215,8 +215,8 @@
|
|||||||
|
|
||||||
\snippet examples/addressbook-sdk/part1/main.cpp main function
|
\snippet examples/addressbook-sdk/part1/main.cpp main function
|
||||||
|
|
||||||
The code constructs a new \c AddressBook widget on the stack and
|
The code constructs a new \c AddressBook widget on the stack and
|
||||||
invokes its \l{QWidget::}{show()} function to display it.
|
invokes its \l{QWidget::}{show()} function to display it.
|
||||||
However, the widget will not be shown until the application's event
|
However, the widget will not be shown until the application's event
|
||||||
loop is started. This is done by calling the application's
|
loop is started. This is done by calling the application's
|
||||||
\l{QApplication::}{exec()} function. Finally, the result returned by
|
\l{QApplication::}{exec()} function. Finally, the result returned by
|
||||||
|
@@ -32,8 +32,8 @@ that you:
|
|||||||
the case that you have better ideas, discuss them with other developers
|
the case that you have better ideas, discuss them with other developers
|
||||||
before writing the code.
|
before writing the code.
|
||||||
\o Take advantage of Qt. Don't re-invent the wheel. Think about what parts
|
\o Take advantage of Qt. Don't re-invent the wheel. Think about what parts
|
||||||
of your code are generic enough that they might be incorporated into
|
of your code are generic enough that they might be incorporated into
|
||||||
Qt proper.
|
Qt proper.
|
||||||
\o Document interfaces. Right now we use qdoc, but changing to doxygen
|
\o Document interfaces. Right now we use qdoc, but changing to doxygen
|
||||||
is being considered.
|
is being considered.
|
||||||
\endlist
|
\endlist
|
||||||
@@ -108,7 +108,7 @@ in C++.
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
\o Using Qt's foreach is ok in non-time critical code when using a QTL
|
\o Using Qt's foreach is ok in non-time critical code when using a QTL
|
||||||
container. It is a nice way to keep line noise down and to give the
|
container. It is a nice way to keep line noise down and to give the
|
||||||
loop variable a proper name:
|
loop variable a proper name:
|
||||||
|
|
||||||
@@ -122,14 +122,14 @@ in C++.
|
|||||||
for (Container::iterator it = container.begin(); it != end; ++it)
|
for (Container::iterator it = container.begin(); it != end; ++it)
|
||||||
doSomething(*it);
|
doSomething(*it);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
If the loop variable can be made const, do so. This can prevent
|
If the loop variable can be made const, do so. This can prevent
|
||||||
unnecessary detaching of shared data in some cases. So:
|
unnecessary detaching of shared data in some cases. So:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
foreach (const QString &name, someListOfNames)
|
foreach (const QString &name, someListOfNames)
|
||||||
doSomething(name);
|
doSomething(name);
|
||||||
|
|
||||||
- NOT -
|
- NOT -
|
||||||
|
|
||||||
foreach (QString name, someListOfNames)
|
foreach (QString name, someListOfNames)
|
||||||
@@ -157,7 +157,7 @@ Only one declaration on each line.
|
|||||||
-NOT-
|
-NOT-
|
||||||
QString a = "Joe", b = "Foo"; // not used in Qt Creator
|
QString a = "Joe", b = "Foo"; // not used in Qt Creator
|
||||||
\endcode
|
\endcode
|
||||||
[Note that 'QString a = "Joe"' is formally calling a copy constructor
|
[Note that 'QString a = "Joe"' is formally calling a copy constructor
|
||||||
on a temporary constructed from a string literal and therefore has the
|
on a temporary constructed from a string literal and therefore has the
|
||||||
potential of being more expensive then direct construction by
|
potential of being more expensive then direct construction by
|
||||||
'QString a("joe")'. However the compiler is allowed to elide the copy
|
'QString a("joe")'. However the compiler is allowed to elide the copy
|
||||||
@@ -166,7 +166,7 @@ Only one declaration on each line.
|
|||||||
line with the traditional C-style initialization, _and_ cannot be
|
line with the traditional C-style initialization, _and_ cannot be
|
||||||
mistaken as function declaration, _and_ reduces the level of nested
|
mistaken as function declaration, _and_ reduces the level of nested
|
||||||
parantheses in more initializations.]
|
parantheses in more initializations.]
|
||||||
|
|
||||||
|
|
||||||
\section2 Pointers and references
|
\section2 Pointers and references
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ Line breaks
|
|||||||
|
|
||||||
\section2 File headers
|
\section2 File headers
|
||||||
|
|
||||||
If you create a new file, the top of the file should include a
|
If you create a new file, the top of the file should include a
|
||||||
header comment equal to the one found in other source files of Qt Creator.
|
header comment equal to the one found in other source files of Qt Creator.
|
||||||
|
|
||||||
\section2 Include order
|
\section2 Include order
|
||||||
@@ -474,7 +474,7 @@ Line breaks
|
|||||||
You document for the other developers, not for yourself.
|
You document for the other developers, not for yourself.
|
||||||
In the header you should document interfaces, i.e. what the function does,
|
In the header you should document interfaces, i.e. what the function does,
|
||||||
not the implementation.
|
not the implementation.
|
||||||
In the .cpp files you document the implementation if the implementation
|
In the .cpp files you document the implementation if the implementation
|
||||||
in non-obvious.
|
in non-obvious.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -83,5 +83,5 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
## Properly close subshell
|
## Properly close subshell
|
||||||
)
|
)
|
||||||
exit $?
|
exit $?
|
||||||
|
@@ -54,5 +54,5 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
## Properly close subshell
|
## Properly close subshell
|
||||||
)
|
)
|
||||||
exit $?
|
exit $?
|
||||||
|
@@ -1075,7 +1075,7 @@ static void qDumpQAbstractItem(QDumper &d)
|
|||||||
{
|
{
|
||||||
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
|
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
|
||||||
mm->r = mm->c = 0;
|
mm->r = mm->c = 0;
|
||||||
mm->p = mm->m = 0;
|
mm->p = mm->m = 0;
|
||||||
static const char *printFormat = sizeof(void *) == sizeof(long) ?
|
static const char *printFormat = sizeof(void *) == sizeof(long) ?
|
||||||
"%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx";
|
"%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx";
|
||||||
sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m);
|
sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m);
|
||||||
@@ -2147,7 +2147,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
|
|||||||
case QVariant::KeySequence:
|
case QVariant::KeySequence:
|
||||||
#ifndef QT_NO_SHORTCUT
|
#ifndef QT_NO_SHORTCUT
|
||||||
*value = qvariant_cast<QKeySequence>(*v).toString();
|
*value = qvariant_cast<QKeySequence>(*v).toString();
|
||||||
#else
|
#else
|
||||||
*value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT");
|
*value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@@ -2800,7 +2800,7 @@ static void qDumpQSharedPointer(QDumper &d)
|
|||||||
const QSharedPointer<int> &ptr =
|
const QSharedPointer<int> &ptr =
|
||||||
*reinterpret_cast<const QSharedPointer<int> *>(d.data);
|
*reinterpret_cast<const QSharedPointer<int> *>(d.data);
|
||||||
|
|
||||||
if (ptr.isNull()) {
|
if (ptr.isNull()) {
|
||||||
d.putItem("value", "<null>");
|
d.putItem("value", "<null>");
|
||||||
d.putItem("valueeditable", "false");
|
d.putItem("valueeditable", "false");
|
||||||
d.putItem("numchild", 0);
|
d.putItem("numchild", 0);
|
||||||
@@ -3743,9 +3743,9 @@ static inline void dumpSizes(QDumper &d)
|
|||||||
const SizeMap::const_iterator cend = sizeMap.constEnd();
|
const SizeMap::const_iterator cend = sizeMap.constEnd();
|
||||||
for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) {
|
for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) {
|
||||||
// new size list
|
// new size list
|
||||||
if (it.key() != lastSize) {
|
if (it.key() != lastSize) {
|
||||||
if (lastSize)
|
if (lastSize)
|
||||||
d.put("],");
|
d.put("],");
|
||||||
d.put("[\"");
|
d.put("[\"");
|
||||||
d.put(it.key());
|
d.put(it.key());
|
||||||
lastSize = it.key();
|
lastSize = it.key();
|
||||||
@@ -3755,7 +3755,7 @@ static inline void dumpSizes(QDumper &d)
|
|||||||
d.put(it.value());
|
d.put(it.value());
|
||||||
d.put('"');
|
d.put('"');
|
||||||
}
|
}
|
||||||
d.put("]]");
|
d.put("]]");
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" Q_DECL_EXPORT
|
extern "C" Q_DECL_EXPORT
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += shared
|
CONFIG += shared
|
||||||
linux-* {
|
linux-* {
|
||||||
CONFIG -= release
|
CONFIG -= release
|
||||||
CONFIG += debug
|
CONFIG += debug
|
||||||
}
|
}
|
||||||
SOURCES = gdbmacros.cpp
|
SOURCES = gdbmacros.cpp
|
||||||
false {
|
false {
|
||||||
DEFINES += USE_QT_GUI=0
|
DEFINES += USE_QT_GUI=0
|
||||||
QT = core
|
QT = core
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEFINES += USE_QT_GUI=1
|
DEFINES += USE_QT_GUI=1
|
||||||
QT = core \
|
QT = core \
|
||||||
gui
|
gui
|
||||||
|
@@ -245,7 +245,7 @@ static int dumpQMapQStringString()
|
|||||||
test.insert(QLatin1String("42s"), QLatin1String("fortytwo"));
|
test.insert(QLatin1String("42s"), QLatin1String("fortytwo"));
|
||||||
test.insert(QLatin1String("423"), QLatin1String("fortytree"));
|
test.insert(QLatin1String("423"), QLatin1String("fortytree"));
|
||||||
}
|
}
|
||||||
prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString");
|
prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString");
|
||||||
qDumpObjectData440(2, 42, testAddress(&test), 1, sizeof(QString), sizeof(QString), sizeof(mapNode), valueOffset);
|
qDumpObjectData440(2, 42, testAddress(&test), 1, sizeof(QString), sizeof(QString), sizeof(mapNode), valueOffset);
|
||||||
fputs(qDumpOutBuffer, stdout);
|
fputs(qDumpOutBuffer, stdout);
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
@@ -451,7 +451,7 @@ static int dumpStdQStringSet()
|
|||||||
|
|
||||||
static int dumpStdMapIntString()
|
static int dumpStdMapIntString()
|
||||||
{
|
{
|
||||||
std::map<int,std::string> test;
|
std::map<int,std::string> test;
|
||||||
std::map<int,std::string>::value_type entry(42, std::string("fortytwo"));
|
std::map<int,std::string>::value_type entry(42, std::string("fortytwo"));
|
||||||
if (!optEmptyContainers) {
|
if (!optEmptyContainers) {
|
||||||
test.insert(entry);
|
test.insert(entry);
|
||||||
|
@@ -62,10 +62,10 @@ using namespace CPlusPlus;
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void Client::startExpandingMacro(unsigned offset, const Macro ¯o, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>())
|
\fn void Client::startExpandingMacro(unsigned offset, const Macro ¯o, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>())
|
||||||
|
|
||||||
Called when starting to expand a macro. The parameter \a inCondition indicates whether the
|
Called when starting to expand a macro. The parameter \a inCondition indicates whether the
|
||||||
expansion is happening inside a preprocessor conditional.
|
expansion is happening inside a preprocessor conditional.
|
||||||
|
|
||||||
\sa stopExpandingMacro()
|
\sa stopExpandingMacro()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -477,7 +477,7 @@ bool ResolveExpression::visit(CallAST *ast)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (Function *funTy = ty->asFunctionType()) {
|
} else if (Function *funTy = ty->asFunctionType()) {
|
||||||
if (maybeValidPrototype(funTy, actualArgumentCount))
|
if (maybeValidPrototype(funTy, actualArgumentCount))
|
||||||
addResult(funTy->returnType().simplified(), lastVisibleSymbol);
|
addResult(funTy->returnType().simplified(), lastVisibleSymbol);
|
||||||
|
|
||||||
@@ -601,7 +601,7 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
|
|||||||
Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp);
|
Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp);
|
||||||
const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context);
|
const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context);
|
||||||
|
|
||||||
foreach (Symbol *classObject, candidates) {
|
foreach (Symbol *classObject, candidates) {
|
||||||
const QList<Result> overloads = resolveMember(arrowAccessOp, classObject->asClass(),
|
const QList<Result> overloads = resolveMember(arrowAccessOp, classObject->asClass(),
|
||||||
namedTy->name());
|
namedTy->name());
|
||||||
|
|
||||||
@@ -715,16 +715,16 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
|
|||||||
foreach (Symbol *candidate, candidates) {
|
foreach (Symbol *candidate, candidates) {
|
||||||
FullySpecifiedType ty = candidate->type();
|
FullySpecifiedType ty = candidate->type();
|
||||||
Name *unqualifiedNameId = className;
|
Name *unqualifiedNameId = className;
|
||||||
|
|
||||||
if (QualifiedNameId *q = className->asQualifiedNameId())
|
if (QualifiedNameId *q = className->asQualifiedNameId())
|
||||||
unqualifiedNameId = q->unqualifiedNameId();
|
unqualifiedNameId = q->unqualifiedNameId();
|
||||||
|
|
||||||
if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
|
if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
|
||||||
GenTemplateInstance::Substitution subst;
|
GenTemplateInstance::Substitution subst;
|
||||||
|
|
||||||
for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
|
for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
|
||||||
FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
|
FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
|
||||||
|
|
||||||
if (i < klass->templateParameterCount()) {
|
if (i < klass->templateParameterCount()) {
|
||||||
Name *templArgName = klass->templateParameterAt(i)->name();
|
Name *templArgName = klass->templateParameterAt(i)->name();
|
||||||
if (templArgName && templArgName->identifier()) {
|
if (templArgName && templArgName->identifier()) {
|
||||||
@@ -733,11 +733,11 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GenTemplateInstance inst(_context, subst);
|
GenTemplateInstance inst(_context, subst);
|
||||||
ty = inst(candidate);
|
ty = inst(candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
results.append(Result(ty, candidate));
|
results.append(Result(ty, candidate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
QMap<QString, QString> *foundAppOptions,
|
QMap<QString, QString> *foundAppOptions,
|
||||||
QString *errorString,
|
QString *errorString,
|
||||||
PluginManagerPrivate *pmPrivate);
|
PluginManagerPrivate *pmPrivate);
|
||||||
|
|
||||||
bool parse();
|
bool parse();
|
||||||
|
|
||||||
static const char *NO_LOAD_OPTION;
|
static const char *NO_LOAD_OPTION;
|
||||||
@@ -63,13 +63,13 @@ private:
|
|||||||
|
|
||||||
enum TokenType { OptionalToken, RequiredToken };
|
enum TokenType { OptionalToken, RequiredToken };
|
||||||
bool nextToken(TokenType type = OptionalToken);
|
bool nextToken(TokenType type = OptionalToken);
|
||||||
|
|
||||||
const QStringList &m_args;
|
const QStringList &m_args;
|
||||||
const QMap<QString, bool> &m_appOptions;
|
const QMap<QString, bool> &m_appOptions;
|
||||||
QMap<QString, QString> *m_foundAppOptions;
|
QMap<QString, QString> *m_foundAppOptions;
|
||||||
QString *m_errorString;
|
QString *m_errorString;
|
||||||
PluginManagerPrivate *m_pmPrivate;
|
PluginManagerPrivate *m_pmPrivate;
|
||||||
|
|
||||||
// state
|
// state
|
||||||
QString m_currentArg;
|
QString m_currentArg;
|
||||||
QStringList::const_iterator m_it;
|
QStringList::const_iterator m_it;
|
||||||
|
@@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget
|
|||||||
public:
|
public:
|
||||||
PluginDetailsView(QWidget *parent = 0);
|
PluginDetailsView(QWidget *parent = 0);
|
||||||
~PluginDetailsView();
|
~PluginDetailsView();
|
||||||
|
|
||||||
void update(PluginSpec *spec);
|
void update(PluginSpec *spec);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -328,12 +328,12 @@ QList<PluginSpec *> PluginManager::plugins() const
|
|||||||
The caller (the application) may register itself for options via the \a appOptions list, containing pairs
|
The caller (the application) may register itself for options via the \a appOptions list, containing pairs
|
||||||
of "option string" and a bool that indicates if the option requires an argument.
|
of "option string" and a bool that indicates if the option requires an argument.
|
||||||
Application options always override any plugin's options.
|
Application options always override any plugin's options.
|
||||||
|
|
||||||
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
|
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
|
||||||
The command line options that were not processed can be retrieved via the arguments() method.
|
The command line options that were not processed can be retrieved via the arguments() method.
|
||||||
If an error occurred (like missing argument for an option that requires one), \a errorString contains
|
If an error occurred (like missing argument for an option that requires one), \a errorString contains
|
||||||
a descriptive message of the error.
|
a descriptive message of the error.
|
||||||
|
|
||||||
Returns if there was an error.
|
Returns if there was an error.
|
||||||
*/
|
*/
|
||||||
bool PluginManager::parseOptions(const QStringList &args,
|
bool PluginManager::parseOptions(const QStringList &args,
|
||||||
|
@@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*);
|
|||||||
given plugin \a manager with a given \a parent widget.
|
given plugin \a manager with a given \a parent widget.
|
||||||
*/
|
*/
|
||||||
PluginView::PluginView(PluginManager *manager, QWidget *parent)
|
PluginView::PluginView(PluginManager *manager, QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_ui(new Internal::Ui::PluginView),
|
m_ui(new Internal::Ui::PluginView),
|
||||||
p(new Internal::PluginViewPrivate)
|
p(new Internal::PluginViewPrivate)
|
||||||
{
|
{
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
|
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
|
||||||
{
|
{
|
||||||
|
@@ -55,7 +55,7 @@ using namespace Utils;
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Utils::SavedAction
|
\class Utils::SavedAction
|
||||||
|
|
||||||
\brief The SavedAction class is a helper class for actions with persistent
|
\brief The SavedAction class is a helper class for actions with persistent
|
||||||
state.
|
state.
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ QAction *SavedAction::updatedAction(const QString &text0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Uses \c settingsGroup() and \c settingsKey() to restore the
|
Uses \c settingsGroup() and \c settingsKey() to restore the
|
||||||
item from \a settings,
|
item from \a settings,
|
||||||
|
|
||||||
\sa settingsKey(), settingsGroup(), writeSettings()
|
\sa settingsKey(), settingsGroup(), writeSettings()
|
||||||
@@ -254,7 +254,7 @@ void SavedAction::readSettings(QSettings *settings)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Uses \c settingsGroup() and \c settingsKey() to write the
|
Uses \c settingsGroup() and \c settingsKey() to write the
|
||||||
item to \a settings,
|
item to \a settings,
|
||||||
|
|
||||||
\sa settingsKey(), settingsGroup(), readSettings()
|
\sa settingsKey(), settingsGroup(), readSettings()
|
||||||
@@ -268,12 +268,12 @@ void SavedAction::writeSettings(QSettings *settings)
|
|||||||
//qDebug() << "WRITING: " << m_settingsKey << " -> " << toString();
|
//qDebug() << "WRITING: " << m_settingsKey << " -> " << toString();
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A \c SavedAction can be connected to a widget, typically a
|
A \c SavedAction can be connected to a widget, typically a
|
||||||
checkbox, radiobutton, or a lineedit in some configuration dialog.
|
checkbox, radiobutton, or a lineedit in some configuration dialog.
|
||||||
|
|
||||||
The widget will retrieve its contents from the SavedAction's
|
The widget will retrieve its contents from the SavedAction's
|
||||||
value, and - depending on the \a ApplyMode - either write
|
value, and - depending on the \a ApplyMode - either write
|
||||||
changes back immediately, or when \s SavedAction::apply()
|
changes back immediately, or when \s SavedAction::apply()
|
||||||
is called explicitly.
|
is called explicitly.
|
||||||
@@ -286,7 +286,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
|
|||||||
qDebug() << "ALREADY CONNECTED: " << widget << m_widget << toString(); return);
|
qDebug() << "ALREADY CONNECTED: " << widget << m_widget << toString(); return);
|
||||||
m_widget = widget;
|
m_widget = widget;
|
||||||
m_applyMode = applyMode;
|
m_applyMode = applyMode;
|
||||||
|
|
||||||
if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget)) {
|
if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget)) {
|
||||||
if (button->isCheckable()) {
|
if (button->isCheckable()) {
|
||||||
button->setChecked(m_value.toBool());
|
button->setChecked(m_value.toBool());
|
||||||
@@ -298,14 +298,14 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
|
|||||||
}
|
}
|
||||||
} else if (QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget)) {
|
} else if (QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget)) {
|
||||||
spinBox->setValue(m_value.toInt());
|
spinBox->setValue(m_value.toInt());
|
||||||
//qDebug() << "SETTING VALUE" << spinBox->value();
|
//qDebug() << "SETTING VALUE" << spinBox->value();
|
||||||
connect(spinBox, SIGNAL(valueChanged(int)),
|
connect(spinBox, SIGNAL(valueChanged(int)),
|
||||||
this, SLOT(spinBoxValueChanged(int)));
|
this, SLOT(spinBoxValueChanged(int)));
|
||||||
connect(spinBox, SIGNAL(valueChanged(QString)),
|
connect(spinBox, SIGNAL(valueChanged(QString)),
|
||||||
this, SLOT(spinBoxValueChanged(QString)));
|
this, SLOT(spinBoxValueChanged(QString)));
|
||||||
} else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) {
|
} else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) {
|
||||||
lineEdit->setText(m_value.toString());
|
lineEdit->setText(m_value.toString());
|
||||||
//qDebug() << "SETTING TEXT" << lineEdit->text();
|
//qDebug() << "SETTING TEXT" << lineEdit->text();
|
||||||
connect(lineEdit, SIGNAL(editingFinished()),
|
connect(lineEdit, SIGNAL(editingFinished()),
|
||||||
this, SLOT(lineEditEditingFinished()));
|
this, SLOT(lineEditEditingFinished()));
|
||||||
} else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(widget)) {
|
} else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(widget)) {
|
||||||
|
@@ -72,7 +72,7 @@ public:
|
|||||||
|
|
||||||
virtual void readSettings(QSettings *settings);
|
virtual void readSettings(QSettings *settings);
|
||||||
Q_SLOT virtual void writeSettings(QSettings *settings);
|
Q_SLOT virtual void writeSettings(QSettings *settings);
|
||||||
|
|
||||||
virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply);
|
virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply);
|
||||||
virtual void disconnectWidget();
|
virtual void disconnectWidget();
|
||||||
Q_SLOT virtual void apply(QSettings *settings);
|
Q_SLOT virtual void apply(QSettings *settings);
|
||||||
|
@@ -236,7 +236,7 @@ static QString wrappedText(const QTextEdit *e)
|
|||||||
const QChar newLine = QLatin1Char('\n');
|
const QChar newLine = QLatin1Char('\n');
|
||||||
QString rc;
|
QString rc;
|
||||||
QTextCursor cursor(e->document());
|
QTextCursor cursor(e->document());
|
||||||
cursor.movePosition(QTextCursor::Start);
|
cursor.movePosition(QTextCursor::Start);
|
||||||
while (!cursor.atEnd()) {
|
while (!cursor.atEnd()) {
|
||||||
cursor.select(QTextCursor::LineUnderCursor);
|
cursor.select(QTextCursor::LineUnderCursor);
|
||||||
rc += cursor.selectedText();
|
rc += cursor.selectedText();
|
||||||
@@ -272,7 +272,7 @@ void SubmitEditorWidget::setLineWrap(bool v)
|
|||||||
qDebug() << Q_FUNC_INFO << v;
|
qDebug() << Q_FUNC_INFO << v;
|
||||||
if (v) {
|
if (v) {
|
||||||
m_d->m_ui.description->setLineWrapColumnOrWidth(m_d->m_lineWidth);
|
m_d->m_ui.description->setLineWrapColumnOrWidth(m_d->m_lineWidth);
|
||||||
m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
|
m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
|
||||||
} else {
|
} else {
|
||||||
m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
|
m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
|
||||||
}
|
}
|
||||||
@@ -488,7 +488,7 @@ void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction
|
|||||||
|
|
||||||
void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
|
void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
QMenu *menu = m_d->m_ui.description->createStandardContextMenu();
|
QMenu *menu = m_d->m_ui.description->createStandardContextMenu();
|
||||||
// Extend
|
// Extend
|
||||||
foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, m_d->descriptionEditContextMenuActions) {
|
foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, m_d->descriptionEditContextMenuActions) {
|
||||||
if (a.second) {
|
if (a.second) {
|
||||||
|
@@ -104,7 +104,7 @@ void FieldEntry::deleteGuiLater()
|
|||||||
clearButton->deleteLater();
|
clearButton->deleteLater();
|
||||||
browseButton->deleteLater();
|
browseButton->deleteLater();
|
||||||
toolBar->deleteLater();
|
toolBar->deleteLater();
|
||||||
lineEdit->deleteLater();
|
lineEdit->deleteLater();
|
||||||
combo->deleteLater();
|
combo->deleteLater();
|
||||||
layout->deleteLater();
|
layout->deleteLater();
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ void SubmitFieldWidget::setFields(const QStringList & f)
|
|||||||
{
|
{
|
||||||
// remove old fields
|
// remove old fields
|
||||||
for (int i = m_d->fieldEntries.size() - 1 ; i >= 0 ; i--)
|
for (int i = m_d->fieldEntries.size() - 1 ; i >= 0 ; i--)
|
||||||
removeField(i);
|
removeField(i);
|
||||||
|
|
||||||
m_d->fields = f;
|
m_d->fields = f;
|
||||||
if (!f.empty())
|
if (!f.empty())
|
||||||
|
@@ -37,7 +37,7 @@ SOURCES += reloadpromptutils.cpp \
|
|||||||
fancymainwindow.cpp \
|
fancymainwindow.cpp \
|
||||||
detailsbutton.cpp \
|
detailsbutton.cpp \
|
||||||
detailswidget.cpp
|
detailswidget.cpp
|
||||||
win32 {
|
win32 {
|
||||||
SOURCES += abstractprocess_win.cpp \
|
SOURCES += abstractprocess_win.cpp \
|
||||||
consoleprocess_win.cpp \
|
consoleprocess_win.cpp \
|
||||||
winutils.cpp
|
winutils.cpp
|
||||||
|
@@ -98,7 +98,7 @@ QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t,
|
|||||||
if (!(*verQueryValueW)(data, TEXT("\\"), &versionInfo, &len)) {
|
if (!(*verQueryValueW)(data, TEXT("\\"), &versionInfo, &len)) {
|
||||||
*errorMessage = QString::fromLatin1("Unable to determine version string of %1: %2").arg(name, winErrorMessage(GetLastError()));
|
*errorMessage = QString::fromLatin1("Unable to determine version string of %1: %2").arg(name, winErrorMessage(GetLastError()));
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
QString rc;
|
QString rc;
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case WinDLLFileVersion:
|
case WinDLLFileVersion:
|
||||||
|
@@ -368,7 +368,7 @@ void CMakeRunPage::initializePage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_generatorComboBox->clear();
|
m_generatorComboBox->clear();
|
||||||
// Find out whether we have multiple msvc versions
|
// Find out whether we have multiple msvc versions
|
||||||
QStringList msvcVersions = ProjectExplorer::ToolChain::availableMSVCVersions();
|
QStringList msvcVersions = ProjectExplorer::ToolChain::availableMSVCVersions();
|
||||||
@@ -412,7 +412,7 @@ void CMakeRunPage::runCMake()
|
|||||||
generator = "-GCodeBlocks - NMake Makefiles";
|
generator = "-GCodeBlocks - NMake Makefiles";
|
||||||
m_cmakeWizard->setMsvcVersion(version);
|
m_cmakeWizard->setMsvcVersion(version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else // Q_OS_WIN
|
#else // Q_OS_WIN
|
||||||
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
|
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
|
||||||
|
@@ -51,7 +51,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
|
|||||||
{
|
{
|
||||||
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
||||||
m_projectContext = uidm->uniqueIdentifier(CMakeProjectManager::Constants::PROJECTCONTEXT);
|
m_projectContext = uidm->uniqueIdentifier(CMakeProjectManager::Constants::PROJECTCONTEXT);
|
||||||
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
|
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMakeManager::projectContext() const
|
int CMakeManager::projectContext() const
|
||||||
@@ -115,7 +115,7 @@ void CMakeManager::createXmlFile(QProcess *proc, const QStringList &arguments, c
|
|||||||
proc->setProcessChannelMode(QProcess::MergedChannels);
|
proc->setProcessChannelMode(QProcess::MergedChannels);
|
||||||
proc->setEnvironment(env.toStringList());
|
proc->setEnvironment(env.toStringList());
|
||||||
|
|
||||||
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
|
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
|
||||||
proc->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator);
|
proc->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,6 @@ SOURCES = cmakeproject.cpp \
|
|||||||
cmakeopenprojectwizard.cpp \
|
cmakeopenprojectwizard.cpp \
|
||||||
cmakebuildenvironmentwidget.cpp
|
cmakebuildenvironmentwidget.cpp
|
||||||
RESOURCES += cmakeproject.qrc
|
RESOURCES += cmakeproject.qrc
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
||||||
OTHER_FILES += CMakeProjectManager.pluginspec
|
OTHER_FILES += CMakeProjectManager.pluginspec
|
||||||
|
@@ -126,7 +126,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateToolTipWithKeySequence();
|
void updateToolTipWithKeySequence();
|
||||||
|
|
||||||
QAction *m_action;
|
QAction *m_action;
|
||||||
QList<CommandLocation> m_locations;
|
QList<CommandLocation> m_locations;
|
||||||
QString m_toolTip;
|
QString m_toolTip;
|
||||||
|
@@ -40,7 +40,7 @@ namespace Core {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
struct ShortcutItem;
|
struct ShortcutItem;
|
||||||
|
|
||||||
class CommandsFile : public QObject
|
class CommandsFile : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -166,7 +166,7 @@ FORMS += dialogs/newdialog.ui \
|
|||||||
generalsettings.ui
|
generalsettings.ui
|
||||||
RESOURCES += core.qrc \
|
RESOURCES += core.qrc \
|
||||||
fancyactionbar.qrc
|
fancyactionbar.qrc
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
images.files = images/qtcreator_logo_*.png
|
images.files = images/qtcreator_logo_*.png
|
||||||
images.path = /share/pixmaps
|
images.path = /share/pixmaps
|
||||||
INSTALLS += images
|
INSTALLS += images
|
||||||
|
@@ -120,7 +120,7 @@ public:
|
|||||||
const QString &contents = QString());
|
const QString &contents = QString());
|
||||||
|
|
||||||
bool openExternalEditor(const QString &fileName, const QString &editorKind);
|
bool openExternalEditor(const QString &fileName, const QString &editorKind);
|
||||||
|
|
||||||
QStringList getOpenFileNames() const;
|
QStringList getOpenFileNames() const;
|
||||||
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
|
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
|
||||||
|
|
||||||
|
@@ -170,7 +170,7 @@ public:
|
|||||||
|
|
||||||
inline bool isView() const { return m_view != 0; }
|
inline bool isView() const { return m_view != 0; }
|
||||||
inline bool isRoot() const { return m_isRoot; }
|
inline bool isRoot() const { return m_isRoot; }
|
||||||
|
|
||||||
inline bool isSplitter() const { return m_splitter != 0; }
|
inline bool isSplitter() const { return m_splitter != 0; }
|
||||||
inline Core::IEditor *editor() const { return m_view ? m_view->currentEditor() : 0; }
|
inline Core::IEditor *editor() const { return m_view ? m_view->currentEditor() : 0; }
|
||||||
inline QList<Core::IEditor *> editors() const { return m_view ? m_view->editors() : QList<Core::IEditor*>(); }
|
inline QList<Core::IEditor *> editors() const { return m_view ? m_view->editors() : QList<Core::IEditor*>(); }
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
** contact the sales department at http://qt.nokia.com/contact.
|
** contact the sales department at http://qt.nokia.com/contact.
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef OPENEDITORSVIEW_H
|
#ifndef OPENEDITORSVIEW_H
|
||||||
#define OPENEDITORSVIEW_H
|
#define OPENEDITORSVIEW_H
|
||||||
|
|
||||||
|
@@ -284,7 +284,7 @@ public:
|
|||||||
|
|
||||||
void mousePressEvent(QMouseEvent *ev)
|
void mousePressEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
if (ev->modifiers() & Qt::ShiftModifier)
|
if (ev->modifiers() & Qt::ShiftModifier)
|
||||||
Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent));
|
Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
@@ -58,7 +58,7 @@ public:
|
|||||||
virtual QString displayName() = 0;
|
virtual QString displayName() = 0;
|
||||||
virtual QKeySequence activationSequence();
|
virtual QKeySequence activationSequence();
|
||||||
// This design is not optimal, think about it again once we need to extend it
|
// This design is not optimal, think about it again once we need to extend it
|
||||||
// It could be implemented as returning an object which has both the widget
|
// It could be implemented as returning an object which has both the widget
|
||||||
// and the docktoolbar widgets
|
// and the docktoolbar widgets
|
||||||
// Similar to how IView
|
// Similar to how IView
|
||||||
virtual NavigationView createWidget() = 0;
|
virtual NavigationView createWidget() = 0;
|
||||||
|
@@ -138,7 +138,7 @@ static OutputPaneManager *m_instance = 0;
|
|||||||
|
|
||||||
void OutputPaneManager::create()
|
void OutputPaneManager::create()
|
||||||
{
|
{
|
||||||
m_instance = new OutputPaneManager;
|
m_instance = new OutputPaneManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputPaneManager::destroy()
|
void OutputPaneManager::destroy()
|
||||||
|
@@ -37,13 +37,13 @@
|
|||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a set of helper classes to allow for widget animations in
|
* This is a set of helper classes to allow for widget animations in
|
||||||
* the style. Its mostly taken from Vista style so it should be fully documented
|
* the style. Its mostly taken from Vista style so it should be fully documented
|
||||||
* there.
|
* there.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Animation
|
class Animation
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
@@ -92,7 +92,7 @@ public:
|
|||||||
void startAnimation(Animation *);
|
void startAnimation(Animation *);
|
||||||
void stopAnimation(const QWidget *);
|
void stopAnimation(const QWidget *);
|
||||||
Animation* widgetAnimation(const QWidget *) const;
|
Animation* widgetAnimation(const QWidget *) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QBasicTimer animationTimer;
|
QBasicTimer animationTimer;
|
||||||
QList <Animation*> animations;
|
QList <Animation*> animations;
|
||||||
|
@@ -82,8 +82,8 @@ VersionDialog::VersionDialog(QWidget *parent)
|
|||||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
||||||
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
||||||
"PARTICULAR PURPOSE.<br/>")
|
"PARTICULAR PURPOSE.<br/>")
|
||||||
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
||||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
|
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
|
||||||
(QLatin1String(IDE_AUTHOR)), ideRev);
|
(QLatin1String(IDE_AUTHOR)), ideRev);
|
||||||
|
|
||||||
QLabel *copyRightLabel = new QLabel(description);
|
QLabel *copyRightLabel = new QLabel(description);
|
||||||
|
@@ -78,7 +78,7 @@ ClassNamePage::ClassNamePage(QWidget *parent) :
|
|||||||
|
|
||||||
connect(m_newClassWidget, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
|
connect(m_newClassWidget, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
|
||||||
|
|
||||||
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
||||||
pageLayout->addWidget(m_newClassWidget);
|
pageLayout->addWidget(m_newClassWidget);
|
||||||
QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding);
|
QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding);
|
||||||
pageLayout->addItem(vSpacer);
|
pageLayout->addItem(vSpacer);
|
||||||
|
@@ -759,7 +759,7 @@ CPlusPlus::Symbol *CPPEditor::findCanonicalSymbol(const QTextCursor &cursor,
|
|||||||
|
|
||||||
|
|
||||||
void CPPEditor::findUsages()
|
void CPPEditor::findUsages()
|
||||||
{
|
{
|
||||||
if (Symbol *canonicalSymbol = markSymbols()) {
|
if (Symbol *canonicalSymbol = markSymbols()) {
|
||||||
m_modelManager->findUsages(canonicalSymbol);
|
m_modelManager->findUsages(canonicalSymbol);
|
||||||
}
|
}
|
||||||
@@ -1802,7 +1802,7 @@ const char *CPPEditorEditable::kind() const
|
|||||||
|
|
||||||
bool CPPEditorEditable::open(const QString & fileName)
|
bool CPPEditorEditable::open(const QString & fileName)
|
||||||
{
|
{
|
||||||
bool b = TextEditor::BaseTextEditorEditable::open(fileName);
|
bool b = TextEditor::BaseTextEditorEditable::open(fileName);
|
||||||
editor()->setMimeType(Core::ICore::instance()->mimeDatabase()->findByFile(QFileInfo(fileName)).type());
|
editor()->setMimeType(Core::ICore::instance()->mimeDatabase()->findByFile(QFileInfo(fileName)).type());
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
@@ -259,7 +259,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
|
|||||||
| TextEditor::TextEditorActionHandler::UnCollapseAll);
|
| TextEditor::TextEditorActionHandler::UnCollapseAll);
|
||||||
|
|
||||||
m_actionHandler->initializeActions();
|
m_actionHandler->initializeActions();
|
||||||
|
|
||||||
contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR));
|
contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR));
|
||||||
|
|
||||||
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
|
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
|
||||||
|
@@ -55,7 +55,7 @@ struct CppFileSettings {
|
|||||||
|
|
||||||
void toSettings(QSettings *) const;
|
void toSettings(QSettings *) const;
|
||||||
void fromSettings(QSettings *);
|
void fromSettings(QSettings *);
|
||||||
bool applySuffixesToMimeDB();
|
bool applySuffixesToMimeDB();
|
||||||
|
|
||||||
// Convenience to return a license template completely formatted.
|
// Convenience to return a license template completely formatted.
|
||||||
// Currently made public in
|
// Currently made public in
|
||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
CppFileSettings settings() const;
|
CppFileSettings settings() const;
|
||||||
void setSettings(const CppFileSettings &s);
|
void setSettings(const CppFileSettings &s);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotEdit();
|
void slotEdit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -104,7 +104,7 @@ public:
|
|||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void updateModifiedSourceFiles();
|
void updateModifiedSourceFiles();
|
||||||
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
|
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
|
||||||
virtual void GC() = 0;
|
virtual void GC() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@ public:
|
|||||||
// return;
|
// return;
|
||||||
if (m_data->markerLineNumber != lineNumber) {
|
if (m_data->markerLineNumber != lineNumber) {
|
||||||
m_data->markerLineNumber = lineNumber;
|
m_data->markerLineNumber = lineNumber;
|
||||||
// FIXME: should we tell gdb about the change?
|
// FIXME: should we tell gdb about the change?
|
||||||
// Ignore it for now, as we would require re-compilation
|
// Ignore it for now, as we would require re-compilation
|
||||||
// and debugger re-start anyway.
|
// and debugger re-start anyway.
|
||||||
if (0 && !m_data->bpLineNumber.isEmpty()) {
|
if (0 && !m_data->bpLineNumber.isEmpty()) {
|
||||||
@@ -171,10 +171,10 @@ BreakpointData::BreakpointData(BreakHandler *handler)
|
|||||||
bpMultiple = false;
|
bpMultiple = false;
|
||||||
//#if defined(Q_OS_MAC)
|
//#if defined(Q_OS_MAC)
|
||||||
// // full names do not work on Mac/MI
|
// // full names do not work on Mac/MI
|
||||||
useFullPath = false;
|
useFullPath = false;
|
||||||
//#else
|
//#else
|
||||||
// //where = m_manager->shortName(data->fileName);
|
// //where = m_manager->shortName(data->fileName);
|
||||||
// useFullPath = true;
|
// useFullPath = true;
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
|||||||
// str = data->markerFileName;
|
// str = data->markerFileName;
|
||||||
str = str.isEmpty() ? empty : str;
|
str = str.isEmpty() ? empty : str;
|
||||||
if (data->useFullPath)
|
if (data->useFullPath)
|
||||||
str = "/.../" + str;
|
str = "/.../" + str;
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
if (role == Qt::UserRole)
|
if (role == Qt::UserRole)
|
||||||
@@ -574,7 +574,7 @@ bool BreakHandler::setData(const QModelIndex &mi, const QVariant &value, int rol
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -318,7 +318,7 @@ void BreakWindow::resizeColumnsToContents()
|
|||||||
void BreakWindow::setAlwaysResizeColumnsToContents(bool on)
|
void BreakWindow::setAlwaysResizeColumnsToContents(bool on)
|
||||||
{
|
{
|
||||||
m_alwaysResizeColumnsToContents = on;
|
m_alwaysResizeColumnsToContents = on;
|
||||||
QHeaderView::ResizeMode mode = on
|
QHeaderView::ResizeMode mode = on
|
||||||
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
||||||
for (int i = model()->columnCount(); --i >= 0; )
|
for (int i = model()->columnCount(); --i >= 0; )
|
||||||
header()->setResizeMode(i, mode);
|
header()->setResizeMode(i, mode);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# Detect presence of "Debugging Tools For Windows"
|
# Detect presence of "Debugging Tools For Windows"
|
||||||
# in case VS compilers are used.
|
# in case VS compilers are used.
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
contains(QMAKE_CXX, cl) {
|
contains(QMAKE_CXX, cl) {
|
||||||
|
@@ -105,7 +105,7 @@ void CDBBreakPoint::clear()
|
|||||||
ignoreCount = 0;
|
ignoreCount = 0;
|
||||||
oneShot = false;
|
oneShot = false;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
clearExpressionData();
|
clearExpressionData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDBBreakPoint::clearExpressionData()
|
void CDBBreakPoint::clearExpressionData()
|
||||||
@@ -516,7 +516,7 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
|
|||||||
CIDebugSymbols *syms,
|
CIDebugSymbols *syms,
|
||||||
BreakHandler *handler,
|
BreakHandler *handler,
|
||||||
QString *errorMessage, QStringList *warnings)
|
QString *errorMessage, QStringList *warnings)
|
||||||
{
|
{
|
||||||
errorMessage->clear();
|
errorMessage->clear();
|
||||||
warnings->clear();
|
warnings->clear();
|
||||||
// Do an initial check whether we are in a state that allows
|
// Do an initial check whether we are in a state that allows
|
||||||
|
@@ -308,7 +308,7 @@ CdbDebugEnginePrivate::CdbDebugEnginePrivate(DebuggerManager *manager,
|
|||||||
m_eventThreadId(-1),
|
m_eventThreadId(-1),
|
||||||
m_interruptArticifialThreadId(-1),
|
m_interruptArticifialThreadId(-1),
|
||||||
m_ignoreInitialBreakPoint(false),
|
m_ignoreInitialBreakPoint(false),
|
||||||
m_interrupted(false),
|
m_interrupted(false),
|
||||||
m_watchTimer(-1),
|
m_watchTimer(-1),
|
||||||
m_debugEventCallBack(engine),
|
m_debugEventCallBack(engine),
|
||||||
m_engine(engine),
|
m_engine(engine),
|
||||||
@@ -788,7 +788,7 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEnginePrivate::processCreatedAttached(ULONG64 processHandle, ULONG64 initialThreadHandle)
|
void CdbDebugEnginePrivate::processCreatedAttached(ULONG64 processHandle, ULONG64 initialThreadHandle)
|
||||||
{
|
{
|
||||||
m_engine->setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__);
|
m_engine->setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__);
|
||||||
setDebuggeeHandles(reinterpret_cast<HANDLE>(processHandle), reinterpret_cast<HANDLE>(initialThreadHandle));
|
setDebuggeeHandles(reinterpret_cast<HANDLE>(processHandle), reinterpret_cast<HANDLE>(initialThreadHandle));
|
||||||
ULONG currentThreadId;
|
ULONG currentThreadId;
|
||||||
@@ -845,7 +845,7 @@ bool CdbDebugEnginePrivate::endInferior(EndInferiorAction action, QString *error
|
|||||||
}
|
}
|
||||||
bool success = false;
|
bool success = false;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case DetachInferior: {
|
case DetachInferior: {
|
||||||
const HRESULT hr = m_cif.debugClient->DetachCurrentProcess();
|
const HRESULT hr = m_cif.debugClient->DetachCurrentProcess();
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
success = true;
|
success = true;
|
||||||
@@ -1089,7 +1089,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
|
|||||||
str << 'p';
|
str << 'p';
|
||||||
break;
|
break;
|
||||||
case DEBUG_STATUS_STEP_INTO:
|
case DEBUG_STATUS_STEP_INTO:
|
||||||
str << 't';
|
str << 't';
|
||||||
break;
|
break;
|
||||||
case CdbExtendedExecutionStatusStepOut:
|
case CdbExtendedExecutionStatusStepOut:
|
||||||
str << "gu";
|
str << "gu";
|
||||||
@@ -1126,7 +1126,7 @@ void CdbDebugEngine::nextExec()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::stepIExec()
|
void CdbDebugEngine::stepIExec()
|
||||||
{
|
{
|
||||||
stepExec(); // Step into by instruction (figured out by step)
|
stepExec(); // Step into by instruction (figured out by step)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1143,7 +1143,7 @@ void CdbDebugEngine::stepOutExec()
|
|||||||
|
|
||||||
void CdbDebugEngine::continueInferior()
|
void CdbDebugEngine::continueInferior()
|
||||||
{
|
{
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
if (!m_d->continueInferior(&errorMessage))
|
if (!m_d->continueInferior(&errorMessage))
|
||||||
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
|
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
|
||||||
}
|
}
|
||||||
@@ -1381,7 +1381,7 @@ void CdbDebugEngine::activateFrame(int frameIndex)
|
|||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
StackHandler *stackHandler = manager()->stackHandler();
|
StackHandler *stackHandler = manager()->stackHandler();
|
||||||
do {
|
do {
|
||||||
WatchHandler *watchHandler = manager()->watchHandler();
|
WatchHandler *watchHandler = manager()->watchHandler();
|
||||||
const int oldIndex = stackHandler->currentIndex();
|
const int oldIndex = stackHandler->currentIndex();
|
||||||
if (frameIndex >= stackHandler->stackSize()) {
|
if (frameIndex >= stackHandler->stackSize()) {
|
||||||
@@ -1493,7 +1493,7 @@ void CdbDebugEngine::fetchDisassembler(DisassemblerViewAgent *agent,
|
|||||||
bool ok = false;
|
bool ok = false;
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
do {
|
do {
|
||||||
// get address
|
// get address
|
||||||
QString address;
|
QString address;
|
||||||
if (!frame.file.isEmpty())
|
if (!frame.file.isEmpty())
|
||||||
address = frame.address;
|
address = frame.address;
|
||||||
@@ -1780,7 +1780,7 @@ bool CdbDebugEnginePrivate::setCDBThreadId(unsigned long threadId, QString *erro
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const QString msg = CdbDebugEngine::tr("Changing threads: %1 -> %2").arg(currentThreadId).arg(threadId);
|
const QString msg = CdbDebugEngine::tr("Changing threads: %1 -> %2").arg(currentThreadId).arg(threadId);
|
||||||
m_engine->showStatusMessage(msg, 500);
|
m_engine->showStatusMessage(msg, 500);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1855,7 +1855,7 @@ void CdbDebugEnginePrivate::updateStackTrace()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Visibly warn the users about missing top frames/all frames, as they otherwise
|
// Visibly warn the users about missing top frames/all frames, as they otherwise
|
||||||
// might think stepping is broken.
|
// might think stepping is broken.
|
||||||
if (!stackFrames.at(0).isUsable()) {
|
if (!stackFrames.at(0).isUsable()) {
|
||||||
const QString topFunction = count ? stackFrames.at(0).function : QString();
|
const QString topFunction = count ? stackFrames.at(0).function : QString();
|
||||||
const QString msg = current >= 0 ?
|
const QString msg = current >= 0 ?
|
||||||
|
@@ -73,8 +73,8 @@ public:
|
|||||||
virtual void nextExec();
|
virtual void nextExec();
|
||||||
virtual void stepIExec();
|
virtual void stepIExec();
|
||||||
virtual void nextIExec();
|
virtual void nextIExec();
|
||||||
|
|
||||||
virtual void continueInferior();
|
virtual void continueInferior();
|
||||||
virtual void interruptInferior();
|
virtual void interruptInferior();
|
||||||
|
|
||||||
virtual void runToLineExec(const QString &fileName, int lineNumber);
|
virtual void runToLineExec(const QString &fileName, int lineNumber);
|
||||||
@@ -110,7 +110,7 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void slotConsoleStubStarted();
|
void slotConsoleStubStarted();
|
||||||
void slotConsoleStubError(const QString &msg);
|
void slotConsoleStubError(const QString &msg);
|
||||||
void slotConsoleStubTerminated();
|
void slotConsoleStubTerminated();
|
||||||
void warning(const QString &w);
|
void warning(const QString &w);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -157,7 +157,7 @@ struct CdbDebugEnginePrivate
|
|||||||
const QSharedPointer<CdbOptions> m_options;
|
const QSharedPointer<CdbOptions> m_options;
|
||||||
HANDLE m_hDebuggeeProcess;
|
HANDLE m_hDebuggeeProcess;
|
||||||
HANDLE m_hDebuggeeThread;
|
HANDLE m_hDebuggeeThread;
|
||||||
bool m_interrupted;
|
bool m_interrupted;
|
||||||
int m_currentThreadId;
|
int m_currentThreadId;
|
||||||
int m_eventThreadId;
|
int m_eventThreadId;
|
||||||
int m_interruptArticifialThreadId;
|
int m_interruptArticifialThreadId;
|
||||||
@@ -167,7 +167,7 @@ struct CdbDebugEnginePrivate
|
|||||||
int m_watchTimer;
|
int m_watchTimer;
|
||||||
CdbComInterfaces m_cif;
|
CdbComInterfaces m_cif;
|
||||||
CdbDebugEventCallback m_debugEventCallBack;
|
CdbDebugEventCallback m_debugEventCallBack;
|
||||||
CdbDebugOutput m_debugOutputCallBack;
|
CdbDebugOutput m_debugOutputCallBack;
|
||||||
QSharedPointer<CdbDumperHelper> m_dumper;
|
QSharedPointer<CdbDumperHelper> m_dumper;
|
||||||
QString m_baseImagePath;
|
QString m_baseImagePath;
|
||||||
|
|
||||||
|
@@ -121,7 +121,7 @@ STDMETHODIMP CdbDebugEventCallbackBase::CreateProcess(
|
|||||||
__in ULONG64 /* ThreadDataOffset */,
|
__in ULONG64 /* ThreadDataOffset */,
|
||||||
__in ULONG64 /* StartOffset */
|
__in ULONG64 /* StartOffset */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ STDMETHODIMP CdbDebugEventCallbackBase::LoadModule(
|
|||||||
__in ULONG /* CheckSum */,
|
__in ULONG /* CheckSum */,
|
||||||
__in ULONG /* TimeDateStamp */
|
__in ULONG /* TimeDateStamp */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ STDMETHODIMP CdbDebugEventCallbackBase::ChangeSymbolState(
|
|||||||
__in ULONG /* Flags */,
|
__in ULONG /* Flags */,
|
||||||
__in ULONG64 /* Argument */
|
__in ULONG64 /* Argument */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -331,7 +331,7 @@ void CdbDumperInitThread ::run()
|
|||||||
case CdbDumperHelper::Loaded: // Injection load succeeded, ideally
|
case CdbDumperHelper::Loaded: // Injection load succeeded, ideally
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Perform remaining initialization
|
// Perform remaining initialization
|
||||||
emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 60000);
|
emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 60000);
|
||||||
m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage);
|
m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage);
|
||||||
}
|
}
|
||||||
@@ -656,7 +656,7 @@ CdbDumperHelper::DumpResult CdbDumperHelper::dumpTypeI(const WatchData &wd, bool
|
|||||||
{
|
{
|
||||||
errorMessage->clear();
|
errorMessage->clear();
|
||||||
// Check failure cache and supported types
|
// Check failure cache and supported types
|
||||||
if (m_state == Disabled) {
|
if (m_state == Disabled) {
|
||||||
*errorMessage =m_msgDisabled;
|
*errorMessage =m_msgDisabled;
|
||||||
return DumpNotHandled;
|
return DumpNotHandled;
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ ExceptionBlocker::ExceptionBlocker(CIDebugControl *ctrl, ULONG code, Mode m) :
|
|||||||
{
|
{
|
||||||
// Retrieve current state
|
// Retrieve current state
|
||||||
memset(&m_oldParameters, 0, sizeof(DEBUG_EXCEPTION_FILTER_PARAMETERS));
|
memset(&m_oldParameters, 0, sizeof(DEBUG_EXCEPTION_FILTER_PARAMETERS));
|
||||||
if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) {
|
if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) {
|
||||||
// Are we in a nested instantiation?
|
// Are we in a nested instantiation?
|
||||||
const ULONG desiredExOption = m == IgnoreException ? DEBUG_FILTER_IGNORE : DEBUG_FILTER_OUTPUT;
|
const ULONG desiredExOption = m == IgnoreException ? DEBUG_FILTER_IGNORE : DEBUG_FILTER_OUTPUT;
|
||||||
const bool isAlreadyBlocked = m_oldParameters.ExecutionOption == desiredExOption
|
const bool isAlreadyBlocked = m_oldParameters.ExecutionOption == desiredExOption
|
||||||
|
@@ -64,7 +64,7 @@ bool getModuleNameList(CIDebugSymbols *syms, QStringList *modules, QString *erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorMessage)
|
bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorMessage)
|
||||||
{
|
{
|
||||||
ULONG count;
|
ULONG count;
|
||||||
modules->clear();
|
modules->clear();
|
||||||
if (!getModuleCount(syms, &count, errorMessage))
|
if (!getModuleCount(syms, &count, errorMessage))
|
||||||
@@ -105,7 +105,7 @@ bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorM
|
|||||||
bool searchSymbols(CIDebugSymbols *syms, const QString &pattern,
|
bool searchSymbols(CIDebugSymbols *syms, const QString &pattern,
|
||||||
QStringList *matches, QString *errorMessage)
|
QStringList *matches, QString *errorMessage)
|
||||||
{
|
{
|
||||||
matches->clear();
|
matches->clear();
|
||||||
ULONG64 handle = 0;
|
ULONG64 handle = 0;
|
||||||
// E_NOINTERFACE means "no match". Apparently, it does not always
|
// E_NOINTERFACE means "no match". Apparently, it does not always
|
||||||
// set handle.
|
// set handle.
|
||||||
|
@@ -130,7 +130,7 @@ WatchHandleDumperInserter::WatchHandleDumperInserter(WatchHandler *wh,
|
|||||||
|
|
||||||
// Prevent recursion of the model by setting value and type
|
// Prevent recursion of the model by setting value and type
|
||||||
static inline bool fixDumperType(WatchData *wd, const WatchData *source = 0)
|
static inline bool fixDumperType(WatchData *wd, const WatchData *source = 0)
|
||||||
{
|
{
|
||||||
const bool missing = wd->isTypeNeeded() || wd->type.isEmpty();
|
const bool missing = wd->isTypeNeeded() || wd->type.isEmpty();
|
||||||
if (missing) {
|
if (missing) {
|
||||||
static const QString unknownType = QCoreApplication::translate("CdbStackFrameContext", "<Unknown Type>");
|
static const QString unknownType = QCoreApplication::translate("CdbStackFrameContext", "<Unknown Type>");
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
explicit CdbStackFrameContext(const QSharedPointer<CdbDumperHelper> &dumper,
|
explicit CdbStackFrameContext(const QSharedPointer<CdbDumperHelper> &dumper,
|
||||||
CdbSymbolGroupContext *symbolContext);
|
CdbSymbolGroupContext *symbolContext);
|
||||||
~CdbStackFrameContext();
|
~CdbStackFrameContext();
|
||||||
|
|
||||||
bool assignValue(const QString &iname, const QString &value,
|
bool assignValue(const QString &iname, const QString &value,
|
||||||
QString *newValue /* = 0 */, QString *errorMessage);
|
QString *newValue /* = 0 */, QString *errorMessage);
|
||||||
|
@@ -58,7 +58,7 @@ CdbStackTraceContext::CdbStackTraceContext(const QSharedPointer<CdbDumperHelper>
|
|||||||
CdbStackTraceContext *CdbStackTraceContext::create(const QSharedPointer<CdbDumperHelper> &dumper,
|
CdbStackTraceContext *CdbStackTraceContext::create(const QSharedPointer<CdbDumperHelper> &dumper,
|
||||||
unsigned long threadId,
|
unsigned long threadId,
|
||||||
QString *errorMessage)
|
QString *errorMessage)
|
||||||
{
|
{
|
||||||
if (debugCDB)
|
if (debugCDB)
|
||||||
qDebug() << Q_FUNC_INFO << threadId;
|
qDebug() << Q_FUNC_INFO << threadId;
|
||||||
// fill the DEBUG_STACK_FRAME array
|
// fill the DEBUG_STACK_FRAME array
|
||||||
@@ -124,7 +124,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa
|
|||||||
}
|
}
|
||||||
|
|
||||||
int CdbStackTraceContext::indexOf(const QString &function) const
|
int CdbStackTraceContext::indexOf(const QString &function) const
|
||||||
{
|
{
|
||||||
|
|
||||||
const QChar exclamationMark = QLatin1Char('!');
|
const QChar exclamationMark = QLatin1Char('!');
|
||||||
const int count = m_frames.size();
|
const int count = m_frames.size();
|
||||||
@@ -168,9 +168,9 @@ CdbStackFrameContext *CdbStackTraceContext::frameContextAt(int index, QString *e
|
|||||||
*errorMessage = msgFrameContextFailed(index, m_frames.at(index), *errorMessage);
|
*errorMessage = msgFrameContextFailed(index, m_frames.at(index), *errorMessage);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// Exclude unitialized variables if desired
|
// Exclude unitialized variables if desired
|
||||||
QStringList uninitializedVariables;
|
QStringList uninitializedVariables;
|
||||||
if (theDebuggerAction(UseCodeModel)->isChecked()) {
|
if (theDebuggerAction(UseCodeModel)->isChecked()) {
|
||||||
const StackFrame &frame = m_frames.at(index);
|
const StackFrame &frame = m_frames.at(index);
|
||||||
getUninitializedVariables(DebuggerManager::instance()->cppCodeModelSnapshot(), frame.function, frame.file, frame.line, &uninitializedVariables);
|
getUninitializedVariables(DebuggerManager::instance()->cppCodeModelSnapshot(), frame.function, frame.file, frame.line, &uninitializedVariables);
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ static inline bool getStoppedThreadState(const CdbComInterfaces &cif,
|
|||||||
}
|
}
|
||||||
ULONG frameCount;
|
ULONG frameCount;
|
||||||
// Ignore the top frame if it is "ntdll!KiFastSystemCallRet", which is
|
// Ignore the top frame if it is "ntdll!KiFastSystemCallRet", which is
|
||||||
// not interesting for display.
|
// not interesting for display.
|
||||||
DEBUG_STACK_FRAME frames[MaxFrames];
|
DEBUG_STACK_FRAME frames[MaxFrames];
|
||||||
hr = cif.debugControl->GetStackTrace(0, 0, 0, frames, MaxFrames, &frameCount);
|
hr = cif.debugControl->GetStackTrace(0, 0, 0, frames, MaxFrames, &frameCount);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
|
@@ -55,7 +55,7 @@ struct ThreadData;
|
|||||||
* Maintains an on-demand constructed list of CdbStackFrameContext
|
* Maintains an on-demand constructed list of CdbStackFrameContext
|
||||||
* containining the local variables of the stack. */
|
* containining the local variables of the stack. */
|
||||||
|
|
||||||
class CdbStackTraceContext
|
class CdbStackTraceContext
|
||||||
{
|
{
|
||||||
Q_DISABLE_COPY(CdbStackTraceContext)
|
Q_DISABLE_COPY(CdbStackTraceContext)
|
||||||
|
|
||||||
|
@@ -411,7 +411,7 @@ static bool inline getUnsignedHexValue(QString stringValue, quint64 *value)
|
|||||||
return false;
|
return false;
|
||||||
stringValue.remove(0, 2);
|
stringValue.remove(0, 2);
|
||||||
// Remove 64bit separator
|
// Remove 64bit separator
|
||||||
if (stringValue.size() > 9) {
|
if (stringValue.size() > 9) {
|
||||||
const int sepPos = stringValue.size() - 9;
|
const int sepPos = stringValue.size() - 9;
|
||||||
if (stringValue.at(sepPos) == QLatin1Char('`'))
|
if (stringValue.at(sepPos) == QLatin1Char('`'))
|
||||||
stringValue.remove(sepPos, 1);
|
stringValue.remove(sepPos, 1);
|
||||||
@@ -487,8 +487,8 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
|
|||||||
const QString fullShadowedName = WatchData::shadowedName(name, shadowedNumber);
|
const QString fullShadowedName = WatchData::shadowedName(name, shadowedNumber);
|
||||||
wd.name = WatchData::shadowedName(removeInnerTemplateType(name), shadowedNumber);
|
wd.name = WatchData::shadowedName(removeInnerTemplateType(name), shadowedNumber);
|
||||||
wd.addr = hexSymbolOffset(m_symbolGroup, index);
|
wd.addr = hexSymbolOffset(m_symbolGroup, index);
|
||||||
const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index);
|
const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index);
|
||||||
wd.setType(type);
|
wd.setType(type);
|
||||||
// Check for unitialized variables at level 0 only.
|
// Check for unitialized variables at level 0 only.
|
||||||
const DEBUG_SYMBOL_PARAMETERS &p = m_symbolParameters.at(index);
|
const DEBUG_SYMBOL_PARAMETERS &p = m_symbolParameters.at(index);
|
||||||
if (p.ParentSymbol == DEBUG_ANY_ID && m_uninitializedVariables.contains(fullShadowedName)) {
|
if (p.ParentSymbol == DEBUG_ANY_ID && m_uninitializedVariables.contains(fullShadowedName)) {
|
||||||
|
@@ -74,7 +74,7 @@ class CdbSymbolGroupContext
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
~CdbSymbolGroupContext();
|
~CdbSymbolGroupContext();
|
||||||
static CdbSymbolGroupContext *create(const QString &prefix,
|
static CdbSymbolGroupContext *create(const QString &prefix,
|
||||||
CIDebugSymbolGroup *symbolGroup,
|
CIDebugSymbolGroup *symbolGroup,
|
||||||
const QStringList &uninitializedVariables,
|
const QStringList &uninitializedVariables,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
@@ -77,7 +77,7 @@ FORMS += attachexternaldialog.ui \
|
|||||||
startexternaldialog.ui \
|
startexternaldialog.ui \
|
||||||
startremotedialog.ui
|
startremotedialog.ui
|
||||||
RESOURCES += debugger.qrc
|
RESOURCES += debugger.qrc
|
||||||
false {
|
false {
|
||||||
SOURCES += $$PWD/modeltest.cpp
|
SOURCES += $$PWD/modeltest.cpp
|
||||||
HEADERS += $$PWD/modeltest.h
|
HEADERS += $$PWD/modeltest.h
|
||||||
DEFINES += USE_MODEL_TEST=1
|
DEFINES += USE_MODEL_TEST=1
|
||||||
|
@@ -60,7 +60,7 @@ DebuggerSettings::~DebuggerSettings()
|
|||||||
{
|
{
|
||||||
qDeleteAll(m_items);
|
qDeleteAll(m_items);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!m_items.contains(code),
|
QTC_ASSERT(!m_items.contains(code),
|
||||||
@@ -81,7 +81,7 @@ void DebuggerSettings::writeSettings(QSettings *settings) const
|
|||||||
foreach (SavedAction *item, m_items)
|
foreach (SavedAction *item, m_items)
|
||||||
item->writeSettings(settings);
|
item->writeSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
SavedAction *DebuggerSettings::item(int code) const
|
SavedAction *DebuggerSettings::item(int code) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
||||||
|
@@ -60,7 +60,7 @@ public slots:
|
|||||||
void writeSettings(QSettings *settings) const;
|
void writeSettings(QSettings *settings) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QHash<int, Utils::SavedAction *> m_items;
|
QHash<int, Utils::SavedAction *> m_items;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ enum DebuggerActionCode
|
|||||||
DebugDebuggingHelpers,
|
DebugDebuggingHelpers,
|
||||||
|
|
||||||
UseCodeModel,
|
UseCodeModel,
|
||||||
|
|
||||||
UseToolTipsInMainEditor,
|
UseToolTipsInMainEditor,
|
||||||
UseToolTipsInLocalsView,
|
UseToolTipsInLocalsView,
|
||||||
UseToolTipsInBreakpointsView,
|
UseToolTipsInBreakpointsView,
|
||||||
|
@@ -76,7 +76,7 @@ MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr)
|
MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr)
|
||||||
: QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
|
: QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
init(addr.toULongLong(&ok, 0));
|
init(addr.toULongLong(&ok, 0));
|
||||||
@@ -242,7 +242,7 @@ void DisassemblerViewAgent::setFrame(const StackFrame &frame)
|
|||||||
setContents(*it);
|
setContents(*it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IDebuggerEngine *engine = d->manager->currentEngine();
|
IDebuggerEngine *engine = d->manager->currentEngine();
|
||||||
QTC_ASSERT(engine, return);
|
QTC_ASSERT(engine, return);
|
||||||
engine->fetchDisassembler(this, frame);
|
engine->fetchDisassembler(this, frame);
|
||||||
@@ -296,7 +296,7 @@ void DisassemblerViewAgent::setContents(const QString &contents)
|
|||||||
bool DisassemblerViewAgent::contentsCoversAddress(const QString &contents) const
|
bool DisassemblerViewAgent::contentsCoversAddress(const QString &contents) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d, return false);
|
QTC_ASSERT(d, return false);
|
||||||
for (int pos = 0, line = 0; ; ++line, ++pos) {
|
for (int pos = 0, line = 0; ; ++line, ++pos) {
|
||||||
if (contents.midRef(pos, d->frame.address.size()) == d->frame.address)
|
if (contents.midRef(pos, d->frame.address.size()) == d->frame.address)
|
||||||
return true;
|
return true;
|
||||||
pos = contents.indexOf('\n', pos + 1);
|
pos = contents.indexOf('\n', pos + 1);
|
||||||
|
@@ -116,7 +116,7 @@ enum LogChannel
|
|||||||
LogStatus, // Used for status changed messages
|
LogStatus, // Used for status changed messages
|
||||||
LogTime, // Used for time stamp messages
|
LogTime, // Used for time stamp messages
|
||||||
LogDebug,
|
LogDebug,
|
||||||
LogMisc
|
LogMisc
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
@@ -388,9 +388,9 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
|
|||||||
m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
|
m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
|
||||||
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
|
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
|
||||||
|
|
||||||
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
|
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
|
||||||
this, SLOT(updateState()));
|
this, SLOT(updateState()));
|
||||||
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
|
|
||||||
|
@@ -664,7 +664,7 @@ void DebuggerManager::setSimpleDockWidgetArrangement()
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (QDockWidget *dockWidget, dockWidgets) {
|
foreach (QDockWidget *dockWidget, dockWidgets) {
|
||||||
if (dockWidget == d->m_outputDock)
|
if (dockWidget == d->m_outputDock)
|
||||||
d->m_mainWindow->addDockWidget(Qt::TopDockWidgetArea, dockWidget);
|
d->m_mainWindow->addDockWidget(Qt::TopDockWidgetArea, dockWidget);
|
||||||
else
|
else
|
||||||
d->m_mainWindow->addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
|
d->m_mainWindow->addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
|
||||||
@@ -990,7 +990,7 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
|||||||
d->m_startParameters->toolChainType, &errorMessage);
|
d->m_startParameters->toolChainType, &errorMessage);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
d->m_engine = determineDebuggerEngine(d->m_startParameters->executable,
|
d->m_engine = determineDebuggerEngine(d->m_startParameters->executable,
|
||||||
d->m_startParameters->toolChainType, &errorMessage, &settingsIdHint);
|
d->m_startParameters->toolChainType, &errorMessage, &settingsIdHint);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1427,7 +1427,7 @@ void DebuggerManager::showDebuggerInput(int channel, const QString &msg)
|
|||||||
{
|
{
|
||||||
if (d->m_outputWindow)
|
if (d->m_outputWindow)
|
||||||
emit emitShowInput(channel, msg);
|
emit emitShowInput(channel, msg);
|
||||||
else
|
else
|
||||||
qDebug() << "INPUT: " << channel << msg;
|
qDebug() << "INPUT: " << channel << msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -137,8 +137,8 @@ enum DebuggerEngineTypeFlags
|
|||||||
ScriptEngineType = 0x02,
|
ScriptEngineType = 0x02,
|
||||||
CdbEngineType = 0x04,
|
CdbEngineType = 0x04,
|
||||||
AllEngineTypes = GdbEngineType
|
AllEngineTypes = GdbEngineType
|
||||||
| ScriptEngineType
|
| ScriptEngineType
|
||||||
| CdbEngineType
|
| CdbEngineType
|
||||||
};
|
};
|
||||||
|
|
||||||
QDebug operator<<(QDebug d, DebuggerState state);
|
QDebug operator<<(QDebug d, DebuggerState state);
|
||||||
@@ -280,7 +280,7 @@ private:
|
|||||||
Internal::ThreadsHandler *threadsHandler() const;
|
Internal::ThreadsHandler *threadsHandler() const;
|
||||||
Internal::WatchHandler *watchHandler() const;
|
Internal::WatchHandler *watchHandler() const;
|
||||||
Internal::SourceFilesWindow *sourceFileWindow() const;
|
Internal::SourceFilesWindow *sourceFileWindow() const;
|
||||||
QWidget *threadsWindow() const;
|
QWidget *threadsWindow() const;
|
||||||
|
|
||||||
Internal::DebuggerManagerActions debuggerManagerActions() const;
|
Internal::DebuggerManagerActions debuggerManagerActions() const;
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
void bringPaneToForeground() { emit showPage(); }
|
void bringPaneToForeground() { emit showPage(); }
|
||||||
void setCursor(const QCursor &cursor);
|
void setCursor(const QCursor &cursor);
|
||||||
|
|
||||||
QString combinedContents() const;
|
QString combinedContents() const;
|
||||||
QString inputContents() const;
|
QString inputContents() const;
|
||||||
|
|
||||||
|
@@ -348,16 +348,16 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
|||||||
m_ui.checkBoxUseMessageBoxForSignals);
|
m_ui.checkBoxUseMessageBoxForSignals);
|
||||||
m_group.insert(theDebuggerAction(SkipKnownFrames),
|
m_group.insert(theDebuggerAction(SkipKnownFrames),
|
||||||
m_ui.checkBoxSkipKnownFrames);
|
m_ui.checkBoxSkipKnownFrames);
|
||||||
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
|
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
|
||||||
m_ui.checkBoxUseToolTipsInMainEditor);
|
m_ui.checkBoxUseToolTipsInMainEditor);
|
||||||
m_group.insert(theDebuggerAction(AutoDerefPointers), 0);
|
m_group.insert(theDebuggerAction(AutoDerefPointers), 0);
|
||||||
m_group.insert(theDebuggerAction(UseToolTipsInLocalsView), 0);
|
m_group.insert(theDebuggerAction(UseToolTipsInLocalsView), 0);
|
||||||
m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0);
|
m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0);
|
||||||
m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0);
|
m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0);
|
||||||
m_group.insert(theDebuggerAction(UseAddressInStackView), 0);
|
m_group.insert(theDebuggerAction(UseAddressInStackView), 0);
|
||||||
m_group.insert(theDebuggerAction(EnableReverseDebugging),
|
m_group.insert(theDebuggerAction(EnableReverseDebugging),
|
||||||
m_ui.checkBoxEnableReverseDebugging);
|
m_ui.checkBoxEnableReverseDebugging);
|
||||||
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
||||||
m_ui.spinBoxMaximalStackDepth);
|
m_ui.spinBoxMaximalStackDepth);
|
||||||
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
|
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
|
||||||
m_group.insert(theDebuggerAction(LogTimeStamps), 0);
|
m_group.insert(theDebuggerAction(LogTimeStamps), 0);
|
||||||
|
@@ -125,7 +125,7 @@ int ToolTipWidget::computeHeight(const QModelIndex &index) const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_SLOT void ToolTipWidget::computeSize()
|
Q_SLOT void ToolTipWidget::computeSize()
|
||||||
{
|
{
|
||||||
int columns = 0;
|
int columns = 0;
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
@@ -92,7 +92,7 @@ signals:
|
|||||||
|
|
||||||
// The adapter is still running just fine, but it failed to acquire a debuggee.
|
// The adapter is still running just fine, but it failed to acquire a debuggee.
|
||||||
void inferiorStartFailed(const QString &msg);
|
void inferiorStartFailed(const QString &msg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DebuggerState state() const
|
DebuggerState state() const
|
||||||
{ return m_engine->state(); }
|
{ return m_engine->state(); }
|
||||||
|
@@ -213,7 +213,7 @@ void GdbEngine::connectDebuggingHelperActions()
|
|||||||
connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
|
connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
|
||||||
this, SLOT(recheckDebuggingHelperAvailability()));
|
this, SLOT(recheckDebuggingHelperAvailability()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::disconnectDebuggingHelperActions()
|
void GdbEngine::disconnectDebuggingHelperActions()
|
||||||
{
|
{
|
||||||
disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0);
|
disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0);
|
||||||
@@ -412,8 +412,8 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
|||||||
while (from != to) {
|
while (from != to) {
|
||||||
GdbMi data;
|
GdbMi data;
|
||||||
if (*from != ',') {
|
if (*from != ',') {
|
||||||
// happens on archer where we get
|
// happens on archer where we get
|
||||||
// 23^running <NL> *running,thread-id="all" <NL> (gdb)
|
// 23^running <NL> *running,thread-id="all" <NL> (gdb)
|
||||||
result.m_type = GdbMi::Tuple;
|
result.m_type = GdbMi::Tuple;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -448,22 +448,22 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
|||||||
showStatusMessage(tr("Library %1 unloaded.").arg(_(id)));
|
showStatusMessage(tr("Library %1 unloaded.").arg(_(id)));
|
||||||
invalidateSourcesList();
|
invalidateSourcesList();
|
||||||
} else if (asyncClass == "thread-group-created") {
|
} else if (asyncClass == "thread-group-created") {
|
||||||
// Archer has "{id="28902"}"
|
// Archer has "{id="28902"}"
|
||||||
QByteArray id = result.findChild("id").data();
|
QByteArray id = result.findChild("id").data();
|
||||||
showStatusMessage(tr("Thread group %1 created.").arg(_(id)));
|
showStatusMessage(tr("Thread group %1 created.").arg(_(id)));
|
||||||
int pid = id.toInt();
|
int pid = id.toInt();
|
||||||
if (pid != inferiorPid())
|
if (pid != inferiorPid())
|
||||||
handleInferiorPidChanged(pid);
|
handleInferiorPidChanged(pid);
|
||||||
} else if (asyncClass == "thread-created") {
|
} else if (asyncClass == "thread-created") {
|
||||||
//"{id="1",group-id="28902"}"
|
//"{id="1",group-id="28902"}"
|
||||||
QByteArray id = result.findChild("id").data();
|
QByteArray id = result.findChild("id").data();
|
||||||
showStatusMessage(tr("Thread %1 created.").arg(_(id)));
|
showStatusMessage(tr("Thread %1 created.").arg(_(id)));
|
||||||
} else if (asyncClass == "thread-group-exited") {
|
} else if (asyncClass == "thread-group-exited") {
|
||||||
// Archer has "{id="28902"}"
|
// Archer has "{id="28902"}"
|
||||||
QByteArray id = result.findChild("id").data();
|
QByteArray id = result.findChild("id").data();
|
||||||
showStatusMessage(tr("Thread group %1 exited.").arg(_(id)));
|
showStatusMessage(tr("Thread group %1 exited.").arg(_(id)));
|
||||||
} else if (asyncClass == "thread-exited") {
|
} else if (asyncClass == "thread-exited") {
|
||||||
//"{id="1",group-id="28902"}"
|
//"{id="1",group-id="28902"}"
|
||||||
QByteArray id = result.findChild("id").data();
|
QByteArray id = result.findChild("id").data();
|
||||||
QByteArray groupid = result.findChild("group-id").data();
|
QByteArray groupid = result.findChild("group-id").data();
|
||||||
showStatusMessage(tr("Thread %1 in group %2 exited.")
|
showStatusMessage(tr("Thread %1 in group %2 exited.")
|
||||||
@@ -471,7 +471,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
|||||||
} else if (asyncClass == "thread-selected") {
|
} else if (asyncClass == "thread-selected") {
|
||||||
QByteArray id = result.findChild("id").data();
|
QByteArray id = result.findChild("id").data();
|
||||||
showStatusMessage(tr("Thread %1 selected.").arg(_(id)));
|
showStatusMessage(tr("Thread %1 selected.").arg(_(id)));
|
||||||
//"{id="2"}"
|
//"{id="2"}"
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
} else if (asyncClass == "shlibs-updated") {
|
} else if (asyncClass == "shlibs-updated") {
|
||||||
// MAC announces updated libs
|
// MAC announces updated libs
|
||||||
@@ -615,7 +615,7 @@ void GdbEngine::readGdbStandardError()
|
|||||||
|
|
||||||
void GdbEngine::readGdbStandardOutput()
|
void GdbEngine::readGdbStandardOutput()
|
||||||
{
|
{
|
||||||
if (m_commandTimer->isActive())
|
if (m_commandTimer->isActive())
|
||||||
m_commandTimer->start(); // Retrigger
|
m_commandTimer->start(); // Retrigger
|
||||||
|
|
||||||
int newstart = 0;
|
int newstart = 0;
|
||||||
@@ -682,7 +682,7 @@ void GdbEngine::maybeHandleInferiorPidChanged(const QString &pid0)
|
|||||||
}
|
}
|
||||||
if (pid == inferiorPid())
|
if (pid == inferiorPid())
|
||||||
return;
|
return;
|
||||||
debugMessage(_("FOUND PID %1").arg(pid));
|
debugMessage(_("FOUND PID %1").arg(pid));
|
||||||
|
|
||||||
handleInferiorPidChanged(pid);
|
handleInferiorPidChanged(pid);
|
||||||
if (m_dumperInjectionLoad)
|
if (m_dumperInjectionLoad)
|
||||||
@@ -841,7 +841,7 @@ void GdbEngine::commandTimeout()
|
|||||||
"the operation.\nYou can choose between waiting "
|
"the operation.\nYou can choose between waiting "
|
||||||
"longer or abort debugging.").arg(timeOut / 1000);
|
"longer or abort debugging.").arg(timeOut / 1000);
|
||||||
QMessageBox *mb = showMessageBox(QMessageBox::Critical,
|
QMessageBox *mb = showMessageBox(QMessageBox::Critical,
|
||||||
tr("Gdb not responding"), msg,
|
tr("Gdb not responding"), msg,
|
||||||
QMessageBox::Ok | QMessageBox::Cancel);
|
QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time"));
|
mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time"));
|
||||||
mb->button(QMessageBox::Ok)->setText(tr("Stop debugging"));
|
mb->button(QMessageBox::Ok)->setText(tr("Stop debugging"));
|
||||||
@@ -885,7 +885,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
|
|||||||
tr("Executable failed"), QString::fromLocal8Bit(msg));
|
tr("Executable failed"), QString::fromLocal8Bit(msg));
|
||||||
showStatusMessage(tr("Process failed to start."));
|
showStatusMessage(tr("Process failed to start."));
|
||||||
shutdown();
|
shutdown();
|
||||||
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
|
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
|
||||||
// Handle a case known to appear on gdb 6.4 symbianelf when
|
// Handle a case known to appear on gdb 6.4 symbianelf when
|
||||||
// the stack is cut due to access to protected memory.
|
// the stack is cut due to access to protected memory.
|
||||||
debugMessage(_("APPLYING WORKAROUND #2"));
|
debugMessage(_("APPLYING WORKAROUND #2"));
|
||||||
@@ -1011,7 +1011,7 @@ void GdbEngine::updateAll()
|
|||||||
if (supportsThreads())
|
if (supportsThreads())
|
||||||
postCommand(_("-thread-list-ids"), WatchUpdate, CB(handleStackListThreads), 0);
|
postCommand(_("-thread-list-ids"), WatchUpdate, CB(handleStackListThreads), 0);
|
||||||
manager()->reloadRegisters();
|
manager()->reloadRegisters();
|
||||||
updateLocals();
|
updateLocals();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleQuerySources(const GdbResponse &response)
|
void GdbEngine::handleQuerySources(const GdbResponse &response)
|
||||||
@@ -1576,7 +1576,7 @@ void GdbEngine::detachDebugger()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, /**/);
|
QTC_ASSERT(state() == InferiorStopped, /**/);
|
||||||
QTC_ASSERT(startMode() != AttachCore, /**/);
|
QTC_ASSERT(startMode() != AttachCore, /**/);
|
||||||
postCommand(_("detach"));
|
postCommand(_("detach"));
|
||||||
setState(InferiorShuttingDown);
|
setState(InferiorShuttingDown);
|
||||||
setState(InferiorShutDown);
|
setState(InferiorShutDown);
|
||||||
shutdown();
|
shutdown();
|
||||||
@@ -1642,7 +1642,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &s
|
|||||||
void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
|
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
|
||||||
// This should be set by the constructor or in exitDebugger()
|
// This should be set by the constructor or in exitDebugger()
|
||||||
// via initializeVariables()
|
// via initializeVariables()
|
||||||
//QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized,
|
//QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized,
|
||||||
// initializeVariables());
|
// initializeVariables());
|
||||||
@@ -1947,7 +1947,7 @@ void GdbEngine::sendInsertBreakpoint(int index)
|
|||||||
|
|
||||||
void GdbEngine::reloadBreakListInternal()
|
void GdbEngine::reloadBreakListInternal()
|
||||||
{
|
{
|
||||||
m_breakListUpdating = true;
|
m_breakListUpdating = true;
|
||||||
postCommand(_("-break-list"), NeedsStop, CB(handleBreakList));
|
postCommand(_("-break-list"), NeedsStop, CB(handleBreakList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2416,7 +2416,7 @@ void GdbEngine::handleStackSelectThread(const GdbResponse &)
|
|||||||
showStatusMessage(tr("Retrieving data for stack view..."), 3000);
|
showStatusMessage(tr("Retrieving data for stack view..."), 3000);
|
||||||
manager()->reloadRegisters();
|
manager()->reloadRegisters();
|
||||||
reloadStack(true);
|
reloadStack(true);
|
||||||
updateLocals();
|
updateLocals();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::reloadFullStack()
|
void GdbEngine::reloadFullStack()
|
||||||
@@ -2512,7 +2512,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
|
|||||||
targetFrame = i;
|
targetFrame = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool canExpand = !cookie.isFull
|
bool canExpand = !cookie.isFull
|
||||||
&& (n >= theDebuggerAction(MaximalStackDepth)->value().toInt());
|
&& (n >= theDebuggerAction(MaximalStackDepth)->value().toInt());
|
||||||
theDebuggerAction(ExpandStack)->setEnabled(canExpand);
|
theDebuggerAction(ExpandStack)->setEnabled(canExpand);
|
||||||
manager()->stackHandler()->setFrames(stackFrames, canExpand);
|
manager()->stackHandler()->setFrames(stackFrames, canExpand);
|
||||||
@@ -2538,7 +2538,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
|
|||||||
// For targetFrame == 0 we already issued a 'gotoLocation'
|
// For targetFrame == 0 we already issued a 'gotoLocation'
|
||||||
// when reading the *stopped message.
|
// when reading the *stopped message.
|
||||||
bool jump = (m_isMacGdb || targetFrame != 0);
|
bool jump = (m_isMacGdb || targetFrame != 0);
|
||||||
|
|
||||||
manager()->stackHandler()->setCurrentIndex(targetFrame);
|
manager()->stackHandler()->setCurrentIndex(targetFrame);
|
||||||
if (jump || cookie.gotoLocation) {
|
if (jump || cookie.gotoLocation) {
|
||||||
const StackFrame &frame = manager()->stackHandler()->currentFrame();
|
const StackFrame &frame = manager()->stackHandler()->currentFrame();
|
||||||
@@ -2956,7 +2956,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
|
|||||||
data.setValue(_("<unavailable>"));
|
data.setValue(_("<unavailable>"));
|
||||||
data.setHasChildren(false);
|
data.setHasChildren(false);
|
||||||
insertData(data);
|
insertData(data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_processedNames.insert(processedName);
|
m_processedNames.insert(processedName);
|
||||||
|
|
||||||
@@ -3053,7 +3053,7 @@ void GdbEngine::updateSubItem(const WatchData &data0)
|
|||||||
#if DEBUG_SUBITEM
|
#if DEBUG_SUBITEM
|
||||||
qDebug() << "IT'S A POINTER";
|
qDebug() << "IT'S A POINTER";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (theDebuggerBoolSetting(AutoDerefPointers)) {
|
if (theDebuggerBoolSetting(AutoDerefPointers)) {
|
||||||
// Try automatic dereferentiation
|
// Try automatic dereferentiation
|
||||||
data.exp = _("(*(") + data.exp + _("))");
|
data.exp = _("(*(") + data.exp + _("))");
|
||||||
@@ -3196,7 +3196,7 @@ void GdbEngine::updateWatchData(const WatchData &data)
|
|||||||
data1.setValue(_("<unavailable>"));
|
data1.setValue(_("<unavailable>"));
|
||||||
data1.setHasChildren(false);
|
data1.setHasChildren(false);
|
||||||
insertData(data1);
|
insertData(data1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_processedNames.insert(processedName);
|
m_processedNames.insert(processedName);
|
||||||
|
|
||||||
@@ -3640,7 +3640,7 @@ void GdbEngine::handleStackFrame(const GdbResponse &response)
|
|||||||
}
|
}
|
||||||
GdbMi all("[" + out + "]");
|
GdbMi all("[" + out + "]");
|
||||||
//GdbMi all(out);
|
//GdbMi all(out);
|
||||||
|
|
||||||
//qDebug() << "\n\n\nALL: " << all.toString() << "\n";
|
//qDebug() << "\n\n\nALL: " << all.toString() << "\n";
|
||||||
GdbMi locals = all.findChild("locals");
|
GdbMi locals = all.findChild("locals");
|
||||||
//qDebug() << "\n\n\nLOCALS: " << locals.toString() << "\n";
|
//qDebug() << "\n\n\nLOCALS: " << locals.toString() << "\n";
|
||||||
@@ -3770,10 +3770,10 @@ WatchData GdbEngine::localVariable(const GdbMi &item,
|
|||||||
data.setError(WatchData::msgNotInScope());
|
data.setError(WatchData::msgNotInScope());
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
//: Type of local variable or parameter shadowed by another
|
//: Type of local variable or parameter shadowed by another
|
||||||
//: variable of the same name in a nested block.
|
//: variable of the same name in a nested block.
|
||||||
setWatchDataValue(data, item.findChild("value"));
|
setWatchDataValue(data, item.findChild("value"));
|
||||||
data.setType(GdbEngine::tr("<shadowed>"));
|
data.setType(GdbEngine::tr("<shadowed>"));
|
||||||
data.setHasChildren(false);
|
data.setHasChildren(false);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -4030,7 +4030,7 @@ void GdbEngine::tryLoadDebuggingHelpers()
|
|||||||
// Load at least gdb macro based dumpers.
|
// Load at least gdb macro based dumpers.
|
||||||
QFile file(_(":/gdb/gdbmacros.txt"));
|
QFile file(_(":/gdb/gdbmacros.txt"));
|
||||||
file.open(QIODevice::ReadOnly);
|
file.open(QIODevice::ReadOnly);
|
||||||
QByteArray contents = file.readAll();
|
QByteArray contents = file.readAll();
|
||||||
m_debuggingHelperState = DebuggingHelperLoadTried;
|
m_debuggingHelperState = DebuggingHelperLoadTried;
|
||||||
postCommand(_(contents));
|
postCommand(_(contents));
|
||||||
return;
|
return;
|
||||||
@@ -4206,7 +4206,7 @@ void GdbEngine::fetchDisassemblerByAddress(DisassemblerViewAgent *agent,
|
|||||||
QString end = QString::number(address + 100, 16);
|
QString end = QString::number(address + 100, 16);
|
||||||
// -data-disassemble [ -s start-addr -e end-addr ]
|
// -data-disassemble [ -s start-addr -e end-addr ]
|
||||||
// | [ -f filename -l linenum [ -n lines ] ] -- mode
|
// | [ -f filename -l linenum [ -n lines ] ] -- mode
|
||||||
if (useMixedMode)
|
if (useMixedMode)
|
||||||
postCommand(_("-data-disassemble -s 0x%1 -e 0x%2 -- 1").arg(start).arg(end),
|
postCommand(_("-data-disassemble -s 0x%1 -e 0x%2 -- 1").arg(start).arg(end),
|
||||||
Discardable, CB(handleFetchDisassemblerByAddress1),
|
Discardable, CB(handleFetchDisassemblerByAddress1),
|
||||||
QVariant::fromValue(DisassemblerAgentCookie(agent)));
|
QVariant::fromValue(DisassemblerAgentCookie(agent)));
|
||||||
@@ -4266,7 +4266,7 @@ QString GdbEngine::parseDisassembler(const GdbMi &lines)
|
|||||||
if (line >= 0 && line < fileContents.size())
|
if (line >= 0 && line < fileContents.size())
|
||||||
ba += " " + fileContents.at(line) + '\n';
|
ba += " " + fileContents.at(line) + '\n';
|
||||||
GdbMi insn = child.findChild("line_asm_insn");
|
GdbMi insn = child.findChild("line_asm_insn");
|
||||||
foreach (const GdbMi &line, insn.children())
|
foreach (const GdbMi &line, insn.children())
|
||||||
ba += parseLine(line);
|
ba += parseLine(line);
|
||||||
} else {
|
} else {
|
||||||
// the non-mixed version
|
// the non-mixed version
|
||||||
@@ -4468,7 +4468,7 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_gdbAdapter->dumperHandling() == AbstractGdbAdapter::DumperLoadedByGdbPreload
|
if (m_gdbAdapter->dumperHandling() == AbstractGdbAdapter::DumperLoadedByGdbPreload
|
||||||
&& checkDebuggingHelpers()) {
|
&& checkDebuggingHelpers()) {
|
||||||
QString cmd = _("set environment ");
|
QString cmd = _("set environment ");
|
||||||
cmd += _(Debugger::Constants::Internal::LD_PRELOAD_ENV_VAR);
|
cmd += _(Debugger::Constants::Internal::LD_PRELOAD_ENV_VAR);
|
||||||
cmd += _c(' ');
|
cmd += _c(' ');
|
||||||
|
@@ -306,7 +306,7 @@ QByteArray GdbMi::toString(bool multiline, int indent) const
|
|||||||
else
|
else
|
||||||
result += "Invalid";
|
result += "Invalid";
|
||||||
break;
|
break;
|
||||||
case Const:
|
case Const:
|
||||||
if (!m_name.isEmpty())
|
if (!m_name.isEmpty())
|
||||||
result += m_name + "=";
|
result += m_name + "=";
|
||||||
result += "\"" + escapeCString(m_data) + "\"";
|
result += "\"" + escapeCString(m_data) + "\"";
|
||||||
|
@@ -39,50 +39,50 @@ namespace Internal {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
output ==>
|
output ==>
|
||||||
( out-of-band-record )* [ result-record ] "(gdb)" nl
|
( out-of-band-record )* [ result-record ] "(gdb)" nl
|
||||||
result-record ==>
|
result-record ==>
|
||||||
[ token ] "^" result-class ( "," result )* nl
|
[ token ] "^" result-class ( "," result )* nl
|
||||||
out-of-band-record ==>
|
out-of-band-record ==>
|
||||||
async-record | stream-record
|
async-record | stream-record
|
||||||
async-record ==>
|
async-record ==>
|
||||||
exec-async-output | status-async-output | notify-async-output
|
exec-async-output | status-async-output | notify-async-output
|
||||||
exec-async-output ==>
|
exec-async-output ==>
|
||||||
[ token ] "*" async-output
|
[ token ] "*" async-output
|
||||||
status-async-output ==>
|
status-async-output ==>
|
||||||
[ token ] "+" async-output
|
[ token ] "+" async-output
|
||||||
notify-async-output ==>
|
notify-async-output ==>
|
||||||
[ token ] "=" async-output
|
[ token ] "=" async-output
|
||||||
async-output ==>
|
async-output ==>
|
||||||
async-class ( "," result )* nl
|
async-class ( "," result )* nl
|
||||||
result-class ==>
|
result-class ==>
|
||||||
"done" | "running" | "connected" | "error" | "exit"
|
"done" | "running" | "connected" | "error" | "exit"
|
||||||
async-class ==>
|
async-class ==>
|
||||||
"stopped" | others (where others will be added depending on the needs--this is still in development).
|
"stopped" | others (where others will be added depending on the needs--this is still in development).
|
||||||
result ==>
|
result ==>
|
||||||
variable "=" value
|
variable "=" value
|
||||||
variable ==>
|
variable ==>
|
||||||
string
|
string
|
||||||
value ==>
|
value ==>
|
||||||
const | tuple | list
|
const | tuple | list
|
||||||
const ==>
|
const ==>
|
||||||
c-string
|
c-string
|
||||||
tuple ==>
|
tuple ==>
|
||||||
"{}" | "{" result ( "," result )* "}"
|
"{}" | "{" result ( "," result )* "}"
|
||||||
list ==>
|
list ==>
|
||||||
"[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
|
"[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
|
||||||
stream-record ==>
|
stream-record ==>
|
||||||
console-stream-output | target-stream-output | log-stream-output
|
console-stream-output | target-stream-output | log-stream-output
|
||||||
console-stream-output ==>
|
console-stream-output ==>
|
||||||
"~" c-string
|
"~" c-string
|
||||||
target-stream-output ==>
|
target-stream-output ==>
|
||||||
"@" c-string
|
"@" c-string
|
||||||
log-stream-output ==>
|
log-stream-output ==>
|
||||||
"&" c-string
|
"&" c-string
|
||||||
nl ==>
|
nl ==>
|
||||||
CR | CR-LF
|
CR | CR-LF
|
||||||
token ==>
|
token ==>
|
||||||
any sequence of digits.
|
any sequence of digits.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ public:
|
|||||||
inline const QList<GdbMi> &children() const { return m_children; }
|
inline const QList<GdbMi> &children() const { return m_children; }
|
||||||
inline int childCount() const { return m_children.size(); }
|
inline int childCount() const { return m_children.size(); }
|
||||||
|
|
||||||
const GdbMi &childAt(int index) const { return m_children[index]; }
|
const GdbMi &childAt(int index) const { return m_children[index]; }
|
||||||
GdbMi &childAt(int index) { return m_children[index]; }
|
GdbMi &childAt(int index) { return m_children[index]; }
|
||||||
GdbMi findChild(const char *name) const;
|
GdbMi findChild(const char *name) const;
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
|
|
||||||
enum GdbResultClass
|
enum GdbResultClass
|
||||||
{
|
{
|
||||||
// "done" | "running" | "connected" | "error" | "exit"
|
// "done" | "running" | "connected" | "error" | "exit"
|
||||||
GdbResultUnknown,
|
GdbResultUnknown,
|
||||||
GdbResultDone,
|
GdbResultDone,
|
||||||
GdbResultRunning,
|
GdbResultRunning,
|
||||||
|
@@ -79,9 +79,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
|
|||||||
m_ui.scriptFileChooser);
|
m_ui.scriptFileChooser);
|
||||||
m_group.insert(theDebuggerAction(GdbEnvironment),
|
m_group.insert(theDebuggerAction(GdbEnvironment),
|
||||||
m_ui.environmentEdit);
|
m_ui.environmentEdit);
|
||||||
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
||||||
m_ui.checkBoxUsePreciseBreakpoints);
|
m_ui.checkBoxUsePreciseBreakpoints);
|
||||||
m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
|
m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
|
||||||
m_ui.spinBoxGdbWatchdogTimeout);
|
m_ui.spinBoxGdbWatchdogTimeout);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ namespace Internal {
|
|||||||
* Provides a static convenience to prompt for both connection types. */
|
* Provides a static convenience to prompt for both connection types. */
|
||||||
|
|
||||||
class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter
|
class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static trk::PromptStartCommunicationResult
|
static trk::PromptStartCommunicationResult
|
||||||
startCommunication(const TrkDevicePtr &trkDevice,
|
startCommunication(const TrkDevicePtr &trkDevice,
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
QWidget *msgBoxParent,
|
QWidget *msgBoxParent,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual trk::BluetoothListener *createListener();
|
virtual trk::BluetoothListener *createListener();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -155,7 +155,7 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(range.size() == uint(ba.size()),
|
QTC_ASSERT(range.size() == uint(ba.size()),
|
||||||
qDebug() << "RANGE: " << range << " BA SIZE: " << ba.size(); return);
|
qDebug() << "RANGE: " << range << " BA SIZE: " << ba.size(); return);
|
||||||
|
|
||||||
MEMORY_DEBUG("INSERT: " << range);
|
MEMORY_DEBUG("INSERT: " << range);
|
||||||
// Try to combine with existing chunk.
|
// Try to combine with existing chunk.
|
||||||
Snapshot::Memory::iterator it = memory.begin();
|
Snapshot::Memory::iterator it = memory.begin();
|
||||||
@@ -660,7 +660,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
|
|||||||
// Kill inferior process
|
// Kill inferior process
|
||||||
logMessage(msgGdbPacket(QLatin1String("kill")));
|
logMessage(msgGdbPacket(QLatin1String("kill")));
|
||||||
sendTrkMessage(0x41, TrkCB(handleDeleteProcess),
|
sendTrkMessage(0x41, TrkCB(handleDeleteProcess),
|
||||||
trkDeleteProcessMessage(), "Delete process");
|
trkDeleteProcessMessage(), "Delete process");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (cmd.startsWith("m")) {
|
else if (cmd.startsWith("m")) {
|
||||||
@@ -924,7 +924,7 @@ i */
|
|||||||
if (data.startsWith("auxv:read::")) {
|
if (data.startsWith("auxv:read::")) {
|
||||||
const int offsetPos = data.lastIndexOf(':') + 1;
|
const int offsetPos = data.lastIndexOf(':') + 1;
|
||||||
const int commaPos = data.lastIndexOf(',');
|
const int commaPos = data.lastIndexOf(',');
|
||||||
if (commaPos != -1) {
|
if (commaPos != -1) {
|
||||||
bool ok1 = false, ok2 = false;
|
bool ok1 = false, ok2 = false;
|
||||||
const int offset = data.mid(offsetPos, commaPos - offsetPos)
|
const int offset = data.mid(offsetPos, commaPos - offsetPos)
|
||||||
.toUInt(&ok1, 16);
|
.toUInt(&ok1, 16);
|
||||||
@@ -1176,7 +1176,7 @@ void TrkGdbAdapter::handleReadRegisters(const TrkResult &result)
|
|||||||
const char *data = result.data.data() + 1; // Skip ok byte
|
const char *data = result.data.data() + 1; // Skip ok byte
|
||||||
for (int i = 0; i < RegisterCount; ++i)
|
for (int i = 0; i < RegisterCount; ++i)
|
||||||
m_snapshot.registers[i] = extractInt(data + 4 * i);
|
m_snapshot.registers[i] = extractInt(data + 4 * i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrkGdbAdapter::handleWriteRegister(const TrkResult &result)
|
void TrkGdbAdapter::handleWriteRegister(const TrkResult &result)
|
||||||
{
|
{
|
||||||
@@ -1187,7 +1187,7 @@ void TrkGdbAdapter::handleWriteRegister(const TrkResult &result)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendGdbServerMessage("OK");
|
sendGdbServerMessage("OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrkGdbAdapter::reportRegisters()
|
void TrkGdbAdapter::reportRegisters()
|
||||||
{
|
{
|
||||||
@@ -1312,7 +1312,7 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
|
|||||||
Snapshot::Memory::const_iterator et = m_snapshot.memory.end();
|
Snapshot::Memory::const_iterator et = m_snapshot.memory.end();
|
||||||
for ( ; it != et; ++it) {
|
for ( ; it != et; ++it) {
|
||||||
MEMORY_DEBUG(" NEEDED: " << needed);
|
MEMORY_DEBUG(" NEEDED: " << needed);
|
||||||
needed -= it.key();
|
needed -= it.key();
|
||||||
}
|
}
|
||||||
MEMORY_DEBUG("NEEDED: " << needed);
|
MEMORY_DEBUG("NEEDED: " << needed);
|
||||||
|
|
||||||
@@ -1475,7 +1475,7 @@ void TrkGdbAdapter::handleClearBreakpoint(const TrkResult &result)
|
|||||||
if (result.errorCode()) {
|
if (result.errorCode()) {
|
||||||
logMessage("ERROR: " + result.errorString());
|
logMessage("ERROR: " + result.errorString());
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
sendGdbServerMessage("OK");
|
sendGdbServerMessage("OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1568,7 +1568,7 @@ void TrkGdbAdapter::startAdapter()
|
|||||||
logMessage(QLatin1String("### Starting TrkGdbAdapter"));
|
logMessage(QLatin1String("### Starting TrkGdbAdapter"));
|
||||||
m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth);
|
m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth);
|
||||||
// Prompt the user to start communication
|
// Prompt the user to start communication
|
||||||
QString message;
|
QString message;
|
||||||
const trk::PromptStartCommunicationResult src =
|
const trk::PromptStartCommunicationResult src =
|
||||||
S60DebuggerBluetoothStarter::startCommunication(m_trkDevice,
|
S60DebuggerBluetoothStarter::startCommunication(m_trkDevice,
|
||||||
effectiveTrkDevice(),
|
effectiveTrkDevice(),
|
||||||
@@ -1752,16 +1752,16 @@ void TrkGdbAdapter::handleDirectWrite1(const TrkResult &response)
|
|||||||
appendByte(&ba, 0xe5);
|
appendByte(&ba, 0xe5);
|
||||||
#else
|
#else
|
||||||
// Thumb:
|
// Thumb:
|
||||||
// subs r0, #16
|
// subs r0, #16
|
||||||
appendByte(&ba, 0x08);
|
appendByte(&ba, 0x08);
|
||||||
appendByte(&ba, 0x3b);
|
appendByte(&ba, 0x3b);
|
||||||
// subs r0, #16
|
// subs r0, #16
|
||||||
appendByte(&ba, 0x08);
|
appendByte(&ba, 0x08);
|
||||||
appendByte(&ba, 0x3b);
|
appendByte(&ba, 0x3b);
|
||||||
//
|
//
|
||||||
appendByte(&ba, 0x08);
|
appendByte(&ba, 0x08);
|
||||||
appendByte(&ba, 0x3b);
|
appendByte(&ba, 0x3b);
|
||||||
// subs r0, #16
|
// subs r0, #16
|
||||||
appendByte(&ba, 0x08);
|
appendByte(&ba, 0x08);
|
||||||
appendByte(&ba, 0x3b);
|
appendByte(&ba, 0x3b);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -246,7 +246,7 @@ private:
|
|||||||
QByteArray trkWriteMemoryMessage(uint addr, const QByteArray &date);
|
QByteArray trkWriteMemoryMessage(uint addr, const QByteArray &date);
|
||||||
QByteArray trkBreakpointMessage(uint addr, uint len, bool armMode = true);
|
QByteArray trkBreakpointMessage(uint addr, uint len, bool armMode = true);
|
||||||
QByteArray trkStepRangeMessage(byte option);
|
QByteArray trkStepRangeMessage(byte option);
|
||||||
QByteArray trkDeleteProcessMessage();
|
QByteArray trkDeleteProcessMessage();
|
||||||
QByteArray trkInterruptMessage();
|
QByteArray trkInterruptMessage();
|
||||||
|
|
||||||
QSharedPointer<trk::TrkDevice> m_trkDevice;
|
QSharedPointer<trk::TrkDevice> m_trkDevice;
|
||||||
|
@@ -83,7 +83,7 @@ public:
|
|||||||
virtual void nextExec() = 0;
|
virtual void nextExec() = 0;
|
||||||
virtual void stepIExec() = 0;
|
virtual void stepIExec() = 0;
|
||||||
virtual void nextIExec() = 0;
|
virtual void nextIExec() = 0;
|
||||||
|
|
||||||
virtual void continueInferior() = 0;
|
virtual void continueInferior() = 0;
|
||||||
virtual void interruptInferior() = 0;
|
virtual void interruptInferior() = 0;
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ QVariant ModulesModel::headerData(int section,
|
|||||||
{
|
{
|
||||||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||||
static QString headers[] = {
|
static QString headers[] = {
|
||||||
tr("Module name") + " ",
|
tr("Module name") + " ",
|
||||||
tr("Symbols read") + " ",
|
tr("Symbols read") + " ",
|
||||||
tr("Start address") + " ",
|
tr("Start address") + " ",
|
||||||
tr("End address") + " "
|
tr("End address") + " "
|
||||||
@@ -115,7 +115,7 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (role == Qt::DisplayRole)
|
if (role == Qt::DisplayRole)
|
||||||
return module.symbolsRead ? "yes" : "no";
|
return module.symbolsRead ? "yes" : "no";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (role == Qt::DisplayRole)
|
if (role == Qt::DisplayRole)
|
||||||
|
@@ -175,7 +175,7 @@ void ModulesWindow::resizeColumnsToContents()
|
|||||||
void ModulesWindow::setAlwaysResizeColumnsToContents(bool on)
|
void ModulesWindow::setAlwaysResizeColumnsToContents(bool on)
|
||||||
{
|
{
|
||||||
m_alwaysResizeColumnsToContents = on;
|
m_alwaysResizeColumnsToContents = on;
|
||||||
QHeaderView::ResizeMode mode = on
|
QHeaderView::ResizeMode mode = on
|
||||||
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
||||||
header()->setResizeMode(0, mode);
|
header()->setResizeMode(0, mode);
|
||||||
header()->setResizeMode(1, mode);
|
header()->setResizeMode(1, mode);
|
||||||
@@ -189,7 +189,7 @@ void ModulesWindow::setModel(QAbstractItemModel *model)
|
|||||||
QTreeView::setModel(model);
|
QTreeView::setModel(model);
|
||||||
setAlwaysResizeColumnsToContents(true);
|
setAlwaysResizeColumnsToContents(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModulesWindow::showSymbols(const QString &name)
|
void ModulesWindow::showSymbols(const QString &name)
|
||||||
{
|
{
|
||||||
if (name.isEmpty())
|
if (name.isEmpty())
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
#endif // DO_TRACE
|
#endif // DO_TRACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class NameDemanglerPrivate
|
class NameDemanglerPrivate
|
||||||
{
|
{
|
||||||
@@ -138,7 +138,7 @@ private:
|
|||||||
QLatin1String(""))
|
QLatin1String(""))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString makeExpr(const QStringList &exprs) const
|
const QString makeExpr(const QStringList &exprs) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(exprs.size() == 2);
|
Q_ASSERT(exprs.size() == 2);
|
||||||
@@ -166,7 +166,7 @@ private:
|
|||||||
QLatin1String(""))
|
QLatin1String(""))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString makeExpr(const QStringList &exprs) const
|
const QString makeExpr(const QStringList &exprs) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(exprs.size() == 2);
|
Q_ASSERT(exprs.size() == 2);
|
||||||
@@ -182,7 +182,7 @@ private:
|
|||||||
QLatin1String(""))
|
QLatin1String(""))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const QString makeExpr(const QStringList &exprs) const
|
virtual const QString makeExpr(const QStringList &exprs) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(exprs.size() == 3);
|
Q_ASSERT(exprs.size() == 3);
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
bool demangle(const QString &mangledName);
|
bool demangle(const QString &mangledName);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A textual description of the error encountered, if there was one.
|
* A textual description of the error encountered, if there was one.
|
||||||
* Only valid if demangle() returned false.
|
* Only valid if demangle() returned false.
|
||||||
*/
|
*/
|
||||||
const QString &errorString() const;
|
const QString &errorString() const;
|
||||||
|
@@ -100,7 +100,7 @@ QVariant RegisterHandler::data(const QModelIndex &index, int role) const
|
|||||||
|
|
||||||
if (role == RegisterChangedRole)
|
if (role == RegisterChangedRole)
|
||||||
return reg.changed;
|
return reg.changed;
|
||||||
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ enum RegisterRole
|
|||||||
{
|
{
|
||||||
RegisterNumberBaseRole = Qt::UserRole, // Currently used number base
|
RegisterNumberBaseRole = Qt::UserRole, // Currently used number base
|
||||||
RegisterAddressRole, // Start value for opening memory view
|
RegisterAddressRole, // Start value for opening memory view
|
||||||
RegisterChangedRole // Used for painting changed values
|
RegisterChangedRole // Used for painting changed values
|
||||||
};
|
};
|
||||||
|
|
||||||
class Register
|
class Register
|
||||||
@@ -76,7 +76,7 @@ private:
|
|||||||
QVariant headerData(int section, Qt::Orientation orientation,
|
QVariant headerData(int section, Qt::Orientation orientation,
|
||||||
int role = Qt::DisplayRole) const;
|
int role = Qt::DisplayRole) const;
|
||||||
Qt::ItemFlags flags(const QModelIndex &idx) const;
|
Qt::ItemFlags flags(const QModelIndex &idx) const;
|
||||||
|
|
||||||
QList<Register> m_registers;
|
QList<Register> m_registers;
|
||||||
int m_base;
|
int m_base;
|
||||||
int m_strlen; // approximate width of an value in chars
|
int m_strlen; // approximate width of an value in chars
|
||||||
|
@@ -205,7 +205,7 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
menu.addAction(theDebuggerAction(SettingsDialog));
|
menu.addAction(theDebuggerAction(SettingsDialog));
|
||||||
|
|
||||||
QAction *act = menu.exec(ev->globalPos());
|
QAction *act = menu.exec(ev->globalPos());
|
||||||
|
|
||||||
if (act == actAdjust)
|
if (act == actAdjust)
|
||||||
resizeColumnsToContents();
|
resizeColumnsToContents();
|
||||||
else if (act == actAlwaysAdjust)
|
else if (act == actAlwaysAdjust)
|
||||||
|
@@ -4,6 +4,6 @@ HEADERS += \
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/scriptengine.cpp \
|
$$PWD/scriptengine.cpp \
|
||||||
|
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
||||||
RESOURCES +=
|
RESOURCES +=
|
||||||
|
@@ -104,7 +104,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void maybeBreakNow(bool byFunction);
|
void maybeBreakNow(bool byFunction);
|
||||||
|
|
||||||
ScriptEngine *q;
|
ScriptEngine *q;
|
||||||
};
|
};
|
||||||
|
|
||||||
ScriptAgent::ScriptAgent(ScriptEngine *debugger, QScriptEngine *script)
|
ScriptAgent::ScriptAgent(ScriptEngine *debugger, QScriptEngine *script)
|
||||||
@@ -204,7 +204,7 @@ void ScriptEngine::executeDebuggerCommand(const QString &command)
|
|||||||
|
|
||||||
void ScriptEngine::shutdown()
|
void ScriptEngine::shutdown()
|
||||||
{
|
{
|
||||||
exitDebugger();
|
exitDebugger();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::exitDebugger()
|
void ScriptEngine::exitDebugger()
|
||||||
@@ -573,7 +573,7 @@ void ScriptEngine::maybeBreakNow(bool byFunction)
|
|||||||
showStatusMessage(tr("Stopped."), 5000);
|
showStatusMessage(tr("Stopped."), 5000);
|
||||||
|
|
||||||
StackFrame frame;
|
StackFrame frame;
|
||||||
frame.file = fileName;
|
frame.file = fileName;
|
||||||
frame.line = lineNumber;
|
frame.line = lineNumber;
|
||||||
manager()->gotoLocation(frame, true);
|
manager()->gotoLocation(frame, true);
|
||||||
updateLocals();
|
updateLocals();
|
||||||
@@ -587,7 +587,7 @@ void ScriptEngine::updateLocals()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Build stack
|
// Build stack
|
||||||
//
|
//
|
||||||
QList<StackFrame> stackFrames;
|
QList<StackFrame> stackFrames;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (QScriptContext *c = context; c; c = c->parentContext(), ++i) {
|
for (QScriptContext *c = context; c; c = c->parentContext(), ++i) {
|
||||||
@@ -599,7 +599,7 @@ void ScriptEngine::updateLocals()
|
|||||||
frame.from = QString::number(info.functionStartLineNumber());
|
frame.from = QString::number(info.functionStartLineNumber());
|
||||||
frame.to = QString::number(info.functionEndLineNumber());
|
frame.to = QString::number(info.functionEndLineNumber());
|
||||||
frame.line = info.lineNumber();
|
frame.line = info.lineNumber();
|
||||||
|
|
||||||
if (frame.function.isEmpty())
|
if (frame.function.isEmpty())
|
||||||
frame.function = "<global scope>";
|
frame.function = "<global scope>";
|
||||||
//frame.address = ...;
|
//frame.address = ...;
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
@@ -37,7 +37,7 @@ namespace Internal {
|
|||||||
|
|
||||||
void dumpBacktrace(int maxdepth = -1);
|
void dumpBacktrace(int maxdepth = -1);
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
#endif // DEBUGGER_BACKTRACE_H
|
#endif // DEBUGGER_BACKTRACE_H
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#ifdef USE_PSAPI
|
#ifdef USE_PSAPI
|
||||||
static inline QString imageName(DWORD processId)
|
static inline QString imageName(DWORD processId)
|
||||||
{
|
{
|
||||||
|
@@ -160,7 +160,7 @@ static bool getDebugDirectory(IMAGE_NT_HEADERS *ntHeaders,
|
|||||||
#endif
|
#endif
|
||||||
// Empty. This is the case for MinGW binaries
|
// Empty. This is the case for MinGW binaries
|
||||||
if (debugDirSize == 0)
|
if (debugDirSize == 0)
|
||||||
return true;
|
return true;
|
||||||
// Look up in file
|
// Look up in file
|
||||||
DWORD debugDirOffset;
|
DWORD debugDirOffset;
|
||||||
if (!getFileOffsetFromRVA(ntHeaders, debugDirRva, &debugDirOffset)) {
|
if (!getFileOffsetFromRVA(ntHeaders, debugDirRva, &debugDirOffset)) {
|
||||||
@@ -221,7 +221,7 @@ static void collectPDBfiles(void *fileMemory, IMAGE_DEBUG_DIRECTORY *directoryBa
|
|||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage)
|
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage)
|
||||||
{
|
{
|
||||||
HANDLE hFile = NULL;
|
HANDLE hFile = NULL;
|
||||||
|
@@ -45,7 +45,7 @@ namespace Internal {
|
|||||||
// Return a list of Program-Database (*.pdb) files a PE executable refers to. */
|
// Return a list of Program-Database (*.pdb) files a PE executable refers to. */
|
||||||
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage);
|
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage);
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
#endif // DEBUGGER_PEUTILS_H
|
#endif // DEBUGGER_PEUTILS_H
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
SOURCES += $$PWD/backtrace.cpp
|
SOURCES += $$PWD/backtrace.cpp
|
||||||
HEADERS += $$PWD/backtrace.h
|
HEADERS += $$PWD/backtrace.h
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
|
||||||
@@ -19,6 +19,6 @@ contains(QMAKE_CXX, cl) {
|
|||||||
# For the Privilege manipulation functions in sharedlibraryinjector.cpp.
|
# For the Privilege manipulation functions in sharedlibraryinjector.cpp.
|
||||||
# Not required for MinGW.
|
# Not required for MinGW.
|
||||||
LIBS += advapi32.lib
|
LIBS += advapi32.lib
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ QVariant SourceFilesModel::headerData(int section,
|
|||||||
{
|
{
|
||||||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||||
static QString headers[] = {
|
static QString headers[] = {
|
||||||
tr("Internal name") + " ",
|
tr("Internal name") + " ",
|
||||||
tr("Full name") + " ",
|
tr("Full name") + " ",
|
||||||
};
|
};
|
||||||
return headers[section];
|
return headers[section];
|
||||||
@@ -178,7 +178,7 @@ SourceFilesWindow::SourceFilesWindow(QWidget *parent)
|
|||||||
setRootIsDecorated(false);
|
setRootIsDecorated(false);
|
||||||
setIconSize(QSize(10, 10));
|
setIconSize(QSize(10, 10));
|
||||||
//header()->setDefaultAlignment(Qt::AlignLeft);
|
//header()->setDefaultAlignment(Qt::AlignLeft);
|
||||||
|
|
||||||
connect(this, SIGNAL(activated(QModelIndex)),
|
connect(this, SIGNAL(activated(QModelIndex)),
|
||||||
this, SLOT(sourceFileActivated(QModelIndex)));
|
this, SLOT(sourceFileActivated(QModelIndex)));
|
||||||
connect(act, SIGNAL(toggled(bool)),
|
connect(act, SIGNAL(toggled(bool)),
|
||||||
@@ -210,7 +210,7 @@ void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
act2 = new QAction(tr("Open file \"%1\"'").arg(name), &menu);
|
act2 = new QAction(tr("Open file \"%1\"'").arg(name), &menu);
|
||||||
act2->setEnabled(true);
|
act2->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.addAction(act1);
|
menu.addAction(act1);
|
||||||
menu.addAction(act2);
|
menu.addAction(act2);
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
@@ -235,5 +235,5 @@ void SourceFilesWindow::removeAll()
|
|||||||
m_model->setSourceFiles(QMap<QString, QString>());
|
m_model->setSourceFiles(QMap<QString, QString>());
|
||||||
header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "sourcefileswindow.moc"
|
#include "sourcefileswindow.moc"
|
||||||
|
@@ -43,7 +43,7 @@ namespace Debugger {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class SourceFilesModel;
|
class SourceFilesModel;
|
||||||
|
|
||||||
class SourceFilesWindow : public QTreeView
|
class SourceFilesWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -139,9 +139,9 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (index.row() == m_stackFrames.size()) {
|
if (index.row() == m_stackFrames.size()) {
|
||||||
if (role == Qt::DisplayRole && index.column() == 0)
|
if (role == Qt::DisplayRole && index.column() == 0)
|
||||||
return tr("...");
|
return tr("...");
|
||||||
if (role == Qt::DisplayRole && index.column() == 1)
|
if (role == Qt::DisplayRole && index.column() == 1)
|
||||||
return tr("<More>");
|
return tr("<More>");
|
||||||
if (role == Qt::DecorationRole && index.column() == 0)
|
if (role == Qt::DecorationRole && index.column() == 0)
|
||||||
return m_emptyIcon;
|
return m_emptyIcon;
|
||||||
@@ -209,7 +209,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
StackFrame StackHandler::currentFrame() const
|
StackFrame StackHandler::currentFrame() const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_currentIndex >= 0, return StackFrame());
|
QTC_ASSERT(m_currentIndex >= 0, return StackFrame());
|
||||||
QTC_ASSERT(m_currentIndex < m_stackFrames.size(), return StackFrame());
|
QTC_ASSERT(m_currentIndex < m_stackFrames.size(), return StackFrame());
|
||||||
return m_stackFrames.at(m_currentIndex);
|
return m_stackFrames.at(m_currentIndex);
|
||||||
|
@@ -93,7 +93,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
QModelIndex idx = indexAt(ev->pos());
|
QModelIndex idx = indexAt(ev->pos());
|
||||||
StackFrame frame = model()->data(idx, Qt::UserRole).value<StackFrame>();
|
StackFrame frame = model()->data(idx, Qt::UserRole).value<StackFrame>();
|
||||||
QString address = frame.address;
|
QString address = frame.address;
|
||||||
|
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
|
|
||||||
menu.addAction(theDebuggerAction(ExpandStack));
|
menu.addAction(theDebuggerAction(ExpandStack));
|
||||||
@@ -107,7 +107,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
actShowMemory->setEnabled(false);
|
actShowMemory->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
actShowMemory->setText(tr("Open memory editor at %1").arg(address));
|
actShowMemory->setText(tr("Open memory editor at %1").arg(address));
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *actShowDisassembler = menu.addAction(QString());
|
QAction *actShowDisassembler = menu.addAction(QString());
|
||||||
if (address.isEmpty()) {
|
if (address.isEmpty()) {
|
||||||
|
@@ -43,7 +43,7 @@ class DebuggerManager;
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class DisassemblerViewAgent;
|
class DisassemblerViewAgent;
|
||||||
|
|
||||||
class StackWindow : public QTreeView
|
class StackWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ThreadsWindow : public QTreeView
|
class ThreadsWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
#if DEBUG_MODEL
|
#if DEBUG_MODEL
|
||||||
# define MODEL_DEBUG(s) qDebug() << s
|
# define MODEL_DEBUG(s) qDebug() << s
|
||||||
#else
|
#else
|
||||||
# define MODEL_DEBUG(s)
|
# define MODEL_DEBUG(s)
|
||||||
#endif
|
#endif
|
||||||
#define MODEL_DEBUGX(s) qDebug() << s
|
#define MODEL_DEBUGX(s) qDebug() << s
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
// WatchData
|
// WatchData
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
WatchData::WatchData() :
|
WatchData::WatchData() :
|
||||||
hasChildren(false),
|
hasChildren(false),
|
||||||
generation(-1),
|
generation(-1),
|
||||||
@@ -173,7 +173,7 @@ void WatchData::setValue(const QString &value0)
|
|||||||
// column. No need to duplicate it here.
|
// column. No need to duplicate it here.
|
||||||
if (value.startsWith("(" + type + ") 0x"))
|
if (value.startsWith("(" + type + ") 0x"))
|
||||||
value = value.section(" ", -1, -1);
|
value = value.section(" ", -1, -1);
|
||||||
|
|
||||||
setValueUnneeded();
|
setValueUnneeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ QString niceType(const QString typeIn)
|
|||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
int start = type.indexOf("std::allocator<");
|
int start = type.indexOf("std::allocator<");
|
||||||
if (start == -1)
|
if (start == -1)
|
||||||
break;
|
break;
|
||||||
// search for matching '>'
|
// search for matching '>'
|
||||||
int pos;
|
int pos;
|
||||||
int level = 0;
|
int level = 0;
|
||||||
@@ -691,7 +691,7 @@ bool WatchModel::hasChildren(const QModelIndex &parent) const
|
|||||||
|
|
||||||
WatchItem *WatchModel::watchItem(const QModelIndex &idx) const
|
WatchItem *WatchModel::watchItem(const QModelIndex &idx) const
|
||||||
{
|
{
|
||||||
return idx.isValid()
|
return idx.isValid()
|
||||||
? static_cast<WatchItem*>(idx.internalPointer()) : m_root;
|
? static_cast<WatchItem*>(idx.internalPointer()) : m_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,7 +700,7 @@ QModelIndex WatchModel::watchIndex(const WatchItem *item) const
|
|||||||
return watchIndexHelper(item, m_root, QModelIndex());
|
return watchIndexHelper(item, m_root, QModelIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
||||||
const WatchItem *parentItem, const QModelIndex &parentIndex) const
|
const WatchItem *parentItem, const QModelIndex &parentIndex) const
|
||||||
{
|
{
|
||||||
if (needle == parentItem)
|
if (needle == parentItem)
|
||||||
@@ -715,7 +715,7 @@ QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
|||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
|
void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
|
||||||
{
|
{
|
||||||
QModelIndex idx1 = index(0, column, parentIndex);
|
QModelIndex idx1 = index(0, column, parentIndex);
|
||||||
QModelIndex idx2 = index(rowCount(parentIndex) - 1, column, parentIndex);
|
QModelIndex idx2 = index(rowCount(parentIndex) - 1, column, parentIndex);
|
||||||
@@ -785,7 +785,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
|||||||
case ActiveDataRole:
|
case ActiveDataRole:
|
||||||
qDebug() << "ASK FOR" << data.iname;
|
qDebug() << "ASK FOR" << data.iname;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case TypeFormatListRole:
|
case TypeFormatListRole:
|
||||||
if (isIntType(data.type))
|
if (isIntType(data.type))
|
||||||
return QStringList() << tr("decimal") << tr("hexadecimal")
|
return QStringList() << tr("decimal") << tr("hexadecimal")
|
||||||
@@ -807,7 +807,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@@ -825,7 +825,7 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro
|
|||||||
}
|
}
|
||||||
} else if (role == TypeFormatRole) {
|
} else if (role == TypeFormatRole) {
|
||||||
m_handler->setFormat(data.type, value.toInt());
|
m_handler->setFormat(data.type, value.toInt());
|
||||||
} else if (role == IndividualFormatRole) {
|
} else if (role == IndividualFormatRole) {
|
||||||
const int format = value.toInt();
|
const int format = value.toInt();
|
||||||
if (format == -1) {
|
if (format == -1) {
|
||||||
m_handler->m_individualFormats.remove(data.iname);
|
m_handler->m_individualFormats.remove(data.iname);
|
||||||
@@ -879,7 +879,7 @@ QVariant WatchModel::headerData(int section, Qt::Orientation orientation, int ro
|
|||||||
case 2: return QString(tr("Type") + QLatin1String(" "));
|
case 2: return QString(tr("Type") + QLatin1String(" "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct IName : public QString
|
struct IName : public QString
|
||||||
@@ -899,7 +899,7 @@ bool iNameLess(const QString &iname1, const QString &iname2)
|
|||||||
return i1 < i2;
|
return i1 < i2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name1 < name2;
|
return name1 < name2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator<(const IName &iname1, const IName &iname2)
|
bool operator<(const IName &iname1, const IName &iname2)
|
||||||
@@ -916,7 +916,7 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
|
|||||||
{
|
{
|
||||||
QList<WatchItem *>::const_iterator it =
|
QList<WatchItem *>::const_iterator it =
|
||||||
qLowerBound(list.begin(), list.end(), item, iNameSorter);
|
qLowerBound(list.begin(), list.end(), item, iNameSorter);
|
||||||
return it - list.begin();
|
return it - list.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WatchModel::insertData(const WatchData &data)
|
void WatchModel::insertData(const WatchData &data)
|
||||||
@@ -967,7 +967,7 @@ void WatchModel::insertData(const WatchData &data)
|
|||||||
void WatchModel::insertBulkData(const QList<WatchData> &list)
|
void WatchModel::insertBulkData(const QList<WatchData> &list)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
for (int i = 0; i != list.size(); ++i)
|
for (int i = 0; i != list.size(); ++i)
|
||||||
insertData(list.at(i));
|
insertData(list.at(i));
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
@@ -1436,7 +1436,7 @@ WatchModel *WatchHandler::model(WatchType type) const
|
|||||||
QTC_ASSERT(false, /**/);
|
QTC_ASSERT(false, /**/);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
WatchModel *WatchHandler::modelForIName(const QString &iname) const
|
WatchModel *WatchHandler::modelForIName(const QString &iname) const
|
||||||
{
|
{
|
||||||
if (iname.startsWith(QLatin1String("local")))
|
if (iname.startsWith(QLatin1String("local")))
|
||||||
|
@@ -114,7 +114,7 @@ public:
|
|||||||
bool isLocal() const { return iname.startsWith(QLatin1String("local.")); }
|
bool isLocal() const { return iname.startsWith(QLatin1String("local.")); }
|
||||||
bool isWatcher() const { return iname.startsWith(QLatin1String("watch.")); }
|
bool isWatcher() const { return iname.startsWith(QLatin1String("watch.")); }
|
||||||
bool isValid() const { return !iname.isEmpty(); }
|
bool isValid() const { return !iname.isEmpty(); }
|
||||||
|
|
||||||
bool isEqual(const WatchData &other) const;
|
bool isEqual(const WatchData &other) const;
|
||||||
|
|
||||||
static QString msgNotInScope();
|
static QString msgNotInScope();
|
||||||
@@ -171,7 +171,7 @@ enum IntegerFormat
|
|||||||
enum DumpableFormat
|
enum DumpableFormat
|
||||||
{
|
{
|
||||||
PrettyFormat = 0, // keep that at 0 as default
|
PrettyFormat = 0, // keep that at 0 as default
|
||||||
PlainFomat,
|
PlainFomat,
|
||||||
};
|
};
|
||||||
|
|
||||||
class WatchModel : public QAbstractItemModel
|
class WatchModel : public QAbstractItemModel
|
||||||
|
@@ -332,7 +332,7 @@ static void blockRecursion(const CPlusPlus::Overview &overview,
|
|||||||
it = seenHash->insert(name, 0);
|
it = seenHash->insert(name, 0);
|
||||||
} else {
|
} else {
|
||||||
++(it.value());
|
++(it.value());
|
||||||
}
|
}
|
||||||
// Is the declaration on or past the current line, that is,
|
// Is the declaration on or past the current line, that is,
|
||||||
// the variable not initialized.
|
// the variable not initialized.
|
||||||
if (symbol->line() >= line)
|
if (symbol->line() >= line)
|
||||||
@@ -1388,7 +1388,7 @@ static void gbdMiToWatchData(const GdbMi &root,
|
|||||||
{
|
{
|
||||||
if (debug > 1)
|
if (debug > 1)
|
||||||
qDebug() << Q_FUNC_INFO << '\n' << root.toString(false, 0);
|
qDebug() << Q_FUNC_INFO << '\n' << root.toString(false, 0);
|
||||||
WatchData w;
|
WatchData w;
|
||||||
QString v;
|
QString v;
|
||||||
// Check for name/iname and use as expression default
|
// Check for name/iname and use as expression default
|
||||||
if (ctx.recursionLevel == 0) {
|
if (ctx.recursionLevel == 0) {
|
||||||
@@ -1427,7 +1427,7 @@ static void gbdMiToWatchData(const GdbMi &root,
|
|||||||
w.exp = v;
|
w.exp = v;
|
||||||
gdbMiGetStringValue(&w.addr, root, "addr");
|
gdbMiGetStringValue(&w.addr, root, "addr");
|
||||||
gdbMiGetStringValue(&w.saddr, root, "saddr");
|
gdbMiGetStringValue(&w.saddr, root, "saddr");
|
||||||
gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled");
|
gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled");
|
||||||
gdbMiGetBoolValue(&w.valueEditable, root, "valueeditable");
|
gdbMiGetBoolValue(&w.valueEditable, root, "valueeditable");
|
||||||
if (gdbMiGetStringValue(&v, root, "valuetooltip", "valuetooltipencoded"))
|
if (gdbMiGetStringValue(&v, root, "valuetooltip", "valuetooltipencoded"))
|
||||||
w.setValue(v);
|
w.setValue(v);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user