Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0.9.1-beta
  • 0.9.2-rc1
  • 1.0.0
  • 1.1
  • 1.2
  • 1.2.90
  • 1.3
  • 1.3.0
  • 1.3.0-beta
  • 1.3.1
  • 2.0
  • 2.0.0
  • 2.0.0-beta
  • 2.0.1
  • 2.1
  • 2.1.0
  • 2.2
  • 2.3
  • 2.4
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4
  • 4.5
  • at-3.4
  • at-3.5
  • at-3.6
  • at-master
  • csa-3.3
  • csa-3.4
  • csa-3.5
  • csa-3.6
  • csa-master
  • master
  • qp-2.8
  • qp-3.0
  • qp-3.1
  • qp-3.2
  • qp-3.3
  • qp-3.4
  • qp-3.5
  • qp-3.6
  • qp-master
  • wip/boostbuildprojectmanager
  • wip/clang-query
  • wip/vcproj
  • at-v3.4.0
  • at-v3.4.0-beta1
  • at-v3.4.0-rc1
  • at-v3.4.1
  • at-v3.4.2
  • at-v3.5.0
  • at-v3.5.0-beta1
  • at-v3.5.0-rc1
  • at-v3.5.1
  • at-v3.6.0
  • at-v3.6.0-beta1
  • at-v3.6.0-rc1
  • csa-v3.3.0
  • csa-v3.3.0-beta1
  • csa-v3.3.0-rc1
  • csa-v3.3.1
  • csa-v3.3.2
  • csa-v3.4.0
  • csa-v3.4.0-beta1
  • csa-v3.4.0-rc1
  • csa-v3.4.1
  • csa-v3.4.2
  • csa-v3.5.0
  • csa-v3.5.0-beta1
  • csa-v3.5.0-rc1
  • csa-v3.5.1
  • csa-v3.6.0
  • csa-v3.6.0-beta1
  • csa-v3.6.0-rc1
  • qp-v3.1.0
  • qp-v3.1.0-beta1
  • qp-v3.2.0
  • qp-v3.2.0-beta1
  • qp-v3.2.1
  • qp-v3.2.2
  • qp-v3.3.0
  • qp-v3.3.0-beta1
  • qp-v3.3.0-rc1
  • qp-v3.3.1
  • qp-v3.3.2
  • qp-v3.4.0
  • qp-v3.4.0-rc1
  • qp-v3.4.1
  • qp-v3.4.2
  • qp-v3.5.0
  • qp-v3.5.0-beta1
  • qp-v3.5.0-rc1
  • qp-v3.5.1
  • qp-v3.6.0
  • qp-v3.6.0-beta1
  • qp-v3.6.0-rc1
  • tqtc/v2.6.0
  • tqtc/v2.6.0-rc
  • tqtc/v2.6.1
  • tqtc/v2.7.0
  • tqtc/v2.7.0-rc
  • tqtc/v2.7.2
  • tqtc/v2.8.0
  • tqtc/v2.8.0-beta
  • v1.0.0
  • v1.1.0
  • v1.1.0-rc1
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.90
  • v1.3.0
  • v1.3.0-beta
  • v1.3.0-rc1
  • v1.3.1
  • v2.0.0
  • v2.0.0-alpha
  • v2.0.0-beta
  • v2.0.0-rc1
  • v2.0.1
  • v2.1.0
  • v2.1.0-beta
  • v2.1.0-beta2
  • v2.1.0-rc1
  • v2.2.0
  • v2.2.0-beta
  • v2.2.0-rc1
  • v2.2.1
  • v2.3.0
  • v2.3.0-beta
  • v2.3.0-rc
  • v2.3.1
  • v2.4.0
  • v2.4.0-beta
  • v2.4.0-rc
  • v2.4.1
  • v2.5.0
  • v2.5.0-beta
  • v2.5.0-rc
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.0-beta
  • v2.6.0-rc
  • v2.6.1
158 results

Target

Select target project
  • tohunger/qt-creator
