1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 02:36:01 +02:00

[237325] - Additional fixes for CommandCache.isTargetAvailable() bug.

This commit is contained in:
Pawel Piech 2008-06-16 20:20:24 +00:00
parent ee9c51a046
commit cda9077453
3 changed files with 7 additions and 6 deletions

View file

@ -449,7 +449,7 @@ public class CommandCache implements ICommandListener
} else {
fAvailableContexts.remove(context);
for (Iterator<IDMContext> itr = fAvailableContexts.iterator(); itr.hasNext();) {
if (DMContexts.isAncestorOf(itr.next(), context)) {
if (DMContexts.isAncestorOf(context, itr.next())) {
itr.remove();
}
}
@ -466,7 +466,7 @@ public class CommandCache implements ICommandListener
return true;
}
}
return true;
return false;
}

View file

@ -24,10 +24,10 @@ import org.eclipse.dd.dsf.datamodel.DMContexts;
import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.debug.service.IModules;
import org.eclipse.dd.dsf.debug.service.command.CommandCache;
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
import org.eclipse.dd.dsf.service.AbstractDsfService;
import org.eclipse.dd.dsf.service.DsfSession;
import org.eclipse.dd.mi.internal.MIPlugin;
import org.eclipse.dd.mi.service.command.AbstractMIControl;
import org.eclipse.dd.mi.service.command.commands.CLIInfoSharedLibrary;
import org.eclipse.dd.mi.service.command.output.CLIInfoSharedLibraryInfo;
import org.eclipse.dd.mi.service.command.output.CLIInfoSharedLibraryInfo.DsfMISharedInfo;
@ -60,7 +60,9 @@ public class MIModules extends AbstractDsfService implements IModules {
private void doInitialize(RequestMonitor requestMonitor) {
// Cache for holding Modules data
fModulesCache = new CommandCache(getSession(), getServicesTracker().getService(ICommandControl.class));
AbstractMIControl miControl = getServicesTracker().getService(AbstractMIControl.class);
fModulesCache = new CommandCache(getSession(), miControl);
fModulesCache.setContextAvailable(miControl.getControlDMContext(), true);
/*
* Make ourselves known so clients can use us.
*/

View file

@ -27,7 +27,6 @@ import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMData;
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason;
import org.eclipse.dd.dsf.debug.service.command.CommandCache;
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
import org.eclipse.dd.dsf.service.AbstractDsfService;
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
import org.eclipse.dd.dsf.service.DsfSession;
@ -174,7 +173,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
AbstractMIControl miControl = getServicesTracker().getService(AbstractMIControl.class);
fRegisterValueCache = new CommandCache(getSession(), miControl);
fRegisterValueCache.setContextAvailable(miControl.getControlDMContext(), true);
fRegisterNameCache = new CommandCache(getSession(), getServicesTracker().getService(ICommandControl.class));
fRegisterNameCache = new CommandCache(getSession(), miControl);
fRegisterNameCache.setContextAvailable(miControl.getControlDMContext(), true);
/*