mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added Paining of IP in editor, and finished optimizing stepping.
This commit is contained in:
parent
71db7fdfe2
commit
2adca3eb1d
2 changed files with 26 additions and 0 deletions
|
@ -33,6 +33,7 @@ public interface IStack extends IDataModelService {
|
||||||
* Stack frame information.
|
* Stack frame information.
|
||||||
*/
|
*/
|
||||||
public interface IFrameData extends IDataModelData {
|
public interface IFrameData extends IDataModelData {
|
||||||
|
int getLevel();
|
||||||
IAddress getAddress();
|
IAddress getAddress();
|
||||||
String getFile();
|
String getFile();
|
||||||
String getFunction();
|
String getFunction();
|
||||||
|
|
|
@ -43,4 +43,29 @@ public class DMCs {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks all ancestors for a given DMC to see if the given
|
||||||
|
* potentialAncestor is in fact an ancestor.
|
||||||
|
* @param dmc DMC who's ancestors to check.
|
||||||
|
* @param potentialAncestor Ancestor DMC to look for.
|
||||||
|
* @return true if a match is found.
|
||||||
|
*/
|
||||||
|
public static boolean isAncestorOf(IDataModelContext dmc, IDataModelContext potentialAncestor) {
|
||||||
|
// Check the direct parents for a match.
|
||||||
|
for (IDataModelContext parentDmc : dmc.getParents()) {
|
||||||
|
if (potentialAncestor.equals(parentDmc)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recursively check the parents' parents for a match.
|
||||||
|
for (IDataModelContext parentDmc : dmc.getParents()) {
|
||||||
|
if (isAncestorOf(parentDmc, potentialAncestor)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No match.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue