1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Follow-up on bug 439631 - escape also the path for function dynamic printf

This commit is contained in:
Anton Leherbauer 2015-07-23 16:07:13 +02:00
parent a1cc0b1d07
commit 124ba056ee

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * 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 // 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 // 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); openBreakpointPropertiesDialog(dprintf, part, resource, attributes);
} else { } else {
// We provide a default printf string to make the dynamic printf useful automatically // 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, CDIDebugModel.createFunctionDynamicPrintf(sourceHandle, resource, getBreakpointType(), functionName, charStart,
charEnd, lineNumber, true, 0, "", printfStr, true); //$NON-NLS-1$ charEnd, lineNumber, true, 0, "", printfStr, true); //$NON-NLS-1$