mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 06:55:23 +02:00
2005-06-27 Alain Magloire
Fix PR 100069 * cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
This commit is contained in:
parent
e931e4a547
commit
0e98d98601
4 changed files with 19 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-06-27 Alain Magloire
|
||||
Fix PR 100069
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
|
||||
|
||||
2005-06-27 Alain Magloire
|
||||
Refactor the class extending CLICommand to CLIXXXX for more clarity.
|
||||
Pass the MIVersion in all of the class extending MICommand, this is
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
|||
|
||||
/**
|
||||
*/
|
||||
public class Location /*implements ICDIFunctionLocation, ICDIAddressLocation */{
|
||||
public abstract class Location {
|
||||
|
||||
BigInteger fAddress = null;
|
||||
String fFile = null;
|
||||
|
|
|
@ -43,7 +43,7 @@ public class Locator extends Location implements ICDILocator {
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean equalString(String f1, String f2) {
|
||||
public static boolean equalString(String f1, String f2) {
|
||||
if (f1 != null && f1.length() > 0 && f2 != null && f2.length() > 0) {
|
||||
return f1.equals(f2);
|
||||
} else if ((f1 == null || f1.length() == 0) && (f2 == null || f2.length() == 0)) {
|
||||
|
|
|
@ -143,10 +143,18 @@ public class StackFrame extends CObject implements ICDIStackFrame {
|
|||
public boolean equals(ICDIStackFrame stackframe) {
|
||||
if (stackframe instanceof StackFrame) {
|
||||
StackFrame stack = (StackFrame)stackframe;
|
||||
return cthread != null &&
|
||||
boolean equal = cthread != null &&
|
||||
cthread.equals(stack.getThread()) &&
|
||||
getLevel() == stack.getLevel() &&
|
||||
getLocator().equals(stack.getLocator());
|
||||
getLevel() == stack.getLevel();
|
||||
if (equal) {
|
||||
ICDILocator otherLocator = stack.getLocator();
|
||||
ICDILocator myLocator = getLocator();
|
||||
if (Locator.equalString(myLocator.getFile(), otherLocator.getFile())) {
|
||||
if (Locator.equalString(myLocator.getFunction(), otherLocator.getFunction())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.equals(stackframe);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue