From 124ba056ee56b512318c49f6d966220980d260cc Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 23 Jul 2015 16:07:13 +0200 Subject: [PATCH] Follow-up on bug 439631 - escape also the path for function dynamic printf --- .../ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java index 6e24a6ff6e8..30dbb346f06 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 Ericsson and others. + * Copyright (c) 2014, 2015 Ericsson and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -81,12 +81,12 @@ public class ToggleDynamicPrintfAdapter extends AbstractToggleBreakpointAdapter // Although the user will be given the opportunity to provide the printf string // in the properties dialog, we pre-fill it with the default string to be nice - dprintf.setPrintfString(NLS.bind(Messages.Default_FunctionDynamicPrintf_String, sourceHandle, functionName)); + dprintf.setPrintfString(NLS.bind(Messages.Default_FunctionDynamicPrintf_String, escapeBackslashes(sourceHandle), functionName)); openBreakpointPropertiesDialog(dprintf, part, resource, attributes); } else { // We provide a default printf string to make the dynamic printf useful automatically - String printfStr = NLS.bind(Messages.Default_FunctionDynamicPrintf_String, sourceHandle, functionName); + String printfStr = NLS.bind(Messages.Default_FunctionDynamicPrintf_String, escapeBackslashes(sourceHandle), functionName); CDIDebugModel.createFunctionDynamicPrintf(sourceHandle, resource, getBreakpointType(), functionName, charStart, charEnd, lineNumber, true, 0, "", printfStr, true); //$NON-NLS-1$