1 result
Select Git revision
  • 0.9.1-beta
  • 0.9.2-rc1
  • 1.0.0
  • 1.1
  • 1.2
  • 1.2.90
  • 1.3
  • 1.3.0
  • 1.3.0-beta
  • 1.3.1
  • 2.0
  • 2.0.0
  • 2.0.0-beta
  • 2.0.1
  • 2.1
  • 2.1.0
  • 2.2
  • 2.3
  • 2.4
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4
  • 4.5
  • at-3.4
  • at-3.5
  • at-3.6
  • at-master
  • csa-3.3
  • csa-3.4
  • csa-3.5
  • csa-3.6
  • csa-master
  • master
  • qp-2.8
  • qp-3.0
  • qp-3.1
  • qp-3.2
  • qp-3.3
  • qp-3.4
  • qp-3.5
  • qp-3.6
  • qp-master
  • wip/boostbuildprojectmanager
  • wip/clang-query
  • wip/vcproj
  • at-v3.4.0
  • at-v3.4.0-beta1
  • at-v3.4.0-rc1
  • at-v3.4.1
  • at-v3.4.2
  • at-v3.5.0
  • at-v3.5.0-beta1
  • at-v3.5.0-rc1
  • at-v3.5.1
  • at-v3.6.0
  • at-v3.6.0-beta1
  • at-v3.6.0-rc1
  • csa-v3.3.0
  • csa-v3.3.0-beta1
  • csa-v3.3.0-rc1
  • csa-v3.3.1
  • csa-v3.3.2
  • csa-v3.4.0
  • csa-v3.4.0-beta1
  • csa-v3.4.0-rc1
  • csa-v3.4.1
  • csa-v3.4.2
  • csa-v3.5.0
  • csa-v3.5.0-beta1
  • csa-v3.5.0-rc1
  • csa-v3.5.1
  • csa-v3.6.0
  • csa-v3.6.0-beta1
  • csa-v3.6.0-rc1
  • qp-v3.1.0
  • qp-v3.1.0-beta1
  • qp-v3.2.0
  • qp-v3.2.0-beta1
  • qp-v3.2.1
  • qp-v3.2.2
  • qp-v3.3.0
  • qp-v3.3.0-beta1
  • qp-v3.3.0-rc1
  • qp-v3.3.1
  • qp-v3.3.2
  • qp-v3.4.0
  • qp-v3.4.0-rc1
  • qp-v3.4.1
  • qp-v3.4.2
  • qp-v3.5.0
  • qp-v3.5.0-beta1
  • qp-v3.5.0-rc1
  • qp-v3.5.1
  • qp-v3.6.0
  • qp-v3.6.0-beta1
  • qp-v3.6.0-rc1
  • tqtc/v2.6.0
  • tqtc/v2.6.0-rc
  • tqtc/v2.6.1
  • tqtc/v2.7.0
  • tqtc/v2.7.0-rc
  • tqtc/v2.7.2
  • tqtc/v2.8.0
  • tqtc/v2.8.0-beta
  • v1.0.0
  • v1.1.0
  • v1.1.0-rc1
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.90
  • v1.3.0
  • v1.3.0-beta
  • v1.3.0-rc1
  • v1.3.1
  • v2.0.0
  • v2.0.0-alpha
  • v2.0.0-beta
  • v2.0.0-rc1
  • v2.0.1
  • v2.1.0
  • v2.1.0-beta
  • v2.1.0-beta2
  • v2.1.0-rc1
  • v2.2.0
  • v2.2.0-beta
  • v2.2.0-rc1
  • v2.2.1
  • v2.3.0
  • v2.3.0-beta
  • v2.3.0-rc
  • v2.3.1
  • v2.4.0
  • v2.4.0-beta
  • v2.4.0-rc
  • v2.4.1
  • v2.5.0
  • v2.5.0-beta
  • v2.5.0-rc
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.0-beta
  • v2.6.0-rc
  • v2.6.1
