Commit a12ef6b2 authored by Peifeng Yu's avatar Peifeng Yu
Browse files

Make debugger not confused when user command starts with digits

parent 8e25f4ee
......@@ -717,7 +717,13 @@ void MIDebugSession::jumpToMemoryAddress(const QString& address)
void MIDebugSession::addUserCommand(const QString& cmd)
{
queueCmd(new UserCommand(MI::NonMI, cmd));
if (!cmd.isEmpty() && cmd[0].isDigit()) {
// Add a space to the begining, so debugger won't get confused if the
// command starts with a number (won't mix it up with command token added)
queueCmd(new UserCommand(MI::NonMI, " " + cmd));
} else {
queueCmd(new UserCommand(MI::NonMI, cmd));
}
// User command can theoreticall modify absolutely everything,
// so need to force a reload.
......
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