forked from qt-creator/qt-creator
Debugger: Add 'command[s]' to breakpoints, polish BP dialogs.
Add commands (CDB, gdb with '\n' delimiter for multiple), rearrange dialogs, make ignore count a spin box.
This commit is contained in:
@@ -2453,7 +2453,9 @@ void GdbEngine::handleBreakIgnore(const GdbResponse &response)
|
||||
//else if (msg.contains(__("Will ignore next")))
|
||||
// response.ignoreCount = data->ignoreCount;
|
||||
// FIXME: this assumes it is doing the right thing...
|
||||
br.ignoreCount = handler->ignoreCount(id);
|
||||
const BreakpointParameters ¶meters = handler->breakpointData(id);
|
||||
br.ignoreCount = parameters.ignoreCount;
|
||||
br.command = parameters.command;
|
||||
handler->setResponse(id, br);
|
||||
changeBreakpoint(id); // Maybe there's more to do.
|
||||
}
|
||||
@@ -2645,6 +2647,19 @@ void GdbEngine::changeBreakpoint(BreakpointId id)
|
||||
CB(handleBreakThreadSpec), id);
|
||||
return;
|
||||
}
|
||||
if (data.command != response.command) {
|
||||
QByteArray breakCommand = "-break-commands " + bpnr;
|
||||
foreach (const QString &command, data.command.split(QLatin1String("\\n"))) {
|
||||
if (!command.isEmpty()) {
|
||||
breakCommand.append(" \"");
|
||||
breakCommand.append(command.toLatin1());
|
||||
breakCommand.append('"');
|
||||
}
|
||||
}
|
||||
postCommand(breakCommand, NeedsStop | RebuildBreakpointModel,
|
||||
CB(handleBreakIgnore), id);
|
||||
return;
|
||||
}
|
||||
if (!data.conditionsMatch(response.condition)) {
|
||||
postCommand("condition " + bpnr + ' ' + data.condition,
|
||||
NeedsStop | RebuildBreakpointModel,
|
||||
|
||||
Reference in New Issue
Block a user