158 results
Show changes
Showing
with 183 additions and 83 deletions
......@@ -35,7 +35,7 @@ namespace Constants {
#define IDE_VERSION_MAJOR 1
#define IDE_VERSION_MINOR 2
#define IDE_VERSION_RELEASE 0
#define IDE_VERSION_RELEASE 1
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
......
<plugin name="CodePaster" version="1.2.0" compatVersion="1.2.0">
<plugin name="CodePaster" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.0"/>
<dependency name="ProjectExplorer" version="1.2.0"/>
<dependency name="Core" version="1.2.0"/>
<dependency name="TextEditor" version="1.2.1"/>
<dependency name="ProjectExplorer" version="1.2.1"/>
<dependency name="Core" version="1.2.1"/>
</dependencyList>
</plugin>
<plugin name="CppEditor" version="1.2.0" compatVersion="1.2.0">
<plugin name="CppEditor" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>C/C++ editor component.</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="Core" version="1.2.0"/>
<dependency name="TextEditor" version="1.2.0"/>
<dependency name="CppTools" version="1.2.0"/>
<dependency name="Core" version="1.2.1"/>
<dependency name="TextEditor" version="1.2.1"/>
<dependency name="CppTools" version="1.2.1"/>
</dependencyList>
</plugin>
<plugin name="CppTools" version="1.2.0" compatVersion="1.2.0">
<plugin name="CppTools" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Tools for analyzing C/C++ code.</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.0"/>
<dependency name="ProjectExplorer" version="1.2.0"/>
<dependency name="QuickOpen" version="1.2.0"/>
<dependency name="TextEditor" version="1.2.1"/>
<dependency name="ProjectExplorer" version="1.2.1"/>
<dependency name="QuickOpen" version="1.2.1"/>
</dependencyList>
</plugin>
......@@ -932,7 +932,7 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
namedTy = ty->asNamedType();
if (! namedTy) {
Function *fun = ty->asFunctionType();
if (fun && (fun->scope()->isBlockScope() || fun->scope()->isNamespaceScope()))
if (fun && fun->scope() && (fun->scope()->isBlockScope() || fun->scope()->isNamespaceScope()))
namedTy = fun->returnType()->asNamedType();
}
}
......
<plugin name="Debugger" version="1.2.0" compatVersion="1.2.0">
<plugin name="Debugger" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Debugger integration.</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="CppEditor" version="1.2.0"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="1.2.0"/>
<dependency name="Core" version="1.2.0"/>
<dependency name="Find" version="1.2.0"/>
<dependency name="CppEditor" version="1.2.1"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="1.2.1"/>
<dependency name="Core" version="1.2.1"/>
<dependency name="Find" version="1.2.1"/>
</dependencyList>
<argumentList>
<argument name="-disable-cdb">Disable Cdb debugger engine</argument>
......
......@@ -281,8 +281,12 @@ void BreakHandler::removeAt(int index)
void BreakHandler::clear()
{
for (int index = size(); --index >= 0; )
removeAt(index);
qDeleteAll(m_bp);
m_bp.clear();
m_enabled.clear();
m_disabled.clear();
m_removed.clear();
m_inserted.clear();
}
int BreakHandler::findBreakpoint(const BreakpointData &needle)
......@@ -328,19 +332,19 @@ void BreakHandler::saveBreakpoints()
const BreakpointData *data = at(index);
QMap<QString, QVariant> map;
if (!data->fileName.isEmpty())
map["filename"] = data->fileName;
map.insert(QLatin1String("filename"), data->fileName);
if (!data->lineNumber.isEmpty())
map["linenumber"] = data->lineNumber;
map.insert(QLatin1String("linenumber"), data->lineNumber);
if (!data->funcName.isEmpty())
map["funcname"] = data->funcName;
map.insert(QLatin1String("funcname"), data->funcName);
if (!data->condition.isEmpty())
map["condition"] = data->condition;
map.insert(QLatin1String("condition"), data->condition);
if (!data->ignoreCount.isEmpty())
map["ignorecount"] = data->ignoreCount;
map.insert(QLatin1String("ignorecount"), data->ignoreCount);
if (!data->enabled)
map["disabled"] = "1";
map.insert(QLatin1String("disabled"), QLatin1String("1"));
if (data->useFullPath)
map["usefullpath"] = "1";
map.insert(QLatin1String("usefullpath"), QLatin1String("1"));
list.append(map);
}
setSessionValueRequested("Breakpoints", list);
......@@ -351,18 +355,31 @@ void BreakHandler::loadBreakpoints()
QVariant value;
sessionValueRequested("Breakpoints", &value);
QList<QVariant> list = value.toList();
clear();
foreach (const QVariant &var, list) {
const QMap<QString, QVariant> map = var.toMap();
BreakpointData *data = new BreakpointData(this);
data->fileName = map["filename"].toString();
data->lineNumber = map["linenumber"].toString();
data->condition = map["condition"].toString();
data->ignoreCount = map["ignorecount"].toString();
data->funcName = map["funcname"].toString();
data->enabled = !map["disabled"].toInt();
data->useFullPath = bool(map["usefullpath"].toInt());
QVariant v = map.value(QLatin1String("filename"));
if (v.isValid())
data->fileName = v.toString();
v = map.value(QLatin1String("linenumber"));
if (v.isValid())
data->lineNumber = v.toString();
v = map.value(QLatin1String("condition"));
if (v.isValid())
data->condition = v.toString();
v = map.value(QLatin1String("ignorecount"));
if (v.isValid())
data->ignoreCount = v.toInt();
v = map.value(QLatin1String("funcname"));
if (v.isValid())
data->funcName = v.toString();
v = map.value(QLatin1String("disabled"));
if (v.isValid())
data->enabled = !v.toInt();
v = map.value(QLatin1String("usefullpath"));
if (v.isValid())
data->useFullPath = bool(v.toInt());
data->markerFileName = data->fileName;
data->markerLineNumber = data->lineNumber.toInt();
append(data);
......
......@@ -407,12 +407,19 @@ static bool setBreakPointEnabledById(CIDebugControl *ctl, unsigned long id, bool
return true;
}
static inline QString msgCannotSetBreakAtFunction(const QString &func, const QString &why)
{
return QString::fromLatin1("Cannot set a breakpoint at '%1': %2").arg(func, why);
}
// Synchronize (halted) engine breakpoints with those of the BreakHandler.
bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
CIDebugSymbols *syms,
BreakHandler *handler,
QString *errorMessage)
QString *errorMessage, QStringList *warnings)
{
errorMessage->clear();
warnings->clear();
// Do an initial check whether we are in a state that allows
// for modifying breakPoints
ULONG engineCount;
......@@ -420,25 +427,29 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
*errorMessage = QString::fromLatin1("Cannot modify breakpoints: %1").arg(*errorMessage);
return false;
}
QString warning;
// Insert new ones
bool updateMarkers = false;
foreach (BreakpointData *nbd, handler->insertedBreakpoints()) {
warning.clear();
// Function breakpoints: Are the module names specified?
bool breakPointOk = false;
if (nbd->funcName.isEmpty()) {
breakPointOk = true;
} else {
switch (resolveSymbol(syms, &nbd->funcName, errorMessage)) {
switch (resolveSymbol(syms, &nbd->funcName, &warning)) {
case ResolveSymbolOk:
breakPointOk = true;
break;
case ResolveSymbolAmbiguous:
qWarning("Warning: %s\n", qPrintable(*errorMessage));
warnings->push_back(msgCannotSetBreakAtFunction(nbd->funcName, warning));
warning.clear();
breakPointOk = true;
break;
case ResolveSymbolNotFound:
case ResolveSymbolError:
qWarning("Warning: %s\n", qPrintable(*errorMessage));
warnings->push_back(msgCannotSetBreakAtFunction(nbd->funcName, warning));
warning.clear();
break;
};
} // function breakpoint
......@@ -447,7 +458,7 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
quint64 address;
unsigned long id;
CDBBreakPoint ncdbbp(*nbd);
breakPointOk = ncdbbp.add(debugControl, &address, &id, errorMessage);
breakPointOk = ncdbbp.add(debugControl, &address, &id, &warning);
if (breakPointOk) {
if (debugBP)
qDebug() << "Added " << id << " at " << address << ncdbbp;
......@@ -464,22 +475,21 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
nbd->bpFuncName = nbd->funcName;
}
} // had symbol
if (!breakPointOk)
qWarning("%s\n", qPrintable(*errorMessage));
}
if (!breakPointOk && !warning.isEmpty())
warnings->push_back(warning); }
// Delete
foreach (BreakpointData *rbd, handler->takeRemovedBreakpoints()) {
if (!removeBreakPointById(debugControl, rbd->bpNumber.toUInt(), errorMessage))
qWarning("%s\n", qPrintable(*errorMessage));
if (!removeBreakPointById(debugControl, rbd->bpNumber.toUInt(), &warning))
warnings->push_back(warning);
delete rbd;
}
// Enable/Disable
foreach (BreakpointData *ebd, handler->takeEnabledBreakpoints())
if (!setBreakPointEnabledById(debugControl, ebd->bpNumber.toUInt(), true, errorMessage))
qWarning("%s\n", qPrintable(*errorMessage));
if (!setBreakPointEnabledById(debugControl, ebd->bpNumber.toUInt(), true, &warning))
warnings->push_back(warning);
foreach (BreakpointData *dbd, handler->takeDisabledBreakpoints())
if (!setBreakPointEnabledById(debugControl, dbd->bpNumber.toUInt(), false, errorMessage))
qWarning("%s\n", qPrintable(*errorMessage));
if (!setBreakPointEnabledById(debugControl, dbd->bpNumber.toUInt(), false, &warning))
warnings->push_back(warning);
if (updateMarkers)
handler->updateMarkers();
......
......@@ -73,7 +73,8 @@ struct CDBBreakPoint
static bool getBreakPoints(CIDebugControl* debugControl, QList<CDBBreakPoint> *bps, QString *errorMessage);
// Synchronize (halted) engine with BreakHandler.
static bool synchronizeBreakPoints(CIDebugControl* ctl, CIDebugSymbols *syms,
BreakHandler *bh, QString *errorMessage);
BreakHandler *bh,
QString *errorMessage, QStringList *warnings);
// Return a 'canonical' file (using '/' and capitalized drive letter)
static QString canonicalSourceFile(const QString &f);
......
......@@ -528,6 +528,10 @@ void CdbDebugEnginePrivate::clearDisplay()
bool CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
{
if (m_d->m_hDebuggeeProcess) {
warning(QLatin1String("Internal error: Attempt to start debugger while another process is being debugged."));
return false;
}
m_d->clearDisplay();
const DebuggerStartMode mode = m_d->m_debuggerManager->startMode();
......@@ -1268,6 +1272,8 @@ void CdbDebugEngine::selectThread(int index)
void CdbDebugEngine::attemptBreakpointSynchronization()
{
if (!m_d->m_hDebuggeeProcess) // Sometimes called from the breakpoint Window
return;
QString errorMessage;
if (!m_d->attemptBreakpointSynchronization(&errorMessage))
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
......@@ -1301,10 +1307,15 @@ bool CdbDebugEnginePrivate::attemptBreakpointSynchronization(QString *errorMessa
return true;
}
return CDBBreakPoint::synchronizeBreakPoints(m_cif.debugControl,
QStringList warnings;
const bool ok = CDBBreakPoint::synchronizeBreakPoints(m_cif.debugControl,
m_cif.debugSymbols,
m_debuggerManagerAccess->breakHandler(),
errorMessage);
errorMessage, &warnings);
if (const int warningsCount = warnings.size())
for (int w = 0; w < warningsCount; w++)
m_engine->warning(warnings.at(w));
return ok;
}
void CdbDebugEngine::reloadDisassembler()
......
......@@ -138,6 +138,7 @@ static ResolveSymbolResult resolveSymbol(CIDebugSymbols *syms, QString *symbol,
QStringList *matches,
QString *errorMessage)
{
errorMessage->clear();
// Is it an incomplete symbol?
if (symbol->contains(QLatin1Char('!')))
return ResolveSymbolOk;
......
......@@ -64,7 +64,10 @@ DebuggerSettings::~DebuggerSettings()
void DebuggerSettings::insertItem(int code, SavedAction *item)
{
QTC_ASSERT(!m_items.contains(code), qDebug() << code << item->toString(); return);
QTC_ASSERT(!m_items.contains(code),
qDebug() << code << item->toString(); return);
QTC_ASSERT(item->settingsKey().isEmpty() || item->defaultValue().isValid(),
qDebug() << "NO DEFAULT VALUE FOR " << item->settingsKey());
m_items[code] = item;
}
......@@ -90,9 +93,13 @@ QString DebuggerSettings::dump() const
{
QString out;
QTextStream ts(&out);
ts << "Debugger settings: ";
foreach (SavedAction *item, m_items)
ts << '\n' << item->value().toString();
ts << "Debugger settings: ";
foreach (SavedAction *item, m_items) {
QString key = item->settingsKey();
if (!key.isEmpty())
ts << '\n' << key << ": " << item->value().toString()
<< " (default: " << item->defaultValue().toString() << ")";
}
return out;
}
......@@ -171,18 +178,22 @@ DebuggerSettings *DebuggerSettings::instance()
instance->insertItem(UseDebuggingHelpers, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation"));
instance->insertItem(UseCustomDebuggingHelperLocation, item);
item->setSettingsKey(debugModeGroup, QLatin1String("UseCustomDebuggingHelperLocation"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(UseCustomDebuggingHelperLocation, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation"));
item->setCheckable(true);
item->setDefaultValue(QString());
instance->insertItem(CustomDebuggingHelperLocation, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("DebugDebuggingHelpers"));
item->setText(tr("Debug debugging helper"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(DebugDebuggingHelpers, item);
......@@ -210,6 +221,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatHexadecimal"));
item->setChecked(true);
item->setDefaultValue(false);
item->setData(FormatHexadecimal);
instance->insertItem(FormatHexadecimal, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -218,6 +230,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Decimal"));
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatDecimal"));
item->setDefaultValue(false);
item->setData(FormatDecimal);
instance->insertItem(FormatDecimal, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -226,6 +239,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Octal"));
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatOctal"));
item->setDefaultValue(false);
item->setData(FormatOctal);
instance->insertItem(FormatOctal, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -234,6 +248,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Binary"));
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatBinary"));
item->setDefaultValue(false);
item->setData(FormatBinary);
instance->insertItem(FormatBinary, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -242,6 +257,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Raw"));
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatRaw"));
item->setDefaultValue(false);
item->setData(FormatRaw);
instance->insertItem(FormatRaw, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -250,6 +266,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Natural"));
item->setCheckable(true);
item->setSettingsKey(debugModeGroup, QLatin1String("FormatNatural"));
item->setDefaultValue(true);
item->setData(FormatNatural);
instance->insertItem(FormatNatural, item);
instance->m_registerFormatGroup->addAction(item);
......@@ -264,40 +281,47 @@ DebuggerSettings *DebuggerSettings::instance()
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("Environment"));
item->setDefaultValue(QString());
instance->insertItem(GdbEnvironment, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("ScriptFile"));
item->setDefaultValue(QString());
instance->insertItem(GdbScriptFile, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("AutoQuit"));
item->setText(tr("Automatically quit debugger"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(AutoQuit, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
item->setText(tr("Use tooltips when debugging"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(UseToolTips, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("ListSourceFiles"));
item->setText(tr("List source files"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(ListSourceFiles, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames"));
item->setText(tr("Skip known frames"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(SkipKnownFrames, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("EnableReverseDebugging"));
item->setText(tr("Enable reverse debugging"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(EnableReverseDebugging, item);
item = new SavedAction(instance);
......@@ -307,14 +331,17 @@ DebuggerSettings *DebuggerSettings::instance()
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpoints"));
item->setDefaultValue(false);
instance->insertItem(SelectedPluginBreakpoints, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("NoPluginBreakpoints"));
item->setDefaultValue(false);
instance->insertItem(NoPluginBreakpoints, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpointsPattern"));
item->setDefaultValue(QString(".*"));
instance->insertItem(SelectedPluginBreakpointsPattern, item);
item = new SavedAction(instance);
......
......@@ -355,17 +355,19 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
this, SLOT(updateState()));
m_group.clear();
#ifdef QT_DEBUG
m_group.insert(theDebuggerAction(UseDebuggingHelpers),
m_ui.checkBoxUseDebuggingHelpers);
#endif
m_group.insert(theDebuggerAction(UseCustomDebuggingHelperLocation),
m_ui.checkBoxUseCustomDebuggingHelperLocation);
m_group.insert(theDebuggerAction(CustomDebuggingHelperLocation),
m_ui.dumperLocationChooser);
#ifdef QT_DEBUG
m_group.insert(theDebuggerAction(DebugDebuggingHelpers),
m_ui.checkBoxDebugDebuggingHelpers);
#else
m_ui.checkBoxDebugDebuggingHelpers->hide();
#endif
m_ui.dumperLocationChooser->
setEnabled(theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool());
......
......@@ -14,5 +14,13 @@ CONFIG += debug
QMAKE_CXXFLAGS *= -O2
}
true {
DEFINES += USE_QT_GUI=0
QT = core
} else {
DEFINES += USE_QT_GUI=1
QT = core gui
}
SOURCES += ../../../share/qtcreator/gdbmacros/gdbmacros.cpp
......@@ -113,13 +113,13 @@ static const QString tooltipIName = _("tooltip");
GdbEngine::GdbEngine(DebuggerManager *parent) :
#ifdef Q_OS_WIN // Do injection loading with MinGW (call loading does not work with 64bit)
m_dumperInjectionLoad(true)
m_dumperInjectionLoad(true),
#else
m_dumperInjectionLoad(false)
m_dumperInjectionLoad(false),
#endif
q(parent),
qq(parent->engineInterface())
{
q = parent;
qq = parent->engineInterface();
m_stubProc.setMode(Core::Utils::ConsoleProcess::Debug);
#ifdef Q_OS_UNIX
m_stubProc.setSettings(Core::ICore::instance()->settings());
......@@ -200,6 +200,26 @@ void GdbEngine::initializeVariables()
m_autoContinue = false;
m_waitingForFirstBreakpointToBeHit = false;
m_commandsToRunOnTemporaryBreak.clear();
m_cookieForToken.clear();
m_customOutputForToken.clear();
m_pendingConsoleStreamOutput.clear();
m_pendingTargetStreamOutput.clear();
m_pendingLogStreamOutput.clear();
m_inbuffer.clear();
m_address.clear();
m_currentFunctionArgs.clear();
m_currentFrame.clear();
m_dumperHelper = QtDumperHelper();
// FIXME: unhandled:
//m_outputCodecState = QTextCodec::ConverterState();
//OutputCollector m_outputCollector;
//QProcess m_gdbProc;
//QProcess m_uploadProc;
//Core::Utils::ConsoleProcess m_stubProc;
}
void GdbEngine::gdbProcError(QProcess::ProcessError error)
......@@ -2838,7 +2858,7 @@ static void setWatchDataSAddress(WatchData &data, const GdbMi &mi)
void GdbEngine::setUseDebuggingHelpers(const QVariant &on)
{
qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
//qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
// FIXME: a bit too harsh, but otherwise the treeview sometimes look funny
//m_expandedINames.clear();
setTokenBarrier();
......@@ -3188,7 +3208,8 @@ void GdbEngine::handleQueryDebuggingHelper(const GdbResultRecord &record, const
m_dumperHelper.parseQueryTypes(availableSimpleDebuggingHelpers, QtDumperHelper::GdbDebugger);
if (availableSimpleDebuggingHelpers.isEmpty()) {
m_debuggingHelperState = DebuggingHelperUnavailable;
if (!m_dumperInjectionLoad) // Retry if thread has not terminated yet.
m_debuggingHelperState = DebuggingHelperUnavailable;
q->showStatusMessage(tr("Debugging helpers not found."));
//QMessageBox::warning(q->mainWindow(),
// tr("Cannot find special data dumpers"),
......@@ -3523,7 +3544,8 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
void GdbEngine::updateLocals()
{
// Asynchronous load of injected library, initialize in first stop
if (m_dumperInjectionLoad && m_debuggingHelperState == DebuggingHelperLoadTried && m_dumperHelper.typeCount() == 0
if (m_dumperInjectionLoad && m_debuggingHelperState == DebuggingHelperLoadTried
&& m_dumperHelper.typeCount() == 0
&& q->inferiorPid() > 0)
tryQueryDebuggingHelpers();
......
......@@ -241,7 +241,6 @@ private:
QByteArray m_pendingConsoleStreamOutput;
QByteArray m_pendingTargetStreamOutput;
QByteArray m_pendingLogStreamOutput;
//QString m_pwd;
// contains the first token number for the current round
// of evaluation. Responses with older tokens are considers
......@@ -364,7 +363,6 @@ private:
bool startModeAllowsDumpers() const;
QString m_editedData;
int m_pendingRequests;
QtDumperHelper m_dumperHelper;
......@@ -380,8 +378,9 @@ private:
QList<GdbCommand> m_commandsToRunOnTemporaryBreak;
DebuggerManager *q;
IDebuggerManagerAccessForEngines *qq;
DebuggerManager * const q;
IDebuggerManagerAccessForEngines * const qq;
// make sure to re-initialize new members in initializeVariables();
};
} // namespace Internal
......
......@@ -376,6 +376,9 @@ QString decodeData(const QByteArray &ba, int encoding)
const QByteArray decodedBa = QByteArray::fromBase64(ba);
return QString::fromUtf16(reinterpret_cast<const ushort *>(decodedBa.data()), decodedBa.size() / 2);
}
case 5: { // base64 encoded 8 bit data, without quotes (see 1)
return quoteUnprintableLatin1(QByteArray::fromBase64(ba));
}
}
return QCoreApplication::translate("Debugger", "<Encoding error>");
}
......@@ -557,8 +560,9 @@ void QtDumperHelper::TypeData::clear()
}
// ----------------- QtDumperHelper
const QString stdAllocatorPrefix = QLatin1String("std::allocator");
QtDumperHelper::QtDumperHelper() :
m_stdAllocatorPrefix(QLatin1String("std::allocator")),
m_intSize(0),
m_pointerSize(0),
m_stdAllocatorSize(0),
......@@ -1053,7 +1057,7 @@ void QtDumperHelper::addSize(const QString &name, int size)
m_intSize = size;
break;
}
if (name.startsWith(m_stdAllocatorPrefix)) {
if (name.startsWith(stdAllocatorPrefix)) {
m_stdAllocatorSize = size;
break;
}
......@@ -1103,7 +1107,7 @@ QString QtDumperHelper::evaluationSizeofTypeExpression(const QString &typeName,
// Look up fixed types
if (m_pointerSize && isPointerType(typeName))
return QString::number(m_pointerSize);
if (m_stdAllocatorSize && typeName.startsWith(m_stdAllocatorPrefix))
if (m_stdAllocatorSize && typeName.startsWith(stdAllocatorPrefix))
return QString::number(m_stdAllocatorSize);
const SizeCache::const_iterator sit = m_sizeCache.constFind(typeName);
if (sit != m_sizeCache.constEnd())
......
......@@ -212,8 +212,6 @@ private:
static Type specialType(QString s);
QString evaluationSizeofTypeExpression(const QString &typeName, Debugger d) const;
const QString m_stdAllocatorPrefix;
NameTypeMap m_nameTypeMap;
SizeCache m_sizeCache;
int m_intSize;
......
<plugin name="Designer" version="1.2.0" compatVersion="1.2.0">
<plugin name="Designer" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Qt Designer integration.</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="Core" version="1.2.0"/>
<dependency name="Core" version="1.2.1"/>
<!-- For compiling with CPP support enabled -->
<dependency name="CppEditor" version="1.2.0"/>
<dependency name="CppEditor" version="1.2.1"/>
</dependencyList>
</plugin>
<plugin name="DuiEditor" version="1.2.0" compatVersion="1.2.0">
<plugin name="DuiEditor" version="1.2.1" compatVersion="1.2.1">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Editor for DUI.</description>
<url>http://www.qtsoftware.com</url>
<dependencyList>
<dependency name="Core" version="1.2.0"/>
<dependency name="TextEditor" version="1.2.0"/>
<dependency name="Core" version="1.2.1"/>
<dependency name="TextEditor" version="1.2.1"/>
</dependencyList>
</plugin>