#endif
}
-static inline QString msgNoCdbBinaryForToolChain(const ProjectExplorer::Abi &tc)
+static inline QString msgNoCdbBinaryForToolChain(const Abi &tc)
{
return CdbEngine::tr("There is no CDB binary available for binaries in format '%1'").arg(tc.toString());
}
-static inline bool isMSVC_Flavor(ProjectExplorer::Abi::OSFlavor osf)
+static inline bool isMsvcFlavor(Abi::OSFlavor osf)
{
- return osf == ProjectExplorer::Abi::WindowsMsvc2005Flavor
- || osf == ProjectExplorer::Abi::WindowsMsvc2008Flavor
- || osf == ProjectExplorer::Abi::WindowsMsvc2010Flavor;
+ return osf == Abi::WindowsMsvc2005Flavor
+ || osf == Abi::WindowsMsvc2008Flavor
+ || osf == Abi::WindowsMsvc2010Flavor;
}
static QString cdbBinary(const DebuggerStartParameters &sp)
{
if (!sp.debuggerCommand.isEmpty()) {
// Do not use a GDB binary if we got started for a project with MinGW runtime.
- const bool abiMatch = sp.toolChainAbi.os() == ProjectExplorer::Abi::WindowsOS
- && isMSVC_Flavor(sp.toolChainAbi.osFlavor());
+ const bool abiMatch = sp.toolChainAbi.os() == Abi::WindowsOS
+ && isMsvcFlavor(sp.toolChainAbi.osFlavor());
if (abiMatch)
return sp.debuggerCommand;
}
return false;
}
- if (sp.startMode == AttachCore && !isMSVC_Flavor(sp.toolChainAbi.osFlavor())) {
+ if (sp.startMode == AttachCore && !isMsvcFlavor(sp.toolChainAbi.osFlavor())) {
check->errorDetails.push_back(CdbEngine::tr("The CDB debug engine cannot debug gdb core files."));
return false;
}
if (cdbBinary(sp).isEmpty()) {
check->errorDetails.push_back(msgNoCdbBinaryForToolChain(sp.toolChainAbi));
- check->settingsCategory = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
- check->settingsPage = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
+ check->settingsCategory = QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
+ check->settingsPage = QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
return false;
}
CdbEngine::CdbEngine(const DebuggerStartParameters &sp,
DebuggerEngine *masterEngine, const OptionsPtr &options) :
- DebuggerEngine(sp, masterEngine),
+ DebuggerEngine(sp, CppLanguage, masterEngine),
m_creatorExtPrefix("<qtcreatorcdbext>|"),
m_tokenPrefix("<token>"),
m_options(options),
const QString extensionFileName = extensionFi.fileName();
// Prepare arguments
QStringList arguments;
- const bool isRemote = sp.startMode == AttachToRemote;
+ const bool isRemote = sp.startMode == AttachToRemoteServer;
if (isRemote) { // Must be first
arguments << QLatin1String("-remote") << sp.remoteChannel;
} else {
nativeArguments.push_back(blank);
nativeArguments += QDir::toNativeSeparators(sp.executable);
break;
- case AttachToRemote:
+ case AttachToRemoteServer:
break;
case AttachExternal:
case AttachCrashedExternal:
{
if (debug)
qDebug("setupInferior");
+ // QmlCppEngine expects the QML engine to be connected before any breakpoints are hit
+ // (attemptBreakpointSynchronization() will be directly called then)
attemptBreakpointSynchronization();
-
if (startParameters().breakOnMain) {
const BreakpointParameters bp(BreakpointAtMain);
postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings,
if (startParameters().startMode == AttachExternal || startParameters().startMode == AttachCrashedExternal)
detachDebugger();
// Remote requires a bit more force to quit.
- if (m_effectiveStartMode == AttachToRemote) {
+ if (m_effectiveStartMode == AttachToRemoteServer) {
postCommand(m_extensionCommandPrefixBA + "shutdownex", 0);
postCommand("qq", 0);
} else {
bool CdbEngine::canInterruptInferior() const
{
- return m_effectiveStartMode != AttachToRemote && inferiorPid();
+ return m_effectiveStartMode != AttachToRemoteServer && inferiorPid();
}
void CdbEngine::interruptInferior()
}
}
-// Parse CDB gdbmi register syntax
-static inline Register parseRegister(const GdbMi &gdbmiReg)
+// Parse CDB gdbmi register syntax.
+static Register parseRegister(const GdbMi &gdbmiReg)
{
Register reg;
reg.name = gdbmiReg.findChild("name").data();
reg.name += description.data();
reg.name += ')';
}
- reg.value = QString::fromAscii(gdbmiReg.findChild("value").data());
+ reg.value = gdbmiReg.findChild("value").data();
return reg;
}
case BreakpointAtFork:
case WatchpointAtExpression:
case BreakpointAtSysCall:
+ case BreakpointOnQmlSignalHandler:
+ case BreakpointAtJavaScriptThrow:
return false;
case WatchpointAtAddress:
case BreakpointByFileAndLine:
}
switch (handler->state(id)) {
case BreakpointInsertRequested:
- if (parameters.type == BreakpointByFileAndLine) {
+ if (parameters.type == BreakpointByFileAndLine
+ && m_options->breakpointCorrection) {
if (lineCorrection.isNull())
lineCorrection.reset(new BreakpointCorrectionContext(debuggerCore()->cppCodeModelSnapshot(),
CPlusPlus::CppModelManagerInterface::instance()->workingCopy()));