Commit a17919fb authored by hjk's avatar hjk

Debugger: Allow explicitly marking of non-Python commands again

This conceptually reverts part of a61b6dfc.

Task-number: QTCREATORBUG-17594
Change-Id: I9ff72a027838a20039f217ed0d669b6c45bc2acf
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 4ecbebac
......@@ -208,6 +208,7 @@ public:
LosesChild = DebuggerCommand::LosesChild,
RebuildBreakpointModel = DebuggerCommand::RebuildBreakpointModel,
InUpdateLocals = DebuggerCommand::InUpdateLocals,
NativeCommand = DebuggerCommand::NativeCommand,
Silent = DebuggerCommand::Silent
};
......
......@@ -84,6 +84,8 @@ public:
LosesChild = 64,
// Trigger breakpoint model rebuild when no such commands are pending anymore.
RebuildBreakpointModel = 128,
// This is a native (non-Python) command that's handled directly by the backend.
NativeCommand = 256,
// This is a command that needs to be wrapped into -interpreter-exec console
ConsoleCommand = 512,
// This is the UpdateLocals commannd during which we ignore notifications
......
......@@ -939,7 +939,7 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
++m_nonDiscardableCount;
bool isPythonCommand = true;
if (cmd.function.contains('-') || cmd.function.contains(' '))
if ((cmd.flags & NativeCommand) || cmd.function.contains('-') || cmd.function.contains(' '))
isPythonCommand = false;
if (isPythonCommand) {
cmd.arg("token", token);
......@@ -4157,7 +4157,7 @@ void GdbEngine::resetInferior()
foreach (QString command, commands.split('\n')) {
command = command.trimmed();
if (!command.isEmpty())
runCommand({command, ConsoleCommand | NeedsTemporaryStop});
runCommand({command, ConsoleCommand | NeedsTemporaryStop | NativeCommand});
}
}
m_rerunPending = true;
......@@ -4205,7 +4205,7 @@ void GdbEngine::handleInferiorPrepared()
if (!rp.commandsAfterConnect.isEmpty()) {
const QString commands = expand(rp.commandsAfterConnect);
for (const QString &command : commands.split('\n'))
runCommand({command});
runCommand({command, NativeCommand});
}
//runCommand("set follow-exec-mode new");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment