mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
2005-06-06 Alain Magloire
Fix PR 98182 * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/LocationBreakpoint.java
This commit is contained in:
parent
46bac7d344
commit
f67b7c0820
3 changed files with 33 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-06-06 Alain Magloire
|
||||||
|
Fix PR 98182
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/LocationBreakpoint.java
|
||||||
|
|
||||||
2005-05-25 Alain Magloire
|
2005-05-25 Alain Magloire
|
||||||
Fix PR 95705
|
Fix PR 95705
|
||||||
* mi/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java
|
* mi/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java
|
||||||
|
|
|
@ -31,6 +31,7 @@ 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.ICDILineBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
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.MISession;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.AddressBreakpoint;
|
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.AddressLocation;
|
||||||
|
@ -422,12 +423,32 @@ public class BreakpointManager extends Manager {
|
||||||
wpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]});
|
wpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]});
|
||||||
bList.add(wpoint);
|
bList.add(wpoint);
|
||||||
} else {
|
} else {
|
||||||
LineLocation location = new LineLocation (allMIBreakpoints[i].getFile(),
|
String function = allMIBreakpoints[i].getFunction();
|
||||||
allMIBreakpoints[i].getLine());
|
String file = allMIBreakpoints[i].getFile();
|
||||||
// By default new breakpoint are LineBreakpoint
|
int line = allMIBreakpoints[i].getLine();
|
||||||
Breakpoint newBreakpoint = new LineBreakpoint(target, type, location, condition);
|
String addr = allMIBreakpoints[i].getAddress();
|
||||||
newBreakpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]});
|
|
||||||
bList.add(newBreakpoint);
|
if (file != null && file.length() > 0 && line > 0) {
|
||||||
|
LineLocation location = createLineLocation (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]});
|
||||||
|
bList.add(newBreakpoint);
|
||||||
|
} else if (function != null && function.length() > 0) {
|
||||||
|
FunctionLocation location = createFunctionLocation(file, function);
|
||||||
|
// By default new breakpoint are LineBreakpoint
|
||||||
|
Breakpoint newBreakpoint = new FunctionBreakpoint(target, type, location, condition);
|
||||||
|
newBreakpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]});
|
||||||
|
bList.add(newBreakpoint);
|
||||||
|
} else if (addr != null && addr.length() > 0) {
|
||||||
|
BigInteger big = MIFormat.getBigInteger(addr);
|
||||||
|
AddressLocation location = createAddressLocation (big);
|
||||||
|
// By default new breakpoint are LineBreakpoint
|
||||||
|
Breakpoint newBreakpoint = new AddressBreakpoint(target, type, location, condition);
|
||||||
|
newBreakpoint.setMIBreakpoints(new MIBreakpoint[] {allMIBreakpoints[i]});
|
||||||
|
bList.add(newBreakpoint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
eventList.add(new MIBreakpointCreatedEvent(miSession, no));
|
eventList.add(new MIBreakpointCreatedEvent(miSession, no));
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ public abstract class LocationBreakpoint extends Breakpoint implements ICDIBreak
|
||||||
if (a != null) {
|
if (a != null) {
|
||||||
addr = MIFormat.getBigInteger(a);
|
addr = MIFormat.getBigInteger(a);
|
||||||
}
|
}
|
||||||
|
return addr;
|
||||||
} else if (fLocation instanceof ICDIAddressLocation) {
|
} else if (fLocation instanceof ICDIAddressLocation) {
|
||||||
return ((ICDIAddressLocation)fLocation).getAddress();
|
return ((ICDIAddressLocation)fLocation).getAddress();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue