forked from qt-creator/qt-creator
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 <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -208,6 +208,7 @@ public:
|
|||||||
LosesChild = DebuggerCommand::LosesChild,
|
LosesChild = DebuggerCommand::LosesChild,
|
||||||
RebuildBreakpointModel = DebuggerCommand::RebuildBreakpointModel,
|
RebuildBreakpointModel = DebuggerCommand::RebuildBreakpointModel,
|
||||||
InUpdateLocals = DebuggerCommand::InUpdateLocals,
|
InUpdateLocals = DebuggerCommand::InUpdateLocals,
|
||||||
|
NativeCommand = DebuggerCommand::NativeCommand,
|
||||||
Silent = DebuggerCommand::Silent
|
Silent = DebuggerCommand::Silent
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ public:
|
|||||||
LosesChild = 64,
|
LosesChild = 64,
|
||||||
// Trigger breakpoint model rebuild when no such commands are pending anymore.
|
// Trigger breakpoint model rebuild when no such commands are pending anymore.
|
||||||
RebuildBreakpointModel = 128,
|
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
|
// This is a command that needs to be wrapped into -interpreter-exec console
|
||||||
ConsoleCommand = 512,
|
ConsoleCommand = 512,
|
||||||
// This is the UpdateLocals commannd during which we ignore notifications
|
// This is the UpdateLocals commannd during which we ignore notifications
|
||||||
|
|||||||
@@ -939,7 +939,7 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
|
|||||||
++m_nonDiscardableCount;
|
++m_nonDiscardableCount;
|
||||||
|
|
||||||
bool isPythonCommand = true;
|
bool isPythonCommand = true;
|
||||||
if (cmd.function.contains('-') || cmd.function.contains(' '))
|
if ((cmd.flags & NativeCommand) || cmd.function.contains('-') || cmd.function.contains(' '))
|
||||||
isPythonCommand = false;
|
isPythonCommand = false;
|
||||||
if (isPythonCommand) {
|
if (isPythonCommand) {
|
||||||
cmd.arg("token", token);
|
cmd.arg("token", token);
|
||||||
@@ -4157,7 +4157,7 @@ void GdbEngine::resetInferior()
|
|||||||
foreach (QString command, commands.split('\n')) {
|
foreach (QString command, commands.split('\n')) {
|
||||||
command = command.trimmed();
|
command = command.trimmed();
|
||||||
if (!command.isEmpty())
|
if (!command.isEmpty())
|
||||||
runCommand({command, ConsoleCommand | NeedsTemporaryStop});
|
runCommand({command, ConsoleCommand | NeedsTemporaryStop | NativeCommand});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_rerunPending = true;
|
m_rerunPending = true;
|
||||||
@@ -4205,7 +4205,7 @@ void GdbEngine::handleInferiorPrepared()
|
|||||||
if (!rp.commandsAfterConnect.isEmpty()) {
|
if (!rp.commandsAfterConnect.isEmpty()) {
|
||||||
const QString commands = expand(rp.commandsAfterConnect);
|
const QString commands = expand(rp.commandsAfterConnect);
|
||||||
for (const QString &command : commands.split('\n'))
|
for (const QString &command : commands.split('\n'))
|
||||||
runCommand({command});
|
runCommand({command, NativeCommand});
|
||||||
}
|
}
|
||||||
|
|
||||||
//runCommand("set follow-exec-mode new");
|
//runCommand("set follow-exec-mode new");
|
||||||
|
|||||||
Reference in New Issue
Block a user