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:
Friedemann Kleint
2011-02-04 11:33:45 +01:00
parent 9c48cd3bf2
commit 59b2aac1c4
9 changed files with 346 additions and 211 deletions

View File

@@ -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 &parameters = 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,