Debugger: Escape quotes in GDB breakpoint conditions

Task-number: QTCREATORBUG-15821
Change-Id: I81faf3d31598538c04f843694b04f938bfb61a6e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2016-04-06 18:49:51 +02:00
parent 4a0b2039c0
commit bb516e49ae

View File

@@ -2773,7 +2773,7 @@ void GdbEngine::insertBreakpoint(Breakpoint bp)
QByteArray condition = bp.condition(); QByteArray condition = bp.condition();
if (!condition.isEmpty()) if (!condition.isEmpty())
cmd.function += " -c \"" + condition + "\" "; cmd.function += " -c \"" + condition.replace('"', "\\\"") + "\" ";
cmd.function += breakpointLocation(bp.parameters()); cmd.function += breakpointLocation(bp.parameters());
cmd.callback = [this, bp](const DebuggerResponse &r) { handleBreakInsert1(r, bp); }; cmd.callback = [this, bp](const DebuggerResponse &r) { handleBreakInsert1(r, bp); };