From ba196dfad5065c913c814e9791d3855be6df8c0e Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 8 Jan 2015 16:30:59 +0100 Subject: TCF Debugger: Bug 456995 - C++ Method Breakpoints cannot be planted --- .../eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java index 82bd75942..e2847f51f 100644 --- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java +++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2015 Wind River Systems, Inc. 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 @@ -724,7 +724,13 @@ public class TCFBreakpointsModel { } else if (p.get(ATTR_FUNCTION) != null) { String expr = (String)p.get(ATTR_FUNCTION); - if (expr != null && expr.length() != 0) m.put(IBreakpoints.PROP_LOCATION, expr); + if (expr != null && expr.length() != 0) { + // Strip function parameters + int paren = expr.indexOf('('); + if (paren > 0) + expr = expr.substring(0, paren); + m.put(IBreakpoints.PROP_LOCATION, expr); + } if (capabilities != null) { Object obj = capabilities.get(IBreakpoints.CAPABILITY_SKIP_PROLOGUE); if (obj instanceof Boolean && ((Boolean)obj).booleanValue()) { -- cgit v1.2.3