forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3'
Conflicts: src/plugins/genericprojectmanager/genericproject.cpp src/plugins/genericprojectmanager/genericproject.h src/plugins/genericprojectmanager/genericprojectnodes.cpp src/plugins/genericprojectmanager/genericprojectnodes.h Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
This commit is contained in:
@@ -147,6 +147,11 @@ static bool isMostlyHarmlessMessage(const QStringRef &msg)
|
||||
"Invalid argument\\n";
|
||||
}
|
||||
|
||||
static QString mainFunction(const DebuggerRunParameters &rp)
|
||||
{
|
||||
return QLatin1String(rp.toolChainAbi.os() == Abi::WindowsOS && !rp.useTerminal ? "qMain" : "main");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Debuginfo Taskhandler
|
||||
@@ -1182,7 +1187,7 @@ void GdbEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages
|
||||
if (!(languages & CppLanguage))
|
||||
return;
|
||||
QTC_CHECK(acceptsDebuggerCommands());
|
||||
runCommand({command});
|
||||
runCommand({command, NativeCommand});
|
||||
}
|
||||
|
||||
// This is triggered when switching snapshots.
|
||||
@@ -2372,10 +2377,8 @@ QString GdbEngine::breakpointLocation(const BreakpointParameters &data)
|
||||
return QLatin1String("__cxa_throw");
|
||||
if (data.type == BreakpointAtCatch)
|
||||
return QLatin1String("__cxa_begin_catch");
|
||||
if (data.type == BreakpointAtMain) {
|
||||
const Abi abi = runParameters().toolChainAbi;
|
||||
return QLatin1String(abi.os() == Abi::WindowsOS ? "qMain" : "main");
|
||||
}
|
||||
if (data.type == BreakpointAtMain)
|
||||
return mainFunction(runParameters());
|
||||
if (data.type == BreakpointByFunction)
|
||||
return '"' + data.functionName + '"';
|
||||
if (data.type == BreakpointByAddress)
|
||||
@@ -4153,11 +4156,8 @@ void GdbEngine::handleInferiorPrepared()
|
||||
}
|
||||
|
||||
//runCommand("set follow-exec-mode new");
|
||||
if (rp.breakOnMain) {
|
||||
QString cmd = "tbreak ";
|
||||
cmd += QLatin1String(rp.toolChainAbi.os() == Abi::WindowsOS ? "qMain" : "main");
|
||||
runCommand({cmd});
|
||||
}
|
||||
if (rp.breakOnMain)
|
||||
runCommand({"tbreak " + mainFunction(rp)});
|
||||
|
||||
// Initial attempt to set breakpoints.
|
||||
if (rp.startMode != AttachCore) {
|
||||
|
||||
Reference in New Issue
Block a user