diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java index d4424414120..d692662fe85 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java @@ -31,12 +31,13 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIFunctionBreakpoint; import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint; import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint; import org.eclipse.cdt.debug.mi.core.MIException; -import org.eclipse.cdt.debug.mi.core.MIFormat; import org.eclipse.cdt.debug.mi.core.MISession; import org.eclipse.cdt.debug.mi.core.cdi.model.AddressBreakpoint; +import org.eclipse.cdt.debug.mi.core.cdi.model.AddressLocation; import org.eclipse.cdt.debug.mi.core.cdi.model.Breakpoint; import org.eclipse.cdt.debug.mi.core.cdi.model.Exceptionpoint; import org.eclipse.cdt.debug.mi.core.cdi.model.FunctionBreakpoint; +import org.eclipse.cdt.debug.mi.core.cdi.model.FunctionLocation; import org.eclipse.cdt.debug.mi.core.cdi.model.LineBreakpoint; import org.eclipse.cdt.debug.mi.core.cdi.model.LocationBreakpoint; import org.eclipse.cdt.debug.mi.core.cdi.model.Target; @@ -392,10 +393,8 @@ public class BreakpointManager extends Manager { wpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]}); bList.add(wpoint); } else { - Location location = new Location (allMIBreakpoints[i].getFile(), - allMIBreakpoints[i].getFunction(), - allMIBreakpoints[i].getLine(), - MIFormat.getBigInteger(allMIBreakpoints[i].getAddress())); + LineLocation location = new LineLocation (allMIBreakpoints[i].getFile(), + allMIBreakpoints[i].getLine()); // By default new breakpoint are LineBreakpoint Breakpoint newBreakpoint = new LineBreakpoint(target, type, location, condition); newBreakpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]}); @@ -768,8 +767,8 @@ public class BreakpointManager extends Manager { synchronized(exceptionBps) { int id = EXCEPTION_THROW_IDX; if (exceptionBps[EXCEPTION_THROW_IDX] == null) { - Location location = new Location(null, EXCEPTION_FUNCS[id]); - LineBreakpoint bp = new LineBreakpoint(target, ICDIBreakpoint.REGULAR, location, null); + FunctionLocation location = new FunctionLocation(null, EXCEPTION_FUNCS[id]); + FunctionBreakpoint bp = new FunctionBreakpoint(target, ICDIBreakpoint.REGULAR, location, null); setLocationBreakpoint(bp); exceptionBps[id] = bp; miBreakpoints = bp.getMIBreakpoints(); @@ -780,8 +779,8 @@ public class BreakpointManager extends Manager { synchronized(exceptionBps) { int id = EXCEPTION_THROW_IDX; if (exceptionBps[id] == null) { - Location location = new Location(null, EXCEPTION_FUNCS[id]); - LineBreakpoint bp = new LineBreakpoint(target, ICDIBreakpoint.REGULAR, location, null); + FunctionLocation location = new FunctionLocation(null, EXCEPTION_FUNCS[id]); + FunctionBreakpoint bp = new FunctionBreakpoint(target, ICDIBreakpoint.REGULAR, location, null); setLocationBreakpoint(bp); exceptionBps[id] = bp; if (miBreakpoints != null) { @@ -813,16 +812,16 @@ public class BreakpointManager extends Manager { return new Condition(ignoreCount, expression, tids); } - public Location createLineLocation(String file, int line) { - return new Location(file, line); + public LineLocation createLineLocation(String file, int line) { + return new LineLocation(file, line); } - public Location createFunctionLocation(String file, String function) { - return new Location(file, function); + public FunctionLocation createFunctionLocation(String file, String function) { + return new FunctionLocation(file, function); } - public Location createAddressLocation(BigInteger address) { - return new Location(address); + public AddressLocation createAddressLocation(BigInteger address) { + return new AddressLocation(address); } MIBreakInsert[] createMIBreakInsert(LocationBreakpoint bkpt) throws CDIException { diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java new file mode 100644 index 00000000000..68a2d767347 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.debug.mi.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.ICDIFileLocation; + +public class FileLocation extends Location implements ICDIFileLocation { + + public FileLocation(String file) { + super(file); + } + +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java new file mode 100644 index 00000000000..12d5e7bf442 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.debug.mi.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.ICDILineLocation; + +public class LineLocation extends Location implements ICDILineLocation { + + public LineLocation(String file, int line) { + super(file, line); + } + +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java index f48af38dee1..44ff72dfbac 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java @@ -20,7 +20,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation; /** */ -public class Location implements ICDIFileLocation, ICDILineLocation, ICDIFunctionLocation, ICDIAddressLocation { +public class Location implements ICDIFunctionLocation, ICDIAddressLocation { BigInteger fAddress = null; String fFile = null; diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java new file mode 100644 index 00000000000..05ed7ad656b --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.debug.mi.core.cdi.model; + +import java.math.BigInteger; + +import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation; +import org.eclipse.cdt.debug.mi.core.cdi.Location; + +public class AddressLocation extends Location implements ICDIAddressLocation { + + public AddressLocation(BigInteger address) { + super(address); + // TODO Auto-generated constructor stub + } + +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java new file mode 100644 index 00000000000..a2163413cac --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.debug.mi.core.cdi.model; + + +import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation; +import org.eclipse.cdt.debug.mi.core.cdi.Location; + +public class FunctionLocation extends Location implements ICDIFunctionLocation { + + public FunctionLocation(String file, String function) { + super(file, function); + } +}