forked from qt-creator/qt-creator
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: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user