Commit 5d0440a4 authored by hjk's avatar hjk

Debugger: Set conditions on breakpoints immediately

Modern versions of gdb support this and it avoids a nasty
endless loop when setting a condition on a breakpoint in
a non-existing file.

Change-Id: Id3a03a44c016f85617bb1e74a4843b1b398c490f
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent f8782696
......@@ -3146,7 +3146,7 @@ void GdbEngine::insertBreakpoint(BreakpointModelId id)
return;
}
QByteArray cmd = "xxx";
QByteArray cmd;
if (handler->isTracepoint(id)) {
cmd = "-break-insert -a -f ";
} else if (m_isMacGdb) {
......@@ -3167,8 +3167,10 @@ void GdbEngine::insertBreakpoint(BreakpointModelId id)
if (handler->isOneShot(id))
cmd += "-t ";
//if (!data->condition.isEmpty())
// cmd += "-c " + data->condition + ' ';
QByteArray condition = handler->condition(id);
if (!condition.isEmpty())
cmd += " -c \"" + condition + "\" ";
cmd += breakpointLocation(id);
postCommand(cmd, NeedsStop | RebuildBreakpointModel,
CB(handleBreakInsert1), vid);
......
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