From ff7f25b94d9d4978be6ebe32cc2b39d924de6062 Mon Sep 17 00:00:00 2001
From: Jonah Graham
Date: Tue, 8 Mar 2016 23:03:16 +0000
Subject: [PATCH] Bug 484900: Remove Majority of CDI classes
This is the first change to remove CDI from CDT. The CDI model
implementation is removed along with everything that directly
depends upon the implementation.
This commit does not include refactoring or moving classes. The few
insertions are the minimum necessary.
Change-Id: I80274e1a0d77bc7bb00a2afe4babc00c4f7613ae
Signed-off-by: Jonah Graham
---
.../META-INF/MANIFEST.MF | 2 -
.../org.eclipse.cdt.launch.remote/plugin.xml | 31 +-
...emoteConnectionConfigurationConstants.java | 4 +-
.../launching/RemoteRunLaunchDelegate.java | 220 +-
.../remote/tabs/RemoteCDebuggerTab.java | 108 -
.../remote/tabs/RemoteGDBDebuggerPage.java | 178 --
.../debug.product | 3 -
.../StandaloneTests.launch | 4 +-
.../META-INF/MANIFEST.MF | 2 -
.../scripts/config.ini | 2 +-
debug/org.eclipse.cdt.debug.core/.classpath | 3 +-
.../.settings/org.eclipse.jdt.core.prefs | 29 +-
.../META-INF/MANIFEST.MF | 6 +-
.../build.properties | 3 +-
.../cdt/debug/core/cdi/CDIException.java | 57 -
.../debug/core/cdi/ICDIAddressLocation.java | 30 -
.../cdt/debug/core/cdi/ICDIBreakpointHit.java | 30 -
.../cdt/debug/core/cdi/ICDICondition.java | 43 -
.../debug/core/cdi/ICDIEndSteppingRange.java | 21 -
.../cdt/debug/core/cdi/ICDIErrorInfo.java | 31 -
.../core/cdi/ICDIEventBreakpointHit.java | 24 -
.../cdt/debug/core/cdi/ICDIEventManager.java | 43 -
.../cdt/debug/core/cdi/ICDIExitInfo.java | 30 -
.../cdt/debug/core/cdi/ICDIFileLocation.java | 24 -
.../cdt/debug/core/cdi/ICDIFormat.java | 25 -
.../cdt/debug/core/cdi/ICDIFormattable.java | 37 -
.../debug/core/cdi/ICDIFunctionFinished.java | 35 -
.../debug/core/cdi/ICDIFunctionLocation.java | 29 -
.../cdt/debug/core/cdi/ICDILineLocation.java | 28 -
.../cdt/debug/core/cdi/ICDILocation.java | 25 -
.../cdt/debug/core/cdi/ICDILocator.java | 19 -
.../cdt/debug/core/cdi/ICDISession.java | 75 -
.../core/cdi/ICDISessionConfiguration.java | 27 -
.../cdt/debug/core/cdi/ICDISessionObject.java | 27 -
.../core/cdi/ICDISharedLibraryEvent.java | 23 -
.../debug/core/cdi/ICDISignalExitInfo.java | 31 -
.../debug/core/cdi/ICDISignalReceived.java | 29 -
.../cdt/debug/core/cdi/ICDITraceManager.java | 161 --
.../cdt/debug/core/cdi/ICDITraceSnapshot.java | 52 -
.../debug/core/cdi/ICDIWatchpointScope.java | 29 -
.../debug/core/cdi/ICDIWatchpointTrigger.java | 43 -
.../cdi/event/ICDIBreakpointMovedEvent.java | 26 -
.../cdi/event/ICDIBreakpointProblemEvent.java | 57 -
.../core/cdi/event/ICDIChangedEvent.java | 21 -
.../core/cdi/event/ICDICreatedEvent.java | 26 -
.../core/cdi/event/ICDIDestroyedEvent.java | 25 -
.../core/cdi/event/ICDIDisconnectedEvent.java | 25 -
.../cdt/debug/core/cdi/event/ICDIEvent.java | 29 -
.../core/cdi/event/ICDIEventListener.java | 28 -
.../event/ICDIExecutableReloadedEvent.java | 20 -
.../debug/core/cdi/event/ICDIExitedEvent.java | 33 -
.../cdi/event/ICDIMemoryChangedEvent.java | 25 -
.../core/cdi/event/ICDIRestartedEvent.java | 25 -
.../core/cdi/event/ICDIResumedEvent.java | 38 -
.../core/cdi/event/ICDISuspendedEvent.java | 43 -
.../core/cdi/model/ICDIAddressBreakpoint.java | 21 -
.../model/ICDIAddressFactoryManagement.java | 24 -
.../core/cdi/model/ICDIAddressToSource.java | 77 -
.../debug/core/cdi/model/ICDIArgument.java | 21 -
.../cdi/model/ICDIArgumentDescriptor.java | 17 -
.../debug/core/cdi/model/ICDIBreakpoint.java | 93 -
.../debug/core/cdi/model/ICDIBreakpoint2.java | 38 -
.../cdi/model/ICDIBreakpointManagement.java | 111 -
.../cdi/model/ICDIBreakpointManagement2.java | 109 -
.../cdi/model/ICDIBreakpointManagement3.java | 27 -
.../debug/core/cdi/model/ICDIDisposable.java | 36 -
.../core/cdi/model/ICDIEventBreakpoint.java | 31 -
.../core/cdi/model/ICDIExceptionpoint.java | 22 -
.../ICDIExecuteMoveInstructionPointer.java | 34 -
.../core/cdi/model/ICDIExecuteResume.java | 53 -
.../debug/core/cdi/model/ICDIExecuteStep.java | 72 -
.../core/cdi/model/ICDIExecuteStepReturn.java | 39 -
.../debug/core/cdi/model/ICDIExpression.java | 58 -
.../cdi/model/ICDIExpressionManagement.java | 48 -
.../cdi/model/ICDIFunctionBreakpoint.java | 21 -
.../core/cdi/model/ICDIGlobalVariable.java | 19 -
.../model/ICDIGlobalVariableDescriptor.java | 19 -
.../debug/core/cdi/model/ICDIInstruction.java | 57 -
.../core/cdi/model/ICDILineBreakpoint.java | 20 -
.../core/cdi/model/ICDILocalVariable.java | 19 -
.../model/ICDILocalVariableDescriptor.java | 28 -
.../cdi/model/ICDILocationBreakpoint.java | 28 -
.../debug/core/cdi/model/ICDIMemoryBlock.java | 125 -
.../cdi/model/ICDIMemoryBlockManagement.java | 64 -
.../cdi/model/ICDIMemoryBlockManagement2.java | 37 -
.../cdi/model/ICDIMemorySpaceEncoder.java | 55 -
.../cdi/model/ICDIMemorySpaceManagement.java | 68 -
.../core/cdi/model/ICDIMixedInstruction.java | 34 -
.../cdt/debug/core/cdi/model/ICDIObject.java | 27 -
.../debug/core/cdi/model/ICDIRegister.java | 69 -
.../cdi/model/ICDIRegisterDescriptor.java | 21 -
.../core/cdi/model/ICDIRegisterGroup.java | 47 -
.../core/cdi/model/ICDIRuntimeOptions.java | 45 -
.../core/cdi/model/ICDISharedLibrary.java | 59 -
.../model/ICDISharedLibraryManagement.java | 29 -
.../cdt/debug/core/cdi/model/ICDISignal.java | 69 -
.../core/cdi/model/ICDISignalManagement.java | 28 -
.../core/cdi/model/ICDISourceManagement.java | 93 -
.../debug/core/cdi/model/ICDIStackFrame.java | 93 -
.../cdt/debug/core/cdi/model/ICDISuspend.java | 35 -
.../cdt/debug/core/cdi/model/ICDITarget.java | 273 ---
.../cdt/debug/core/cdi/model/ICDITarget2.java | 23 -
.../cdi/model/ICDITargetConfiguration.java | 118 -
.../cdi/model/ICDITargetConfiguration2.java | 65 -
.../cdi/model/ICDITargetConfiguration3.java | 45 -
.../cdt/debug/core/cdi/model/ICDIThread.java | 179 --
.../debug/core/cdi/model/ICDIThreadGroup.java | 39 -
.../core/cdi/model/ICDIThreadStorage.java | 19 -
.../model/ICDIThreadStorageDescriptor.java | 28 -
.../debug/core/cdi/model/ICDITracepoint.java | 103 -
.../cdt/debug/core/cdi/model/ICDIValue.java | 69 -
.../debug/core/cdi/model/ICDIVariable.java | 68 -
.../cdi/model/ICDIVariableDescriptor.java | 89 -
.../debug/core/cdi/model/ICDIWatchpoint.java | 47 -
.../debug/core/cdi/model/ICDIWatchpoint2.java | 41 -
.../cdi/model/type/ICDIAggregateType.java | 24 -
.../cdi/model/type/ICDIAggregateValue.java | 26 -
.../core/cdi/model/type/ICDIArrayType.java | 24 -
.../core/cdi/model/type/ICDIArrayValue.java | 25 -
.../cdi/model/type/ICDIBigIntegerValue.java | 23 -
.../core/cdi/model/type/ICDIBoolType.java | 18 -
.../core/cdi/model/type/ICDIBoolValue.java | 18 -
.../core/cdi/model/type/ICDICharType.java | 23 -
.../core/cdi/model/type/ICDICharValue.java | 23 -
.../core/cdi/model/type/ICDIDerivedType.java | 25 -
.../core/cdi/model/type/ICDIDerivedValue.java | 26 -
.../core/cdi/model/type/ICDIDoubleType.java | 23 -
.../core/cdi/model/type/ICDIDoubleValue.java | 23 -
.../core/cdi/model/type/ICDIEnumType.java | 18 -
.../core/cdi/model/type/ICDIEnumValue.java | 18 -
.../core/cdi/model/type/ICDIFloatType.java | 23 -
.../core/cdi/model/type/ICDIFloatValue.java | 23 -
.../cdi/model/type/ICDIFloatingPointType.java | 28 -
.../model/type/ICDIFloatingPointValue.java | 28 -
.../core/cdi/model/type/ICDIFunctionType.java | 24 -
.../cdi/model/type/ICDIFunctionValue.java | 24 -
.../core/cdi/model/type/ICDIIntType.java | 23 -
.../core/cdi/model/type/ICDIIntValue.java | 23 -
.../core/cdi/model/type/ICDIIntegralType.java | 24 -
.../cdi/model/type/ICDIIntegralValue.java | 38 -
.../core/cdi/model/type/ICDILongLongType.java | 23 -
.../cdi/model/type/ICDILongLongValue.java | 23 -
.../core/cdi/model/type/ICDILongType.java | 23 -
.../core/cdi/model/type/ICDILongValue.java | 23 -
.../core/cdi/model/type/ICDIPointerType.java | 23 -
.../core/cdi/model/type/ICDIPointerValue.java | 28 -
.../cdi/model/type/ICDIReferenceType.java | 19 -
.../cdi/model/type/ICDIReferenceValue.java | 26 -
.../core/cdi/model/type/ICDIShortType.java | 23 -
.../core/cdi/model/type/ICDIShortValue.java | 23 -
.../core/cdi/model/type/ICDIStructType.java | 28 -
.../core/cdi/model/type/ICDIStructValue.java | 23 -
.../debug/core/cdi/model/type/ICDIType.java | 38 -
.../core/cdi/model/type/ICDIVoidType.java | 24 -
.../core/cdi/model/type/ICDIWCharType.java | 18 -
.../core/cdi/model/type/ICDIWCharValue.java | 17 -
debug/org.eclipse.cdt.debug.core/plugin.xml | 25 -
debug/org.eclipse.cdt.debug.core/pom.xml | 2 +-
.../schema/CDebugger.exsd | 154 --
.../eclipse/cdt/debug/core/CDIDebugModel.java | 219 --
.../cdt/debug/core/CDebugCorePlugin.java | 143 --
.../eclipse/cdt/debug/core/CDebugUtils.java | 13 -
.../eclipse/cdt/debug/core/ICDIDebugger.java | 31 -
.../eclipse/cdt/debug/core/ICDIDebugger2.java | 29 -
.../cdt/debug/core/ICDebugConfiguration.java | 44 -
.../eclipse/cdt/debug/core/ICDebugger.java | 28 -
.../debug/core/ICGlobalVariableManager.java | 48 -
.../BreakpointActionAdapterFactory.java | 38 -
.../breakpointactions/LogActionEnabler.java | 34 -
.../ResumeActionEnabler.java | 28 -
.../cdt/debug/core/model/CVariableFormat.java | 57 -
.../core/model/IAddRegisterGroupHandler.java | 21 -
.../model/ICBreakpointFilterExtension.java | 81 -
.../cdt/debug/core/model/ICDebugTarget.java | 123 -
.../debug/core/model/ICGlobalVariable.java | 24 -
.../cdt/debug/core/model/ICRegister.java | 21 -
.../cdt/debug/core/model/ICVariable.java | 44 -
.../model/IChangeReverseMethodHandler.java | 2 +-
.../cdt/debug/core/model/IFormatSupport.java | 41 -
.../internal/core/CBreakpointManager.java | 1542 ------------
.../debug/internal/core/CDebugAdapter.java | 142 --
.../core/CDebugCorePreferenceInitializer.java | 4 -
.../core/CDisassemblyContextProvider.java | 36 -
.../internal/core/CGlobalVariableManager.java | 297 ---
.../core/CMemoryBlockRetrievalExtension.java | 499 ----
.../debug/internal/core/CRegisterManager.java | 381 ---
.../debug/internal/core/CSettingsManager.java | 268 --
.../debug/internal/core/CSignalManager.java | 132 -
.../internal/core/DebugConfiguration.java | 190 --
.../debug/internal/core/SessionManager.java | 81 -
.../CBreakpointFilterExtension.java | 103 -
.../internal/core/model/AbstractCValue.java | 66 -
.../core/model/AbstractCVariable.java | 72 -
.../internal/core/model/AsmInstruction.java | 82 -
.../internal/core/model/AsmSourceLine.java | 68 -
.../core/model/CCoreFileDebugTarget.java | 50 -
.../internal/core/model/CDebugElement.java | 398 ---
.../internal/core/model/CDebugTarget.java | 2065 ----------------
.../internal/core/model/CDummyStackFrame.java | 296 ---
.../internal/core/model/CExpression.java | 264 --
.../core/model/CFloatingPointValue.java | 44 -
.../internal/core/model/CGlobalValue.java | 43 -
.../internal/core/model/CGlobalVariable.java | 413 ----
.../internal/core/model/CIndexedValue.java | 315 ---
.../internal/core/model/CLocalVariable.java | 353 ---
.../core/model/CMemoryBlockExtension.java | 604 -----
.../debug/internal/core/model/CModule.java | 314 ---
.../internal/core/model/CModuleManager.java | 169 --
.../debug/internal/core/model/CRegister.java | 451 ----
.../core/model/CRegisterDescriptor.java | 66 -
.../internal/core/model/CRegisterGroup.java | 279 ---
.../debug/internal/core/model/CSignal.java | 148 --
.../internal/core/model/CStackFrame.java | 1049 --------
.../debug/internal/core/model/CThread.java | 1101 ---------
.../cdt/debug/internal/core/model/CType.java | 148 --
.../cdt/debug/internal/core/model/CValue.java | 846 -------
.../internal/core/model/CValueFactory.java | 118 -
.../debug/internal/core/model/CVariable.java | 941 -------
.../internal/core/model/CVariableFactory.java | 84 -
.../internal/core/model/Disassembly.java | 228 --
.../internal/core/model/DisassemblyBlock.java | 244 --
.../core/model/DisassemblyInstruction.java | 103 -
.../core/model/DisassemblyRetrieval.java | 327 ---
.../core/model/DisassemblySourceLine.java | 86 -
.../CSourceLookupParticipant.java | 37 +-
.../core/sourcelookup/CSourceManager.java | 23 -
.../org.eclipse.cdt.debug.mi.core/.classpath | 9 -
.../org.eclipse.cdt.debug.mi.core/.cvsignore | 1 -
debug/org.eclipse.cdt.debug.mi.core/.options | 1 -
debug/org.eclipse.cdt.debug.mi.core/.project | 34 -
.../.settings/org.eclipse.jdt.core.prefs | 74 -
debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 1219 ----------
.../ChangeLog-2003 | 2151 -----------------
.../META-INF/MANIFEST.MF | 30 -
.../org.eclipse.cdt.debug.mi.core/about.html | 24 -
.../build.properties | 27 -
.../cdt/debug/mi/core/cdi/BreakpointHit.java | 43 -
.../debug/mi/core/cdi/BreakpointManager.java | 1152 ---------
.../cdt/debug/mi/core/cdi/CdiResources.java | 48 -
.../debug/mi/core/cdi/CdiResources.properties | 33 -
.../cdt/debug/mi/core/cdi/Condition.java | 75 -
.../debug/mi/core/cdi/EndSteppingRange.java | 22 -
.../cdt/debug/mi/core/cdi/ErrorInfo.java | 44 -
.../debug/mi/core/cdi/EventBreakpointHit.java | 44 -
.../cdt/debug/mi/core/cdi/EventManager.java | 542 -----
.../cdt/debug/mi/core/cdi/ExitInfo.java | 35 -
.../debug/mi/core/cdi/ExpressionManager.java | 271 ---
.../cdt/debug/mi/core/cdi/FileLocation.java | 22 -
.../eclipse/cdt/debug/mi/core/cdi/Format.java | 48 -
.../debug/mi/core/cdi/FunctionFinished.java | 73 -
.../cdt/debug/mi/core/cdi/LineLocation.java | 22 -
.../cdt/debug/mi/core/cdi/Location.java | 155 --
.../cdt/debug/mi/core/cdi/Locator.java | 71 -
.../debug/mi/core/cdi/MI2CDIException.java | 30 -
.../cdt/debug/mi/core/cdi/Manager.java | 66 -
.../cdt/debug/mi/core/cdi/MemoryManager.java | 195 --
.../cdt/debug/mi/core/cdi/ProcessManager.java | 91 -
.../debug/mi/core/cdi/RegisterManager.java | 472 ----
.../cdt/debug/mi/core/cdi/Session.java | 236 --
.../mi/core/cdi/SessionConfiguration.java | 40 -
.../cdt/debug/mi/core/cdi/SessionObject.java | 34 -
.../debug/mi/core/cdi/SharedLibraryEvent.java | 22 -
.../mi/core/cdi/SharedLibraryManager.java | 443 ----
.../cdt/debug/mi/core/cdi/SignalExitInfo.java | 43 -
.../cdt/debug/mi/core/cdi/SignalManager.java | 217 --
.../cdt/debug/mi/core/cdi/SignalReceived.java | 37 -
.../cdt/debug/mi/core/cdi/SourceManager.java | 503 ----
.../cdt/debug/mi/core/cdi/ThreadManager.java | 113 -
.../debug/mi/core/cdi/VariableManager.java | 756 ------
.../debug/mi/core/cdi/WatchpointScope.java | 43 -
.../debug/mi/core/cdi/WatchpointTrigger.java | 59 -
.../debug/mi/core/cdi/event/ChangedEvent.java | 136 --
.../debug/mi/core/cdi/event/CreatedEvent.java | 135 --
.../mi/core/cdi/event/DestroyedEvent.java | 112 -
.../mi/core/cdi/event/DisconnectedEvent.java | 39 -
.../debug/mi/core/cdi/event/ExitedEvent.java | 69 -
.../mi/core/cdi/event/MemoryChangedEvent.java | 61 -
.../debug/mi/core/cdi/event/ResumedEvent.java | 83 -
.../mi/core/cdi/event/SuspendedEvent.java | 101 -
.../mi/core/cdi/model/AddressBreakpoint.java | 26 -
.../mi/core/cdi/model/AddressLocation.java | 25 -
.../cdt/debug/mi/core/cdi/model/Argument.java | 45 -
.../mi/core/cdi/model/ArgumentDescriptor.java | 25 -
.../debug/mi/core/cdi/model/Breakpoint.java | 155 --
.../cdt/debug/mi/core/cdi/model/CObject.java | 34 -
.../core/cdi/model/CoreFileConfiguration.java | 108 -
.../mi/core/cdi/model/EventBreakpoint.java | 100 -
.../mi/core/cdi/model/Exceptionpoint.java | 56 -
.../debug/mi/core/cdi/model/Expression.java | 139 --
.../mi/core/cdi/model/FunctionBreakpoint.java | 26 -
.../mi/core/cdi/model/FunctionLocation.java | 23 -
.../mi/core/cdi/model/GlobalVariable.java | 61 -
.../cdi/model/GlobalVariableDescriptor.java | 35 -
.../debug/mi/core/cdi/model/Instruction.java | 76 -
.../mi/core/cdi/model/LineBreakpoint.java | 24 -
.../mi/core/cdi/model/LocalVariable.java | 52 -
.../cdi/model/LocalVariableDescriptor.java | 34 -
.../mi/core/cdi/model/LocationBreakpoint.java | 87 -
.../core/cdi/model/MappedSourceLocation.java | 66 -
.../debug/mi/core/cdi/model/MemoryBlock.java | 377 ---
.../mi/core/cdi/model/MixedInstruction.java | 58 -
.../cdt/debug/mi/core/cdi/model/Register.java | 124 -
.../mi/core/cdi/model/RegisterDescriptor.java | 38 -
.../mi/core/cdi/model/RegisterGroup.java | 62 -
.../mi/core/cdi/model/RuntimeOptions.java | 115 -
.../mi/core/cdi/model/SharedLibrary.java | 85 -
.../cdt/debug/mi/core/cdi/model/Signal.java | 86 -
.../debug/mi/core/cdi/model/StackFrame.java | 275 ---
.../cdt/debug/mi/core/cdi/model/Target.java | 1400 -----------
.../core/cdi/model/TargetConfiguration.java | 173 --
.../cdt/debug/mi/core/cdi/model/Thread.java | 596 -----
.../mi/core/cdi/model/ThreadStorage.java | 63 -
.../cdi/model/ThreadStorageDescriptor.java | 36 -
.../cdt/debug/mi/core/cdi/model/Value.java | 161 --
.../cdt/debug/mi/core/cdi/model/Variable.java | 557 -----
.../mi/core/cdi/model/VariableDescriptor.java | 421 ----
.../debug/mi/core/cdi/model/Watchpoint.java | 128 -
.../mi/core/cdi/model/type/AggregateType.java | 24 -
.../core/cdi/model/type/AggregateValue.java | 24 -
.../mi/core/cdi/model/type/ArrayType.java | 66 -
.../mi/core/cdi/model/type/ArrayValue.java | 141 --
.../mi/core/cdi/model/type/BoolType.java | 32 -
.../mi/core/cdi/model/type/BoolValue.java | 44 -
.../mi/core/cdi/model/type/CharType.java | 31 -
.../mi/core/cdi/model/type/CharValue.java | 36 -
.../mi/core/cdi/model/type/DerivedType.java | 53 -
.../mi/core/cdi/model/type/DerivedValue.java | 25 -
.../mi/core/cdi/model/type/DoubleType.java | 31 -
.../mi/core/cdi/model/type/DoubleValue.java | 27 -
.../mi/core/cdi/model/type/EnumType.java | 31 -
.../mi/core/cdi/model/type/EnumValue.java | 28 -
.../mi/core/cdi/model/type/FloatType.java | 31 -
.../mi/core/cdi/model/type/FloatValue.java | 27 -
.../cdi/model/type/FloatingPointType.java | 56 -
.../cdi/model/type/FloatingPointValue.java | 85 -
.../mi/core/cdi/model/type/FunctionType.java | 47 -
.../mi/core/cdi/model/type/FunctionValue.java | 27 -
.../core/cdi/model/type/IncompleteType.java | 27 -
.../debug/mi/core/cdi/model/type/IntType.java | 32 -
.../mi/core/cdi/model/type/IntValue.java | 28 -
.../mi/core/cdi/model/type/IntegralType.java | 36 -
.../mi/core/cdi/model/type/IntegralValue.java | 97 -
.../mi/core/cdi/model/type/LongLongType.java | 31 -
.../mi/core/cdi/model/type/LongLongValue.java | 28 -
.../mi/core/cdi/model/type/LongType.java | 31 -
.../mi/core/cdi/model/type/LongValue.java | 28 -
.../mi/core/cdi/model/type/PointerType.java | 44 -
.../mi/core/cdi/model/type/PointerValue.java | 38 -
.../mi/core/cdi/model/type/ReferenceType.java | 47 -
.../core/cdi/model/type/ReferenceValue.java | 102 -
.../mi/core/cdi/model/type/ShortType.java | 31 -
.../mi/core/cdi/model/type/ShortValue.java | 28 -
.../mi/core/cdi/model/type/StructType.java | 53 -
.../mi/core/cdi/model/type/StructValue.java | 27 -
.../debug/mi/core/cdi/model/type/Type.java | 52 -
.../mi/core/cdi/model/type/VoidType.java | 27 -
.../mi/core/cdi/model/type/VoidValue.java | 28 -
.../mi/core/cdi/model/type/WCharType.java | 32 -
.../mi/core/cdi/model/type/WCharValue.java | 37 -
.../org.eclipse.cdt.debug.mi.core/design.txt | 110 -
.../cdt/debug/mi/core/CLIProcessor.java | 272 ---
.../cdt/debug/mi/core/CommandQueue.java | 62 -
.../cdt/debug/mi/core/CoreProcess.java | 83 -
.../cdt/debug/mi/core/ErrorThread.java | 55 -
.../cdt/debug/mi/core/EventThread.java | 60 -
.../cdt/debug/mi/core/GDBTypeParser.java | 582 -----
.../org/eclipse/cdt/debug/mi/core/IMITTY.java | 43 -
.../cdt/debug/mi/core/MIException.java | 38 -
.../eclipse/cdt/debug/mi/core/MIFormat.java | 107 -
.../eclipse/cdt/debug/mi/core/MIInferior.java | 421 ----
.../eclipse/cdt/debug/mi/core/MIProcess.java | 58 -
.../eclipse/cdt/debug/mi/core/MISession.java | 896 -------
.../org/eclipse/cdt/debug/mi/core/Queue.java | 82 -
.../eclipse/cdt/debug/mi/core/RxThread.java | 562 -----
.../cdt/debug/mi/core/SessionProcess.java | 127 -
.../eclipse/cdt/debug/mi/core/TxThread.java | 105 -
.../cdt/debug/mi/core/command/CLICatch.java | 48 -
.../cdt/debug/mi/core/command/CLICommand.java | 48 -
.../debug/mi/core/command/CLIExecAbort.java | 28 -
.../cdt/debug/mi/core/command/CLIHandle.java | 27 -
.../debug/mi/core/command/CLIInfoLine.java | 42 -
.../debug/mi/core/command/CLIInfoProc.java | 46 -
.../debug/mi/core/command/CLIInfoProgram.java | 46 -
.../mi/core/command/CLIInfoSharedLibrary.java | 46 -
.../debug/mi/core/command/CLIInfoSignals.java | 50 -
.../debug/mi/core/command/CLIInfoThreads.java | 46 -
.../cdt/debug/mi/core/command/CLIJump.java | 49 -
.../cdt/debug/mi/core/command/CLIPType.java | 46 -
.../mi/core/command/CLISharedLibrary.java | 30 -
.../cdt/debug/mi/core/command/CLISignal.java | 50 -
.../mi/core/command/CLITargetAttach.java | 27 -
.../cdt/debug/mi/core/command/CLIWhatis.java | 46 -
.../cdt/debug/mi/core/command/Command.java | 115 -
.../debug/mi/core/command/CommandFactory.java | 469 ----
.../debug/mi/core/command/MIBreakAfter.java | 33 -
.../mi/core/command/MIBreakCondition.java | 42 -
.../debug/mi/core/command/MIBreakDelete.java | 37 -
.../debug/mi/core/command/MIBreakDisable.java | 36 -
.../debug/mi/core/command/MIBreakEnable.java | 35 -
.../debug/mi/core/command/MIBreakInsert.java | 138 --
.../debug/mi/core/command/MIBreakList.java | 74 -
.../debug/mi/core/command/MIBreakWatch.java | 64 -
.../cdt/debug/mi/core/command/MICommand.java | 206 --
.../mi/core/command/MIDataDisassemble.java | 145 --
.../command/MIDataEvaluateExpression.java | 50 -
.../command/MIDataListChangedRegisters.java | 48 -
.../core/command/MIDataListRegisterNames.java | 64 -
.../command/MIDataListRegisterValues.java | 95 -
.../mi/core/command/MIDataReadMemory.java | 154 --
.../mi/core/command/MIDataWriteMemory.java | 98 -
.../command/MIDataWriteRegisterValues.java | 72 -
.../mi/core/command/MIEnvironmentCD.java | 28 -
.../core/command/MIEnvironmentDirectory.java | 33 -
.../mi/core/command/MIEnvironmentPWD.java | 45 -
.../mi/core/command/MIEnvironmentPath.java | 26 -
.../mi/core/command/MIExecArguments.java | 40 -
.../debug/mi/core/command/MIExecContinue.java | 27 -
.../debug/mi/core/command/MIExecFinish.java | 28 -
.../mi/core/command/MIExecInterrupt.java | 31 -
.../cdt/debug/mi/core/command/MIExecNext.java | 31 -
.../core/command/MIExecNextInstruction.java | 33 -
.../debug/mi/core/command/MIExecReturn.java | 32 -
.../cdt/debug/mi/core/command/MIExecRun.java | 32 -
.../cdt/debug/mi/core/command/MIExecStep.java | 33 -
.../core/command/MIExecStepInstruction.java | 36 -
.../debug/mi/core/command/MIExecUntil.java | 34 -
.../debug/mi/core/command/MIFileExecFile.java | 30 -
.../mi/core/command/MIFileSymbolFile.java | 28 -
.../cdt/debug/mi/core/command/MIGDBExit.java | 26 -
.../cdt/debug/mi/core/command/MIGDBSet.java | 36 -
.../mi/core/command/MIGDBSetAutoSolib.java | 25 -
.../command/MIGDBSetBreakpointPending.java | 25 -
.../mi/core/command/MIGDBSetEnvironment.java | 53 -
.../mi/core/command/MIGDBSetNewConsole.java | 23 -
.../core/command/MIGDBSetSolibSearchPath.java | 50 -
.../command/MIGDBSetStopOnSolibEvents.java | 26 -
.../cdt/debug/mi/core/command/MIGDBShow.java | 47 -
.../mi/core/command/MIGDBShowAddressSize.java | 40 -
.../mi/core/command/MIGDBShowDirectories.java | 46 -
.../mi/core/command/MIGDBShowEndian.java | 42 -
.../mi/core/command/MIGDBShowExitCode.java | 49 -
.../mi/core/command/MIGDBShowPrompt.java | 25 -
.../command/MIGDBShowSolibSearchPath.java | 46 -
.../mi/core/command/MIInfoSharedLibrary.java | 41 -
.../mi/core/command/MIInterpreterExec.java | 39 -
.../command/MIInterpreterExecConsole.java | 27 -
.../mi/core/command/MIStackInfoDepth.java | 53 -
.../mi/core/command/MIStackListArguments.java | 73 -
.../mi/core/command/MIStackListFrames.java | 79 -
.../mi/core/command/MIStackListLocals.java | 55 -
.../mi/core/command/MIStackSelectFrame.java | 29 -
.../debug/mi/core/command/MITargetDetach.java | 27 -
.../mi/core/command/MITargetDownload.java | 38 -
.../debug/mi/core/command/MITargetSelect.java | 39 -
.../mi/core/command/MIThreadListIds.java | 49 -
.../debug/mi/core/command/MIThreadSelect.java | 49 -
.../debug/mi/core/command/MIVarAssign.java | 27 -
.../debug/mi/core/command/MIVarCreate.java | 78 -
.../debug/mi/core/command/MIVarDelete.java | 50 -
.../core/command/MIVarEvaluateExpression.java | 52 -
.../mi/core/command/MIVarInfoExpression.java | 53 -
.../mi/core/command/MIVarInfoNumChildren.java | 50 -
.../debug/mi/core/command/MIVarInfoType.java | 52 -
.../mi/core/command/MIVarListChildren.java | 51 -
.../debug/mi/core/command/MIVarSetFormat.java | 57 -
.../mi/core/command/MIVarShowAttributes.java | 52 -
.../mi/core/command/MIVarShowFormat.java | 29 -
.../debug/mi/core/command/MIVarUpdate.java | 54 -
.../cdt/debug/mi/core/command/MIVersion.java | 31 -
.../cdt/debug/mi/core/command/RawCommand.java | 46 -
.../factories/CommandFactoriesMessages.java | 33 -
.../CommandFactoriesMessages.properties | 11 -
.../factories/CommandFactoryDescriptor.java | 136 --
.../factories/CommandFactoryManager.java | 85 -
.../factories/StandardCommandFactory.java | 33 -
.../linux/LinuxCLIInfoSharedLibrary.java | 38 -
.../linux/LinuxCLIInfoSharedLibraryInfo.java | 72 -
.../linux/StandardLinuxCommandFactory.java | 77 -
.../factories/macos/MacOSCLIInfoPID.java | 85 -
.../factories/macos/MacOSCLIInfoThreads.java | 53 -
.../factories/macos/MacOSCLIPtype.java | 31 -
.../factories/macos/MacOSMIEnvironmentCD.java | 34 -
.../factories/macos/MacOSMIVarUpdate.java | 48 -
.../factories/macos/MacOSMIVarUpdateInfo.java | 132 -
.../macos/MacOsCLIInfoThreadsInfo.java | 78 -
.../macos/StandardMacOSCommandFactory.java | 86 -
.../factories/win32/CygwinCommandFactory.java | 49 -
.../win32/CygwinMIEnvironmentCD.java | 60 -
.../win32/CygwinMIEnvironmentDirectory.java | 106 -
.../win32/StandardWinCommandFactory.java | 105 -
.../win32/WinCLIInfoSharedLibrary.java | 38 -
.../win32/WinCLIInfoSharedLibraryInfo.java | 51 -
.../factories/win32/WinMIEnvironmentCD.java | 51 -
.../factories/win32/WinMIGDBSetAutoSolib.java | 27 -
.../core/event/MIBreakpointChangedEvent.java | 52 -
.../core/event/MIBreakpointCreatedEvent.java | 37 -
.../core/event/MIBreakpointDeletedEvent.java | 37 -
.../mi/core/event/MIBreakpointHitEvent.java | 111 -
.../debug/mi/core/event/MIChangedEvent.java | 25 -
.../debug/mi/core/event/MICreatedEvent.java | 25 -
.../debug/mi/core/event/MIDestroyedEvent.java | 25 -
.../debug/mi/core/event/MIDetachedEvent.java | 31 -
.../cdt/debug/mi/core/event/MIErrorEvent.java | 81 -
.../cdt/debug/mi/core/event/MIEvent.java | 44 -
.../core/event/MIFunctionFinishedEvent.java | 108 -
.../debug/mi/core/event/MIGDBExitEvent.java | 25 -
.../mi/core/event/MIInferiorCreatedEvent.java | 29 -
.../mi/core/event/MIInferiorExitEvent.java | 82 -
.../core/event/MIInferiorSignalExitEvent.java | 86 -
.../mi/core/event/MILocationReachedEvent.java | 83 -
.../mi/core/event/MIMemoryChangedEvent.java | 37 -
.../mi/core/event/MIMemoryCreatedEvent.java | 46 -
.../mi/core/event/MIRegisterChangedEvent.java | 39 -
.../mi/core/event/MIRegisterCreatedEvent.java | 44 -
.../debug/mi/core/event/MIRunningEvent.java | 47 -
.../core/event/MISharedLibChangedEvent.java | 37 -
.../core/event/MISharedLibCreatedEvent.java | 37 -
.../debug/mi/core/event/MISharedLibEvent.java | 34 -
.../core/event/MISharedLibUnloadedEvent.java | 35 -
.../mi/core/event/MISignalChangedEvent.java | 37 -
.../debug/mi/core/event/MISignalEvent.java | 101 -
.../mi/core/event/MISteppingRangeEvent.java | 82 -
.../debug/mi/core/event/MIStoppedEvent.java | 99 -
.../mi/core/event/MIThreadCreatedEvent.java | 36 -
.../mi/core/event/MIThreadExitEvent.java | 36 -
.../mi/core/event/MIVarChangedEvent.java | 38 -
.../mi/core/event/MIVarCreatedEvent.java | 39 -
.../mi/core/event/MIVarDeletedEvent.java | 38 -
.../mi/core/event/MIWatchpointScopeEvent.java | 86 -
.../core/event/MIWatchpointTriggerEvent.java | 158 --
.../debug/mi/core/output/CLICatchInfo.java | 82 -
.../debug/mi/core/output/CLIInfoLineInfo.java | 100 -
.../debug/mi/core/output/CLIInfoProcInfo.java | 74 -
.../mi/core/output/CLIInfoProgramInfo.java | 80 -
.../core/output/CLIInfoSharedLibraryInfo.java | 192 --
.../mi/core/output/CLIInfoSignalsInfo.java | 115 -
.../mi/core/output/CLIInfoThreadsInfo.java | 93 -
.../debug/mi/core/output/CLIPTypeInfo.java | 54 -
.../debug/mi/core/output/CLIWhatisInfo.java | 54 -
.../cdt/debug/mi/core/output/MIArg.java | 131 -
.../cdt/debug/mi/core/output/MIAsm.java | 117 -
.../debug/mi/core/output/MIAsyncRecord.java | 75 -
.../mi/core/output/MIBreakInsertInfo.java | 86 -
.../debug/mi/core/output/MIBreakListInfo.java | 84 -
.../mi/core/output/MIBreakWatchInfo.java | 24 -
.../debug/mi/core/output/MIBreakpoint.java | 275 ---
.../mi/core/output/MIConsoleStreamOutput.java | 18 -
.../cdt/debug/mi/core/output/MIConst.java | 123 -
.../mi/core/output/MIDataDisassembleInfo.java | 125 -
.../output/MIDataEvaluateExpressionInfo.java | 52 -
.../MIDataListChangedRegistersInfo.java | 73 -
.../output/MIDataListRegisterNamesInfo.java | 90 -
.../output/MIDataListRegisterValuesInfo.java | 53 -
.../mi/core/output/MIDataReadMemoryInfo.java | 154 --
.../mi/core/output/MIEnvironmentPWDInfo.java | 55 -
.../mi/core/output/MIExecAsyncOutput.java | 17 -
.../cdt/debug/mi/core/output/MIFrame.java | 152 --
.../core/output/MIGDBShowAddressSizeInfo.java | 35 -
.../core/output/MIGDBShowDirectoriesInfo.java | 65 -
.../mi/core/output/MIGDBShowEndianInfo.java | 55 -
.../mi/core/output/MIGDBShowExitCodeInfo.java | 39 -
.../debug/mi/core/output/MIGDBShowInfo.java | 50 -
.../output/MIGDBShowSolibSearchPathInfo.java | 52 -
.../cdt/debug/mi/core/output/MIInfo.java | 86 -
.../core/output/MIInfoSharedLibraryInfo.java | 68 -
.../cdt/debug/mi/core/output/MIList.java | 59 -
.../mi/core/output/MILogStreamOutput.java | 18 -
.../cdt/debug/mi/core/output/MIMemory.java | 107 -
.../mi/core/output/MINotifyAsyncOutput.java | 17 -
.../cdt/debug/mi/core/output/MIOOBRecord.java | 17 -
.../cdt/debug/mi/core/output/MIOutput.java | 50 -
.../cdt/debug/mi/core/output/MIParser.java | 578 -----
.../debug/mi/core/output/MIRegisterValue.java | 98 -
.../cdt/debug/mi/core/output/MIResult.java | 51 -
.../debug/mi/core/output/MIResultRecord.java | 64 -
.../cdt/debug/mi/core/output/MIShared.java | 51 -
.../cdt/debug/mi/core/output/MISigHandle.java | 58 -
.../cdt/debug/mi/core/output/MISrcAsm.java | 91 -
.../mi/core/output/MIStackInfoDepthInfo.java | 52 -
.../core/output/MIStackListArgumentsInfo.java | 83 -
.../mi/core/output/MIStackListFramesInfo.java | 84 -
.../mi/core/output/MIStackListLocalsInfo.java | 63 -
.../mi/core/output/MIStatusAsyncOutput.java | 18 -
.../debug/mi/core/output/MIStreamRecord.java | 43 -
.../mi/core/output/MITargetStreamOutput.java | 19 -
.../mi/core/output/MIThreadListIdsInfo.java | 70 -
.../mi/core/output/MIThreadSelectInfo.java | 61 -
.../cdt/debug/mi/core/output/MITuple.java | 58 -
.../cdt/debug/mi/core/output/MIValue.java | 17 -
.../cdt/debug/mi/core/output/MIVar.java | 77 -
.../cdt/debug/mi/core/output/MIVarChange.java | 45 -
.../debug/mi/core/output/MIVarCreateInfo.java | 66 -
.../debug/mi/core/output/MIVarDeleteInfo.java | 52 -
.../output/MIVarEvaluateExpressionInfo.java | 47 -
.../core/output/MIVarInfoExpressionInfo.java | 57 -
.../core/output/MIVarInfoNumChildrenInfo.java | 54 -
.../mi/core/output/MIVarInfoTypeInfo.java | 48 -
.../mi/core/output/MIVarListChildrenInfo.java | 88 -
.../core/output/MIVarShowAttributesInfo.java | 51 -
.../mi/core/output/MIVarShowFormatInfo.java | 60 -
.../debug/mi/core/output/MIVarUpdateInfo.java | 103 -
.../plugin.properties | 23 -
.../org.eclipse.cdt.debug.mi.core/plugin.xml | 129 -
debug/org.eclipse.cdt.debug.mi.core/pom.xml | 17 -
.../schema/commandFactories.exsd | 161 --
.../debug/mi/core/AbstractGDBCDIDebugger.java | 243 --
.../debug/mi/core/CygwinMIProcessAdapter.java | 105 -
.../cdt/debug/mi/core/GDBCDIDebugger.java | 304 ---
.../cdt/debug/mi/core/GDBCDIDebugger2.java | 289 ---
.../cdt/debug/mi/core/GDBDebugger.java | 174 --
.../eclipse/cdt/debug/mi/core/GDBProcess.java | 33 -
.../debug/mi/core/GDBServerCDIDebugger.java | 123 -
.../debug/mi/core/GDBServerCDIDebugger2.java | 161 --
.../cdt/debug/mi/core/GDBServerDebugger.java | 138 --
...BServerMILaunchConfigurationConstants.java | 25 -
.../cdt/debug/mi/core/IMIConstants.java | 67 -
.../core/IMILaunchConfigurationConstants.java | 96 -
.../cdt/debug/mi/core/MICoreUtils.java | 35 -
.../eclipse/cdt/debug/mi/core/MIPlugin.java | 642 -----
.../mi/core/MIPluginResources.properties | 39 -
.../mi/core/MIPreferenceInitializer.java | 33 -
.../cdt/debug/mi/core/MIProcessAdapter.java | 212 --
.../cdt/debug/mi/core/MITTYAdapter.java | 55 -
.../cdt/debug/mi/core/MinGWDebugger.java | 21 -
debug/org.eclipse.cdt.debug.mi.ui/.classpath | 7 -
debug/org.eclipse.cdt.debug.mi.ui/.cvsignore | 1 -
debug/org.eclipse.cdt.debug.mi.ui/.project | 34 -
.../org.eclipse.core.resources.prefs | 3 -
.../.settings/org.eclipse.jdt.core.prefs | 74 -
debug/org.eclipse.cdt.debug.mi.ui/ChangeLog | 370 ---
.../META-INF/MANIFEST.MF | 31 -
debug/org.eclipse.cdt.debug.mi.ui/about.html | 24 -
.../build.properties | 19 -
.../icons/obj16/save_console.gif | Bin 609 -> 0 bytes
.../icons/obj16/verbose_mode_co.gif | Bin 367 -> 0 bytes
.../plugin.properties | 23 -
debug/org.eclipse.cdt.debug.mi.ui/plugin.xml | 88 -
debug/org.eclipse.cdt.debug.mi.ui/pom.xml | 17 -
.../ui/ActionFilterAdapterFactory.java | 47 -
.../mi/internal/ui/CygwinDebuggerPage.java | 32 -
.../debug/mi/internal/ui/GDBDebuggerPage.java | 384 ---
.../mi/internal/ui/GDBServerDebuggerPage.java | 203 --
.../debug/mi/internal/ui/GDBSolibBlock.java | 202 --
.../mi/internal/ui/GDBTargetActionFilter.java | 35 -
.../mi/internal/ui/IMIHelpContextIds.java | 25 -
.../debug/mi/internal/ui/IMIUIConstants.java | 22 -
.../debug/mi/internal/ui/MIUIMessages.java | 33 -
.../mi/internal/ui/MIUIMessages.properties | 75 -
.../cdt/debug/mi/internal/ui/MIUIPlugin.java | 61 -
.../mi/internal/ui/MinGWDebuggerPage.java | 67 -
.../cdt/debug/mi/internal/ui/SWTUtil.java | 100 -
.../internal/ui/SerialPortSettingsBlock.java | 208 --
.../mi/internal/ui/SolibSearchPathBlock.java | 622 -----
.../internal/ui/StandardGDBDebuggerPage.java | 558 -----
.../mi/internal/ui/TCPSettingsBlock.java | 201 --
.../internal/ui/actions/ActionMessages.java | 33 -
.../ui/actions/ActionMessages.properties | 13 -
.../actions/SetAutoSolibActionDelegate.java | 271 ---
.../ui/actions/VerboseModeActionDelegate.java | 56 -
.../dialogfields/CheckedListDialogField.java | 228 --
.../ui/dialogfields/ComboDialogField.java | 241 --
.../internal/ui/dialogfields/DialogField.java | 233 --
.../ui/dialogfields/IDialogFieldListener.java | 23 -
.../ui/dialogfields/IListAdapter.java | 28 -
.../ui/dialogfields/IStringButtonAdapter.java | 20 -
.../internal/ui/dialogfields/LayoutUtil.java | 141 --
.../ui/dialogfields/ListDialogField.java | 783 ------
.../SelectionButtonDialogField.java | 195 --
.../SelectionButtonDialogFieldGroup.java | 259 --
.../internal/ui/dialogfields/Separator.java | 95 -
.../dialogfields/StringButtonDialogField.java | 145 --
.../StringButtonStatusDialogField.java | 169 --
.../ui/dialogfields/StringDialogField.java | 164 --
.../ui/preferences/MIPreferencePage.java | 574 -----
.../ui/preferences/PreferenceMessages.java | 33 -
.../preferences/PreferenceMessages.properties | 19 -
.../ui/propertypages/OptionsPropertyPage.java | 108 -
.../ui/propertypages/PropertyMessages.java | 37 -
.../propertypages/PropertyMessages.properties | 11 -
.../ui/IMILaunchConfigurationComponent.java | 84 -
.../eclipse/cdt/debug/mi/ui/MIUIUtils.java | 33 -
.../ui/console/MiConsolePageParticipant.java | 130 -
.../ui/console/VerboseModeChangedEvent.java | 30 -
.../actions/IMiConsoleImagesConst.java | 18 -
.../ui/console/actions/MiConsoleMessages.java | 30 -
.../actions/MiConsoleMessages.properties | 14 -
.../console/actions/MiConsoleSaveAction.java | 82 -
.../actions/MiConsoleVerboseModeAction.java | 52 -
.../org.eclipse.cdt.debug.ui.tests/.classpath | 8 -
.../org.eclipse.cdt.debug.ui.tests/.cvsignore | 1 -
debug/org.eclipse.cdt.debug.ui.tests/.project | 28 -
.../.settings/org.eclipse.jdt.core.prefs | 57 -
.../org.eclipse.cdt.debug.ui.tests/Changelog | 69 -
.../META-INF/MANIFEST.MF | 22 -
.../org.eclipse.cdt.debug.ui.tests/about.html | 24 -
.../build.properties | 18 -
.../eclipse/cdt/debug/core/tests/.cvsignore | 0
.../debug/core/tests/AbstractDebugTest.java | 240 --
.../cdt/debug/core/tests/AllDebugTests.java | 41 -
.../cdt/debug/core/tests/BreakpointTests.java | 616 -----
.../cdt/debug/core/tests/DebugTests.java | 144 --
.../core/tests/EventBreakpointTests.java | 94 -
.../cdt/debug/core/tests/LocationTests.java | 119 -
.../tests/MapEntrySourceContainerTests.java | 40 -
.../core/tests/ProjectWithSpaceTests.java | 103 -
.../cdt/debug/core/tests/TargetTests.java | 111 -
debug/org.eclipse.cdt.debug.ui.tests/pom.xml | 35 -
.../resources/debugCxxTest.zip | Bin 3550 -> 0 bytes
.../resources/debugTest.zip | Bin 1578 -> 0 bytes
.../cdt/debug/testplugin/CDebugHelper.java | 87 -
.../cdt/debug/testplugin/CProjectHelper.java | 238 --
.../cdt/debug/testplugin/CTestPlugin.java | 64 -
.../testplugin/util/ExpectedStrings.java | 106 -
.../testplugin/util/ExpectedStringsTests.java | 126 -
debug/org.eclipse.cdt.debug.ui.tests/test.xml | 51 -
.../META-INF/MANIFEST.MF | 3 +-
.../plugin.properties | 7 -
debug/org.eclipse.cdt.debug.ui/plugin.xml | 510 ----
debug/org.eclipse.cdt.debug.ui/pom.xml | 2 +-
.../internal/ui/CDebugModelPresentation.java | 180 +-
.../cdt/debug/internal/ui/CDebugUIUtils.java | 19 -
.../internal/ui/CRegisterManagerProxies.java | 88 -
.../internal/ui/EvaluationContextManager.java | 241 --
.../ui/actions/ActionMessages.properties | 16 -
.../ui/actions/AddGlobalsActionDelegate.java | 339 ---
.../ui/actions/AddWatchpointDialog.java | 436 ----
.../BinaryVariableFormatActionDelegate.java | 26 -
.../ui/actions/CanFormatObjectTester.java | 45 -
.../DecVariableFormatActionDelegate.java | 26 -
.../DisableVariablesActionDelegate.java | 29 -
.../EnableVariablesActionDelegate.java | 159 --
.../HexVariableFormatActionDelegate.java | 26 -
.../LoadSymbolsForAllActionDelegate.java | 105 -
.../ui/actions/MoveToLineAdapter.java | 34 +-
.../NaturalVariableFormatActionDelegate.java | 26 -
.../ui/actions/NumberFormatsContribution.java | 121 -
.../RemoveAllGlobalsActionDelegate.java | 137 --
.../actions/RemoveGlobalsActionDelegate.java | 125 -
.../ui/actions/ResumeAtLineAdapter.java | 32 +-
.../internal/ui/actions/RunToLineAdapter.java | 32 +-
...ggleInstructionStepModeActionDelegate.java | 16 -
.../actions/VariableFormatActionDelegate.java | 150 --
.../breakpoints/ToggleBreakpointAdapter.java | 24 -
.../BreakpointsMessages.properties | 3 -
.../breakpoints/CBreakpointFilteringPage.java | 81 -
.../breakpoints/CBreakpointPropertyPage.java | 37 +-
.../ui/breakpoints/CBreakpointUpdater.java | 18 +-
.../ui/breakpoints/ThreadFilterEditor.java | 348 ---
.../breakpoints/ToggleCBreakpointTester.java | 5 -
.../AbstractRegisterGroupCommandHandler.java | 169 --
.../AddRegisterGroupCommandHandler.java | 45 -
.../EditRegisterGroupCommandHandler.java | 45 -
.../LoadAllSymbolsCommandHandler.java | 37 -
.../commands/LoadSymbolsCommandHandler.java | 38 -
.../RemoveRegisterGroupsCommandHandler.java | 45 -
.../RestoreRegisterGroupsCommandHandler.java | 45 -
.../ui/commands/ViewMemoryHandler.java | 77 -
.../dsf/CDIDisassemblyRetrieval.java | 121 -
.../dsf/DisassemblyBackendCdi.java | 709 ------
.../dsf/DisassemblyBackendCdiFactory.java | 42 -
.../disassembly/editor/DisassemblyEditor.java | 379 ---
.../rendering/DisassemblyAnnotationModel.java | 215 --
.../rendering/DisassemblyEditorInput.java | 366 ---
.../rendering/DisassemblyMemoryRendering.java | 103 -
.../rendering/DisassemblyMessages.java | 33 -
.../rendering/DisassemblyMessages.properties | 0
.../DisassemblyRenderingTypeDelegate.java | 27 -
.../adapters/CDebugElementAdapterFactory.java | 191 --
.../CDebugElementLabelProviderFactory.java | 65 -
.../adapters/CDebugElementProxyFactory.java | 63 -
.../adapters/CDebugTargetContentProvider.java | 68 -
.../adapters/CDefaultViewerInputProvider.java | 54 -
.../CRegisterManagerContentProvider.java | 58 -
.../adapters/CRegisterManagerModelProxy.java | 51 -
.../adapters/CRegisterManagerProxy.java | 152 --
.../CRegisterManagerProxyMementoProvider.java | 33 -
.../adapters/CStackFrameContentProvider.java | 55 -
.../adapters/CStackFrameMementoProvider.java | 46 -
.../CStackFrameViewerInputProvider.java | 49 -
.../adapters/CThreadContentProvider.java | 55 -
.../adapters/CVariableLabelProvider.java | 135 --
.../CWatchExpressionFactoryAdapter.java | 35 -
...CWatchExpressionFactoryAdapterFactory.java | 43 -
.../DefaultViewColumnPresentationFactory.java | 35 -
.../DisassemblyElementContentProvider.java | 126 -
.../DisassemblyElementLabelProvider.java | 148 --
.../adapters/DisassemblyElementProxy.java | 88 -
.../DisassemblyToggleBreakpointAdapter.java | 92 -
.../adapters/ElementAdapterMessages.java | 28 -
.../ElementAdapterMessages.properties | 13 -
.../RegistersViewColumnPresentation.java | 114 -
...egistersViewColumnPresentationFactory.java | 40 -
.../ui/launch/CApplicationLaunchShortcut.java | 111 +-
.../ui/preferences/CDebugPreferencePage.java | 90 +-
.../ui/preferences/DebuggerTypesPage.java | 266 --
.../preferences/PreferenceMessages.properties | 6 -
.../ui/views/memory/AddMemoryBlocks.java | 53 -
.../views/modules/ModuleMementoProvider.java | 88 -
.../views/signals/SignalsContentProvider.java | 53 -
.../ui/views/signals/SignalsView.java | 241 --
.../signals/SignalsViewContentProvider.java | 90 -
.../eclipse/cdt/debug/ui/CDebugUIPlugin.java | 9 -
.../AbstractToggleBreakpointAdapter.java | 5 +-
.../org.eclipse.cdt.gdb/META-INF/MANIFEST.MF | 2 +-
.../feature.xml | 14 -
.../feature.xml | 14 -
.../internal/ui/launching/CDebuggerTab.java | 9 -
.../META-INF/MANIFEST.MF | 1 -
.../plugin.xml | 10 -
.../gdbjtag/core/GDBJtagCommandFactory.java | 37 -
.../debug/gdbjtag/core/GDBJtagDebugger.java | 405 ----
.../GDBJtagLaunchConfigurationDelegate.java | 89 -
.../debug/gdbjtag/core/IGDBJtagConstants.java | 2 -
.../META-INF/MANIFEST.MF | 3 +-
.../plugin.xml | 57 -
jtag/org.eclipse.cdt.debug.gdbjtag.ui/pom.xml | 2 +-
.../gdbjtag/ui/GDBJtagDSFDebuggerTab.java | 11 -
.../debug/gdbjtag/ui/GDBJtagDebuggerTab.java | 565 -----
.../META-INF/MANIFEST.MF | 2 -
.../org.eclipse.cdt.launch/plugin.properties | 4 +-
launch/org.eclipse.cdt.launch/plugin.xml | 26 +-
.../cdt/launch/AbstractCLaunchDelegate.java | 31 -
.../internal/CoreFileLaunchDelegate.java | 145 --
.../internal/LocalAttachLaunchDelegate.java | 153 --
.../internal/LocalCDILaunchDelegate.java | 390 +--
.../internal/ui/AbstractCDebuggerTab.java | 374 ---
.../launch/internal/ui/CoreFilePrompter.java | 76 -
.../launch/ui/ApplicationCDebuggerTab.java | 62 -
.../cdt/launch/ui/AttachCDebuggerTab.java | 22 -
.../eclipse/cdt/launch/ui/CDebuggerTab.java | 539 -----
.../cdt/launch/ui/CoreFileDebuggerTab.java | 217 --
pom.xml | 3 -
releng/org.eclipse.cdt.releng/maps/cdt.map | 4 -
releng/org.eclipse.cdt.testing/test.xml | 12 -
releng/org.eclipse.cdt/plugin.xml | 12 -
835 files changed, 64 insertions(+), 84578 deletions(-)
delete mode 100644 cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDebuggerTab.java
delete mode 100644 cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/CDIException.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIAddressLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointHit.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEndSteppingRange.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIErrorInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventBreakpointHit.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIExitInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFileLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormat.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormattable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionFinished.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILineLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocator.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionObject.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISharedLibraryEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalExitInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalReceived.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceSnapshot.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointScope.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointTrigger.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointMovedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointProblemEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDICreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDestroyedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDisconnectedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEventListener.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExecutableReloadedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExitedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIMemoryChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIRestartedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIResumedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDISuspendedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressFactoryManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressToSource.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgument.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgumentDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement3.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIDisposable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIEventBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExceptionpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteMoveInstructionPointer.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteResume.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStep.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStepReturn.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpression.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpressionManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIFunctionBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILineBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocationBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceEncoder.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMixedInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIObject.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterGroup.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRuntimeOptions.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibraryManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignalManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISourceManagement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISuspend.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration3.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadGroup.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorage.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorageDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITracepoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBigIntegerValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIVoidType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/schema/CDebugger.exsd
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger2.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICGlobalVariableManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionAdapterFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/LogActionEnabler.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/ResumeActionEnabler.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CVariableFormat.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAddRegisterGroupHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICBreakpointFilterExtension.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICGlobalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICRegister.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IFormatSupport.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDisassemblyContextProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CGlobalVariableManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSettingsManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpointFilterExtension.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmSourceLine.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CCoreFileDebugTarget.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFloatingPointValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CIndexedValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CLocalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModule.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegister.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CType.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValueFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
delete mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblySourceLine.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/.classpath
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/.cvsignore
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/.options
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/.project
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/.settings/org.eclipse.jdt.core.prefs
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/ChangeLog
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/ChangeLog-2003
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/about.html
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/build.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EndSteppingRange.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ErrorInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExitInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Format.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MI2CDIException.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionObject.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DisconnectedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/MemoryChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CObject.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CoreFileConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Expression.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Instruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MappedSourceLocation.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MixedInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterGroup.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/TargetConfiguration.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorageDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/design.txt
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CLIProcessor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CommandQueue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CoreProcess.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/EventThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/IMITTY.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIException.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIFormat.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIProcess.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MISession.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/Queue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/SessionProcess.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/TxThread.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLICatch.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLICommand.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIExecAbort.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIHandle.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoLine.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoProc.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoProgram.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoSharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoSignals.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoThreads.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIJump.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIPType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLISharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLISignal.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLITargetAttach.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIWhatis.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/Command.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakAfter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakCondition.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakDelete.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakDisable.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakEnable.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakInsert.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakList.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MICommand.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataWriteMemory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataWriteRegisterValues.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSet.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetAutoSolib.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetBreakpointPending.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetEnvironment.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetNewConsole.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetSolibSearchPath.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetStopOnSolibEvents.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShow.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowAddressSize.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowDirectories.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowEndian.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowExitCode.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowPrompt.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowSolibSearchPath.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInfoSharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInterpreterExec.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInterpreterExecConsole.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackInfoDepth.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListArguments.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListFrames.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListLocals.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackSelectFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetDetach.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetDownload.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetSelect.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIThreadListIds.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIThreadSelect.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarAssign.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarCreate.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarDelete.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarEvaluateExpression.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoExpression.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoNumChildren.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoType.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarListChildren.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarSetFormat.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarShowAttributes.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarShowFormat.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarUpdate.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVersion.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/RawCommand.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoriesMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoriesMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoryDescriptor.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoryManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/StandardCommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/LinuxCLIInfoSharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/LinuxCLIInfoSharedLibraryInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/StandardLinuxCommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIInfoPID.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIInfoThreads.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIVarUpdate.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIVarUpdateInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOsCLIInfoThreadsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinCLIInfoSharedLibrary.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinCLIInfoSharedLibraryInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinMIEnvironmentCD.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinMIGDBSetAutoSolib.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointDeletedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointHitEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIDestroyedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIDetachedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIErrorEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIFunctionFinishedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIGDBExitEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorExitEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorSignalExitEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MILocationReachedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIMemoryChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIMemoryCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRegisterChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRegisterCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRunningEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibUnloadedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISignalChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISignalEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISteppingRangeEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIStoppedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIThreadCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIThreadExitEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarCreatedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarDeletedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIWatchpointScopeEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIWatchpointTriggerEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLICatchInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoProcInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoProgramInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoSharedLibraryInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoSignalsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoThreadsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIPTypeInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIWhatisInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIArg.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIAsm.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIAsyncRecord.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakInsertInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakListInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakWatchInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakpoint.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIConsoleStreamOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIConst.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataDisassembleInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataEvaluateExpressionInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListChangedRegistersInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListRegisterNamesInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListRegisterValuesInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataReadMemoryInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIEnvironmentPWDInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIExecAsyncOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowAddressSizeInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowDirectoriesInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndianInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowExitCodeInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowSolibSearchPathInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIList.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MILogStreamOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIMemory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MINotifyAsyncOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIOOBRecord.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIRegisterValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIResult.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIResultRecord.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIShared.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MISigHandle.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MISrcAsm.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackInfoDepthInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListArgumentsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListFramesInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListLocalsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStatusAsyncOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStreamRecord.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MITargetStreamOutput.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIThreadListIdsInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIThreadSelectInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MITuple.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIValue.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVar.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarChange.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarCreateInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarDeleteInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarEvaluateExpressionInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoExpressionInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoNumChildrenInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoTypeInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarShowAttributesInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarShowFormatInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarUpdateInfo.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/plugin.properties
delete mode 100755 debug/org.eclipse.cdt.debug.mi.core/plugin.xml
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/pom.xml
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/schema/commandFactories.exsd
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBProcess.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger2.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IGDBServerMILaunchConfigurationConstants.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MICoreUtils.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPluginResources.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MITTYAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MinGWDebugger.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/.classpath
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/.cvsignore
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/.project
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/.settings/org.eclipse.core.resources.prefs
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/.settings/org.eclipse.jdt.core.prefs
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/ChangeLog
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/META-INF/MANIFEST.MF
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/about.html
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/build.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/save_console.gif
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/verbose_mode_co.gif
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/plugin.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/pom.xml
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/ActionFilterAdapterFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/CygwinDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBTargetActionFilter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIHelpContextIds.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIUIConstants.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MinGWDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SWTUtil.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/CheckedListDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IDialogFieldListener.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IListAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IStringButtonAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/LayoutUtil.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ListDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogFieldGroup.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/Separator.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonStatusDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringDialogField.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/IMILaunchConfigurationComponent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/MIUIUtils.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/MiConsolePageParticipant.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/VerboseModeChangedEvent.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/IMiConsoleImagesConst.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleSaveAction.java
delete mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleVerboseModeAction.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/.classpath
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/.cvsignore
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/.project
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/Changelog
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/about.html
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/build.properties
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/.cvsignore
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/MapEntrySourceContainerTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/ProjectWithSpaceTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/pom.xml
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/resources/debugTest.zip
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStrings.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStringsTests.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui.tests/test.xml
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CRegisterManagerProxies.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/BinaryVariableFormatActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CanFormatObjectTester.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DecVariableFormatActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DisableVariablesActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/HexVariableFormatActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NaturalVariableFormatActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/VariableFormatActionDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AddRegisterGroupCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/EditRegisterGroupCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/LoadAllSymbolsCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/LoadSymbolsCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/RemoveRegisterGroupsCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/RestoreRegisterGroupsCommandHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ViewMemoryHandler.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdiFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyAnnotationModel.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyRenderingTypeDelegate.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementAdapterFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementLabelProviderFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugTargetContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDefaultViewerInputProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CRegisterManagerContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CRegisterManagerModelProxy.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CRegisterManagerProxy.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CRegisterManagerProxyMementoProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CStackFrameContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CStackFrameMementoProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CStackFrameViewerInputProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CThreadContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CVariableLabelProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CWatchExpressionFactoryAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CWatchExpressionFactoryAdapterFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/DefaultViewColumnPresentationFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/DisassemblyElementContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/DisassemblyElementLabelProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/DisassemblyElementProxy.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/DisassemblyToggleBreakpointAdapter.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/ElementAdapterMessages.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/ElementAdapterMessages.properties
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/RegistersViewColumnPresentation.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/RegistersViewColumnPresentationFactory.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/DebuggerTypesPage.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsContentProvider.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsView.java
delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsViewContentProvider.java
delete mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagCommandFactory.java
delete mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDebugger.java
delete mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagLaunchConfigurationDelegate.java
delete mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFilePrompter.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/ApplicationCDebuggerTab.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/AttachCDebuggerTab.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
delete mode 100644 launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java
diff --git a/cross/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF b/cross/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF
index be986389d68..f0a07fc5c49 100644
--- a/cross/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF
+++ b/cross/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
org.eclipse.cdt.launch,
- org.eclipse.cdt.debug.mi.core,
org.eclipse.cdt.debug.core,
org.eclipse.cdt.core,
org.eclipse.debug.ui,
@@ -19,7 +18,6 @@ Require-Bundle: org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.debug.core,
org.eclipse.core.resources,
org.eclipse.core.runtime,
- org.eclipse.cdt.debug.mi.ui,
org.eclipse.cdt.debug.ui,
org.eclipse.rse.files.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.cdt.dsf.gdb;bundle-version="3.0.0",
diff --git a/cross/org.eclipse.cdt.launch.remote/plugin.xml b/cross/org.eclipse.cdt.launch.remote/plugin.xml
index 21bf2341093..ded8010be4c 100644
--- a/cross/org.eclipse.cdt.launch.remote/plugin.xml
+++ b/cross/org.eclipse.cdt.launch.remote/plugin.xml
@@ -18,7 +18,7 @@ Anna Dushistova (Mentor Graphics) - code restructuring
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
index 9758edcee50..b349bf4dfe5 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
@@ -13,11 +13,9 @@
package org.eclipse.cdt.launch.remote;
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
import org.eclipse.debug.core.DebugPlugin;
-public interface IRemoteConnectionConfigurationConstants extends
- IGDBServerMILaunchConfigurationConstants {
+public interface IRemoteConnectionConfigurationConstants {
public static final String ATTR_REMOTE_CONNECTION =
DebugPlugin.getUniqueIdentifier() + ".REMOTE_TCP"; //$NON-NLS-1$
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
index c5bed1b11f5..5643b4d394c 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
@@ -26,15 +26,7 @@ package org.eclipse.cdt.launch.remote.launching;
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.ICDIDebugger2;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.GDBServerCDIDebugger2;
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
import org.eclipse.cdt.internal.launch.remote.Activator;
import org.eclipse.cdt.internal.launch.remote.Messages;
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
@@ -50,26 +42,12 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.IHostShellOutputListener;
public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
- private ICDISession dsession;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch
- */
@Override
public void launch(ILaunchConfiguration config, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
@@ -102,200 +80,8 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
e));
}
}
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- monitor.beginTask(Messages.RemoteRunLaunchDelegate_0, 100);
- setDefaultSourceLocator(launch, config);
- String debugMode = config
- .getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
- ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
- if (debugMode
- .equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
- Process remoteShellProcess = null;
- dsession = null;
- try {
- // Download the binary to the remote before debugging.
- monitor.setTaskName(Messages.RemoteRunLaunchDelegate_2);
- RSEHelper.remoteFileDownload(config, launch, exePath.toString(),
- remoteExePath, new SubProgressMonitor(monitor,
- 80));
- // Automatically start up the gdbserver. In the future
- // this should be expanded to launch
- // an arbitrary remote daemon.
- String gdbserver_port_number = config
- .getAttribute(
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
- String gdbserver_command = config
- .getAttribute(
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- String gdbserver_options = config
- .getAttribute(
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT);
- String command_arguments = gdbserver_options + " " //$NON-NLS-1$
- + ":" + gdbserver_port_number + " " //$NON-NLS-1$ //$NON-NLS-2$
- + RSEHelper.spaceEscapify(remoteExePath);
- if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
- command_arguments += " " + arguments; //$NON-NLS-1$
- monitor.setTaskName(Messages.RemoteRunLaunchDelegate_9);
- IHostShell remoteShell = null;
- try {
- remoteShell = RSEHelper.execCmdInRemoteShell(config, prelaunchCmd,
- gdbserver_command, command_arguments,
- new SubProgressMonitor(monitor, 5));
- } catch (Exception e1) {
- RSEHelper.abort(e1.getMessage(), e1,
- ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- // We cannot use a global variable because multiple launches
- // could access them at the same time. We need a different
- // variable for each launch, but we also need it be final.
- // Use a final array to do that.
- final boolean gdbServerReady[] = new boolean[1];
- gdbServerReady[0] = false;
-
- final Object lock = new Object();
- if (remoteShell != null) {
- remoteShell
- .addOutputListener(new IHostShellOutputListener() {
-
- public void shellOutputChanged(
- IHostShellChangeEvent event) {
- for (IHostOutput line : event
- .getLines()) {
- if (line.getString().contains(
- "Listening on port")) { //$NON-NLS-1$
- synchronized (lock) {
- gdbServerReady[0] = true;
- lock.notifyAll();
- }
- break;
- }
- }
- }
- });
-
- try {
- remoteShellProcess = new HostShellProcessAdapter(remoteShell) {
-
- @Override
- public synchronized void destroy() {
- ICDISession session = getSession();
- if (session != null) {
- try {
- session.terminate();
- } catch (CDIException e) {
- }
- }
- super.destroy();
- }
- };
- } catch (Exception e) {
- if (remoteShellProcess != null) {
- remoteShellProcess.destroy();
- }
- RSEHelper.abort(Messages.RemoteRunLaunchDelegate_7, e,
- ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- IProcess rsProcess = DebugPlugin
- .newProcess(
- launch,
- remoteShellProcess,
- Messages.RemoteRunLaunchDelegate_RemoteShell);
-
- // Now wait until gdbserver is up and running on the
- // remote host
- synchronized (lock) {
- while (gdbServerReady[0] == false) {
- if (monitor.isCanceled()
- || rsProcess.isTerminated()) {
- RSEHelper.abort(Messages.RemoteGdbLaunchDelegate_gdbserverFailedToStartErrorMessage, null,
- ICDTLaunchConfigurationConstants.ERR_DEBUGGER_NOT_INSTALLED);
- }
- try {
- lock.wait(300);
- } catch (InterruptedException e) {
- }
- }
- }
-
- // Pre-set configuration constants for the
- // GDBSERVERCDIDebugger to indicate how the gdbserver
- // was automatically started on the remote.
- // GDBServerCDIDebugger uses these to figure out how
- // to connect to the remote gdbserver.
- ILaunchConfigurationWorkingCopy wc = config
- .getWorkingCopy();
- wc
- .setAttribute(
- IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP,
- true);
- wc
- .setAttribute(
- IGDBServerMILaunchConfigurationConstants.ATTR_HOST,
- RSEHelper.getRemoteHostname(config));
- wc
- .setAttribute(
- IGDBServerMILaunchConfigurationConstants.ATTR_PORT,
- gdbserver_port_number);
- wc.doSave();
-
- // Default to using the GDBServerCDIDebugger.
- GDBServerCDIDebugger2 debugger = new GDBServerCDIDebugger2();
- dsession = ((ICDIDebugger2) debugger).createSession(
- launch, exePath.toFile(),
- new SubProgressMonitor(monitor, 15));
-
- boolean stopInMain = config
- .getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
- false);
- String stopSymbol = null;
- if (stopInMain)
- stopSymbol = launch
- .getLaunchConfiguration()
- .getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
- ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
-
- ICDITarget[] targets = dsession.getTargets();
- for (int i = 0; i < targets.length; i++) {
- Process process = targets[i].getProcess();
- IProcess iprocess = null;
- if (process != null) {
- iprocess = DebugPlugin.newProcess(launch,
- process, renderProcessLabel(exePath
- .toOSString()),
- getDefaultProcessMap());
- }
- CDIDebugModel.newDebugTarget(launch, project
- .getProject(),
- targets[i],
- renderProcessLabel("gdbserver debugger"), //$NON-NLS-1$
- iprocess, exeFile, true, false, stopSymbol,
- true);
- }
- }
- } catch (CoreException e) {
- try {
- if (dsession != null)
- dsession.terminate();
- if (remoteShellProcess != null)
- remoteShellProcess.destroy();
- } catch (CDIException e1) {
- // ignore
- }
- throw e;
- } finally {
- monitor.done();
- }
- }
-
- } else if (mode.equals(ILaunchManager.RUN_MODE)) {
+ if (mode.equals(ILaunchManager.RUN_MODE)) {
monitor.beginTask(Messages.RemoteRunLaunchDelegate_0, 100);
Process remoteProcess = null;
try {
@@ -329,8 +115,4 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
protected String getPluginID() {
return Activator.PLUGIN_ID;
}
-
- ICDISession getSession(){
- return dsession;
- }
}
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDebuggerTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDebuggerTab.java
deleted file mode 100644
index e90a1ef4728..00000000000
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDebuggerTab.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 PalmSource, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ewa Matejska (PalmSource)
- * Anna Dushistova (Mentor Graphics) - [314659] move remote launch/debug to DSF
- * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs
- *******************************************************************************/
-
-package org.eclipse.cdt.launch.remote.tabs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDebugConfiguration;
-import org.eclipse.cdt.launch.ui.CDebuggerTab;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-
-public class RemoteCDebuggerTab extends CDebuggerTab {
-
- private final static String DEFAULTS_SET = "org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET"; //$NON-NLS-1$
-
- public RemoteCDebuggerTab() {
- super(false);
- }
-
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- PlatformUI
- .getWorkbench()
- .getHelpSystem()
- .setHelp(getControl(),
- "org.eclipse.rse.internal.remotecdt.launchgroup"); //$NON-NLS-1$
- }
-
- static final private String REMOTE_GDB_DEBUGGER_NAME = "remote gdb/mi"; //$NON-NLS-1$
-
- public RemoteCDebuggerTab(boolean attachMode) {
- super(attachMode);
- }
-
- @Override
- protected void loadDebuggerComboBox(ILaunchConfiguration config,
- String selection) {
- ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault()
- .getDebugConfigurations();
- String defaultSelection = selection;
- List list = new ArrayList();
- for (int i = 0; i < debugConfigs.length; i++) {
- ICDebugConfiguration configuration = debugConfigs[i];
- if (configuration.getName().equals(REMOTE_GDB_DEBUGGER_NAME)) {
- list.add(configuration);
- // Select as default selection
- defaultSelection = configuration.getID();
- break;
- }
- }
- setInitializeDefault(defaultSelection.equals("") ? true : false); //$NON-NLS-1$
- loadDebuggerCombo(
- (ICDebugConfiguration[]) list.toArray(new ICDebugConfiguration[list
- .size()]), defaultSelection);
- }
-
- @Override
- public String getId() {
- return "org.eclipse.rse.remotecdt.launch.RemoteCDebuggerTab"; //$NON-NLS-1$
- }
-
- /*
- * When the launch configuration is created for Run mode, this Debugger tab
- * is not created because it is not used for Run mode but only for Debug
- * mode. When we then open the same configuration in Debug mode, the launch
- * configuration already exists and initializeFrom() is called instead of
- * setDefaults(). We therefore call setDefaults() ourselves and update the
- * configuration. If we don't then the user will be required to press Apply
- * to get the default settings saved. Bug 281970
- */
- @Override
- public void setDefaults(ILaunchConfigurationWorkingCopy config) {
- config.setAttribute(DEFAULTS_SET, true);
- super.setDefaults(config);
- }
-
- @Override
- public void initializeFrom(ILaunchConfiguration config) {
- try {
- if (config.hasAttribute(DEFAULTS_SET) == false) {
- ILaunchConfigurationWorkingCopy wc;
- wc = config.getWorkingCopy();
- setDefaults(wc);
- wc.doSave();
- }
- } catch (CoreException e) {
- }
- super.initializeFrom(config);
- }
-
-}
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
deleted file mode 100644
index 1aba2e8a4c0..00000000000
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2016 PalmSource, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ewa Matejska (PalmSource)
- *
- * Referenced GDBDebuggerPage code to write this.
- * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs
- *******************************************************************************/
-
-package org.eclipse.cdt.launch.remote.tabs;
-
-import org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage;
-import org.eclipse.cdt.internal.launch.remote.Messages;
-import org.eclipse.cdt.launch.remote.IRemoteConnectionConfigurationConstants;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The dynamic debugger tab for remote launches using gdb server.
- * The gdbserver settings are used to start a gdbserver session on the
- * remote and then to connect to it from the host. The DSDP-TM project is
- * used to accomplish this.
- */
-public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
-
- protected Text fGDBServerCommandText;
-
- protected Text fGDBServerPortNumberText;
-
- protected Text fGDBServerOptionsText;
-
- @Override
- public String getName() {
- return Messages.Remote_GDB_Debugger_Options;
- }
-
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- super.setDefaults(configuration);
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
- }
-
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- super.initializeFrom(configuration);
- String gdbserverCommand = null;
- String gdbserverPortNumber = null;
- String gdbserverOptions = null;
- try {
- gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- }
- catch( CoreException e ) {
- }
- try {
- gdbserverPortNumber = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
- }
- catch( CoreException e ) {
- }
- try {
- gdbserverOptions = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
- }
- catch( CoreException e ) {
- }
- fGDBServerCommandText.setText( gdbserverCommand );
- fGDBServerPortNumberText.setText( gdbserverPortNumber );
- fGDBServerOptionsText.setText( gdbserverOptions );
- }
-
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- super.performApply(configuration);
- String str = fGDBServerCommandText.getText();
- str.trim();
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, str );
- str = fGDBServerPortNumberText.getText();
- str.trim();
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
- str = fGDBServerOptionsText.getText();
- str.trim();
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
- }
-
- protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( Messages.Gdbserver_Settings_Tab_Name );
-
- Composite comp = new Composite(tabFolder, SWT.NULL);
- comp.setLayout(new GridLayout(1, true));
- comp.setLayoutData(new GridData(GridData.FILL_BOTH));
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
-
- Composite subComp = new Composite(comp, SWT.NULL);
- subComp.setLayout(new GridLayout(2, true));
- subComp.setLayoutData(new GridData(GridData.FILL_BOTH));
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- subComp.setFont( tabFolder.getFont() );
-
- Label label = new Label(subComp, SWT.LEFT);
- label.setText(Messages.Gdbserver_name_textfield_label);
- GridData gd = new GridData();
- label.setLayoutData( gd );
-
-
- fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(SWT.FILL, SWT.TOP, true, false);
- fGDBServerCommandText.setLayoutData(data);
- fGDBServerCommandText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- updateLaunchConfigurationDialog();
- }
- } );
- label = new Label(subComp, SWT.LEFT);
- label.setText(Messages.Port_number_textfield_label);
- gd = new GridData();
- label.setLayoutData( gd );
-
- fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- data = new GridData(SWT.FILL, SWT.TOP, true, false);
- fGDBServerPortNumberText.setLayoutData(data);
- fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- updateLaunchConfigurationDialog();
- }
- } );
- label = new Label(subComp, SWT.LEFT);
- label.setText(Messages.Gdbserver_options_textfield_label);
- gd = new GridData();
- label.setLayoutData( gd );
-
- fGDBServerOptionsText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- data = new GridData(SWT.FILL, SWT.TOP, true, false);
- fGDBServerOptionsText.setLayoutData(data);
- fGDBServerOptionsText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- updateLaunchConfigurationDialog();
- }
- } );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
- */
- @Override
- public void createTabs( TabFolder tabFolder ) {
- super.createTabs( tabFolder );
- createGdbserverSettingsTab( tabFolder );
- }
-}
-
diff --git a/debug/org.eclipse.cdt.debug.application.product/debug.product b/debug/org.eclipse.cdt.debug.application.product/debug.product
index e866d742b0e..6cfa627b3df 100644
--- a/debug/org.eclipse.cdt.debug.application.product/debug.product
+++ b/debug/org.eclipse.cdt.debug.application.product/debug.product
@@ -30,7 +30,6 @@
-
@@ -202,8 +201,6 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
-
-
diff --git a/debug/org.eclipse.cdt.debug.application.tests/StandaloneTests.launch b/debug/org.eclipse.cdt.debug.application.tests/StandaloneTests.launch
index f4274983f9c..d5f5c0e3bd9 100644
--- a/debug/org.eclipse.cdt.debug.application.tests/StandaloneTests.launch
+++ b/debug/org.eclipse.cdt.debug.application.tests/StandaloneTests.launch
@@ -11,7 +11,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
diff --git a/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF
index 671dbc8b21c..f762ac2a263 100644
--- a/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF
@@ -8,8 +8,6 @@ Bundle-Vendor: %provider
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.cdt.debug.ui;bundle-version="7.3.0",
- org.eclipse.cdt.debug.mi.core;bundle-version="7.3.0",
- org.eclipse.cdt.debug.mi.ui;bundle-version="6.1.1",
org.eclipse.cdt.dsf;bundle-version="2.4.0",
org.eclipse.cdt.dsf.gdb;bundle-version="4.2.0",
org.eclipse.cdt.dsf.gdb.ui;bundle-version="2.4.0",
diff --git a/debug/org.eclipse.cdt.debug.application/scripts/config.ini b/debug/org.eclipse.cdt.debug.application/scripts/config.ini
index e758d22ce96..e09364a4d38 100644
--- a/debug/org.eclipse.cdt.debug.application/scripts/config.ini
+++ b/debug/org.eclipse.cdt.debug.application/scripts/config.ini
@@ -2,6 +2,6 @@
#Fri Dec 20 17:38:27 EST 2013
osgi.install.area=file\:$eclipse.home$
osgi.framework=file\:$eclipse.home$/plugins/$osgi.jar$
-osgi.bundles=org.eclipse.cdt.core.linux,org.eclipse.linuxtools.cdt.libhover.library.docs,org.eclipse.cdt.core.native,org.eclipse.core.net,org.eclipse.e4.core.di.extensions,org.eclipse.cdt.debug.ui.memory.floatingpoint,org.eclipse.ui.editors,org.eclipse.equinox.ds@1\:start,org.eclipse.search,org.eclipse.text,org.eclipse.jface.databinding,org.eclipse.cdt.debug.ui.memory.search,org.eclipse.debug.core,org.apache.batik.util,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.e4.ui.widgets,org.eclipse.cdt.debug.core,org.eclipse.ui,org.eclipse.cdt.make.core,javax.annotation,org.eclipse.equinox.registry,org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.traditional,org.eclipse.cdt.ui,org.eclipse.ui.ide,org.w3c.dom.svg,org.eclipse.jface,org.eclipse.ltk.ui.refactoring,org.w3c.dom.smil,org.eclipse.e4.ui.model.workbench,org.eclipse.equinox.bidi,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.di,org.eclipse.debug.ui,org.eclipse.e4.ui.bindings,org.eclipse.core.contenttype,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.views,org.eclipse.emf.ecore.change,org.eclipse.equinox.app,org.eclipse.e4.ui.services,org.eclipse.ant.core,org.eclipse.equinox.p2.core,org.eclipse.cdt.core,org.eclipse.cdt.debug.application,org.eclipse.cdt.debug.application.doc,org.eclipse.core.resources,org.eclipse.team.ui,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.p2.engine,org.eclipse.cdt.debug.ui,org.eclipse.ui.views.properties.tabbed,org.eclipse.ui.views.log,org.eclipse.help,org.eclipse.help.ui,org.eclipse.help.base,org.eclipse.help.webapp,org.eclipse.equinox.jsp.jasper,org.eclipse.equinox.jsp.jasper.registry,org.apache.jasper.glassfish,org.apache.lucene.core,org.apache.lucene.analysis,org.eclipse.equinox.http.jetty,org.eclipse.equinox.http.registry,org.eclipse.jetty.http,org.eclipse.equinox.http.servlet,org.eclipse.jetty.io,org.eclipse.jetty.server,org.eclipse.jetty.servlet,org.eclipse.jetty.util,org.eclipse.jetty.continuation,org.eclipse.jetty.security,javax.servlet.jsp,javax.el,org.eclipse.core.filesystem,org.eclipse.equinox.event,org.eclipse.cdt.dsf.gdb.ui,org.eclipse.ltk.core.refactoring,org.eclipse.cdt.debug.mi.ui,com.ibm.icu,org.eclipse.swt,org.eclipse.core.filebuffers,org.eclipse.e4.ui.workbench.addons.swt,javax.inject,$swt.plugin$,org.eclipse.core.databinding.observable,org.eclipse.core.jobs,org.eclipse.ui.forms,org.eclipse.e4.core.contexts,javax.xml,org.eclipse.core.variables,org.eclipse.ui.navigator,org.eclipse.e4.core.commands,org.eclipse.core.databinding,org.eclipse.core.commands,org.eclipse.ui.workbench,org.eclipse.equinox.util,org.eclipse.cdt.launch,org.w3c.css.sac,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.cdt.managedbuilder.core,org.eclipse.jface.text,org.eclipse.cdt.managedbuilder.gnu.ui,org.eclipse.equinox.p2.metadata,org.eclipse.emf.ecore.xmi,org.eclipse.emf.common,org.eclipse.cdt.gdb,org.eclipse.compare.core,$linux.plugin$,org.eclipse.ui.console,org.eclipse.cdt.dsf.gdb,javax.servlet,org.eclipse.equinox.p2.repository,org.eclipse.linuxtools.cdt.libhover.glibc,org.eclipse.equinox.security,org.eclipse.compare,org.eclipse.core.runtime@start,org.eclipse.cdt.dsf,org.eclipse.osgi.services,org.eclipse.e4.ui.workbench3,org.eclipse.equinox.preferences,org.w3c.dom.events,org.eclipse.linuxtools.cdt.libhover,org.eclipse.cdt.debug.mi.core,org.eclipse.ui.navigator.resources,org.eclipse.e4.ui.css.core,org.eclipse.ui.workbench.texteditor,org.eclipse.core.expressions,org.eclipse.e4.ui.css.swt.theme,org.eclipse.core.databinding.property,org.eclipse.emf.ecore,org.eclipse.e4.core.services,org.eclipse.cdt.gdb.ui,org.apache.batik.util.gui,org.eclipse.e4.core.di,$fs.plugin$,org.eclipse.team.core,org.eclipse.cdt.debug.ui.memory.transport,org.eclipse.equinox.p2.metadata.repository,org.eclipse.e4.ui.css.swt,org.apache.batik.css,org.eclipse.e4.emf.xpath,org.apache.commons.jxpath,org.tukaani.xz,org.eclipse.e4.core.di.annotations,com.google.gson
+osgi.bundles=org.eclipse.cdt.core.linux,org.eclipse.linuxtools.cdt.libhover.library.docs,org.eclipse.cdt.core.native,org.eclipse.core.net,org.eclipse.e4.core.di.extensions,org.eclipse.cdt.debug.ui.memory.floatingpoint,org.eclipse.ui.editors,org.eclipse.equinox.ds@1\:start,org.eclipse.search,org.eclipse.text,org.eclipse.jface.databinding,org.eclipse.cdt.debug.ui.memory.search,org.eclipse.debug.core,org.apache.batik.util,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.e4.ui.widgets,org.eclipse.cdt.debug.core,org.eclipse.ui,org.eclipse.cdt.make.core,javax.annotation,org.eclipse.equinox.registry,org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.traditional,org.eclipse.cdt.ui,org.eclipse.ui.ide,org.w3c.dom.svg,org.eclipse.jface,org.eclipse.ltk.ui.refactoring,org.w3c.dom.smil,org.eclipse.e4.ui.model.workbench,org.eclipse.equinox.bidi,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.di,org.eclipse.debug.ui,org.eclipse.e4.ui.bindings,org.eclipse.core.contenttype,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.views,org.eclipse.emf.ecore.change,org.eclipse.equinox.app,org.eclipse.e4.ui.services,org.eclipse.ant.core,org.eclipse.equinox.p2.core,org.eclipse.cdt.core,org.eclipse.cdt.debug.application,org.eclipse.cdt.debug.application.doc,org.eclipse.core.resources,org.eclipse.team.ui,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.p2.engine,org.eclipse.cdt.debug.ui,org.eclipse.ui.views.properties.tabbed,org.eclipse.ui.views.log,org.eclipse.help,org.eclipse.help.ui,org.eclipse.help.base,org.eclipse.help.webapp,org.eclipse.equinox.jsp.jasper,org.eclipse.equinox.jsp.jasper.registry,org.apache.jasper.glassfish,org.apache.lucene.core,org.apache.lucene.analysis,org.eclipse.equinox.http.jetty,org.eclipse.equinox.http.registry,org.eclipse.jetty.http,org.eclipse.equinox.http.servlet,org.eclipse.jetty.io,org.eclipse.jetty.server,org.eclipse.jetty.servlet,org.eclipse.jetty.util,org.eclipse.jetty.continuation,org.eclipse.jetty.security,javax.servlet.jsp,javax.el,org.eclipse.core.filesystem,org.eclipse.equinox.event,org.eclipse.cdt.dsf.gdb.ui,org.eclipse.ltk.core.refactoring,com.ibm.icu,org.eclipse.swt,org.eclipse.core.filebuffers,org.eclipse.e4.ui.workbench.addons.swt,javax.inject,$swt.plugin$,org.eclipse.core.databinding.observable,org.eclipse.core.jobs,org.eclipse.ui.forms,org.eclipse.e4.core.contexts,javax.xml,org.eclipse.core.variables,org.eclipse.ui.navigator,org.eclipse.e4.core.commands,org.eclipse.core.databinding,org.eclipse.core.commands,org.eclipse.ui.workbench,org.eclipse.equinox.util,org.eclipse.cdt.launch,org.w3c.css.sac,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.cdt.managedbuilder.core,org.eclipse.jface.text,org.eclipse.cdt.managedbuilder.gnu.ui,org.eclipse.equinox.p2.metadata,org.eclipse.emf.ecore.xmi,org.eclipse.emf.common,org.eclipse.cdt.gdb,org.eclipse.compare.core,$linux.plugin$,org.eclipse.ui.console,org.eclipse.cdt.dsf.gdb,javax.servlet,org.eclipse.equinox.p2.repository,org.eclipse.linuxtools.cdt.libhover.glibc,org.eclipse.equinox.security,org.eclipse.compare,org.eclipse.core.runtime@start,org.eclipse.cdt.dsf,org.eclipse.osgi.services,org.eclipse.e4.ui.workbench3,org.eclipse.equinox.preferences,org.w3c.dom.events,org.eclipse.linuxtools.cdt.libhover,org.eclipse.ui.navigator.resources,org.eclipse.e4.ui.css.core,org.eclipse.ui.workbench.texteditor,org.eclipse.core.expressions,org.eclipse.e4.ui.css.swt.theme,org.eclipse.core.databinding.property,org.eclipse.emf.ecore,org.eclipse.e4.core.services,org.eclipse.cdt.gdb.ui,org.apache.batik.util.gui,org.eclipse.e4.core.di,$fs.plugin$,org.eclipse.team.core,org.eclipse.cdt.debug.ui.memory.transport,org.eclipse.equinox.p2.metadata.repository,org.eclipse.e4.ui.css.swt,org.apache.batik.css,org.eclipse.e4.emf.xpath,org.apache.commons.jxpath,org.tukaani.xz,org.eclipse.e4.core.di.annotations,com.google.gson
osgi.configuration.cascaded=false
osgi.bundles.defaultStartLevel=4
diff --git a/debug/org.eclipse.cdt.debug.core/.classpath b/debug/org.eclipse.cdt.debug.core/.classpath
index 7b8d37a545c..3bc247511f0 100644
--- a/debug/org.eclipse.cdt.debug.core/.classpath
+++ b/debug/org.eclipse.cdt.debug.core/.classpath
@@ -1,8 +1,7 @@
-
-
+
diff --git a/debug/org.eclipse.cdt.debug.core/.settings/org.eclipse.jdt.core.prefs b/debug/org.eclipse.cdt.debug.core/.settings/org.eclipse.jdt.core.prefs
index 97f68417d0f..cccb94947c5 100644
--- a/debug/org.eclipse.cdt.debug.core/.settings/org.eclipse.jdt.core.prefs
+++ b/debug/org.eclipse.cdt.debug.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,12 @@
-#Mon Oct 17 17:40:49 PDT 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
@@ -18,6 +24,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -25,33 +32,50 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
@@ -61,14 +85,17 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.7
diff --git a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
index b3edf629abe..6a0ca4b12e0 100644
--- a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
@@ -2,16 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.core; singleton:=true
-Bundle-Version: 7.8.0.qualifier
+Bundle-Version: 8.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.core.CDebugCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.cdt.debug.core,
org.eclipse.cdt.debug.core.breakpointactions,
- org.eclipse.cdt.debug.core.cdi,
- org.eclipse.cdt.debug.core.cdi.event,
- org.eclipse.cdt.debug.core.cdi.model,
- org.eclipse.cdt.debug.core.cdi.model.type,
org.eclipse.cdt.debug.core.command,
org.eclipse.cdt.debug.core.disassembly,
org.eclipse.cdt.debug.core.executables,
diff --git a/debug/org.eclipse.cdt.debug.core/build.properties b/debug/org.eclipse.cdt.debug.core/build.properties
index df50b0ab8b5..9862f2ae9c2 100644
--- a/debug/org.eclipse.cdt.debug.core/build.properties
+++ b/debug/org.eclipse.cdt.debug.core/build.properties
@@ -20,6 +20,5 @@ javadoc.packages = org.eclipse.cdt.debug.core.*,\
org.eclipse.cdt.debug.core.cdi.model.*
src.includes = schema/,\
about.html
-source.. = src/,\
- cdi/
+source.. = src/
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/CDIException.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/CDIException.java
deleted file mode 100644
index c63b55f967e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/CDIException.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents a failure in the CDI model operations.
- *
- * @since Jul 9, 2002
- */
-public class CDIException extends Exception {
-
- /**
- * All serializable objects should have a stable serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
- String details = ""; //$NON-NLS-1$
-
- public CDIException() {
- super();
- }
-
- public CDIException(String s) {
- super(s);
- }
-
- public CDIException(String s, String d) {
- super(s);
- details = d;
- }
-
- /**
- * Returns a more details message(if any).
- */
- public String getDetailMessage() {
- return details;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return super.toString() + '['+ getDetailMessage() + ']';
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIAddressLocation.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIAddressLocation.java
deleted file mode 100644
index 1587bb5c7c0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIAddressLocation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import java.math.BigInteger;
-
-/**
- *
- * Represents a line location in the debuggable program.
- *
- */
-public interface ICDIAddressLocation extends ICDILocation {
-
- /**
- * Returns the address of this location.
- *
- * @return BigInteger - the address of this location
- */
- BigInteger getAddress();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointHit.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointHit.java
deleted file mode 100644
index 64c7a51a74a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointHit.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-
-/**
- *
- * Represents an information provided by the session when the program
- * stopped by a breakpoint.
- *
- * @since Aug 27, 2002
- */
-public interface ICDIBreakpointHit extends ICDISessionObject {
- /**
- * Returns the breakpoint that stopped the program.
- *
- * @return the breakpoint that stopped the program
- */
- ICDIBreakpoint getBreakpoint();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java
deleted file mode 100644
index 807ef512425..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents a break condition.
- *
- * @since Jul 9, 2002
- */
-public interface ICDICondition {
- /**
- * Returns the condition expression.
- *
- * @return the condition expression
- */
- String getExpression();
-
- /**
- * Returns the ignore count of this condition.
- *
- * @return the ignore count of this condition
- */
- int getIgnoreCount();
-
- /**
- * Returns the thread Ids for this condition.
- *
- * @return the thread Ids for this condition.
- */
- String[] getThreadIds();
-
- boolean equals(ICDICondition cond);
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEndSteppingRange.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEndSteppingRange.java
deleted file mode 100644
index c8566353e74..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEndSteppingRange.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents an information provided by the session when a step command
- * is completed.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIEndSteppingRange extends ICDISessionObject {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIErrorInfo.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIErrorInfo.java
deleted file mode 100644
index b57b03b3d89..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIErrorInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents an information provided by the session when the program
- * exited.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIErrorInfo extends ICDISessionObject {
-
- /**
- * Returns the error message.
- */
- String getMessage();
-
- /**
- * Returns a more verbatim error message(if any).
- */
- String getDetailMessage();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventBreakpointHit.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventBreakpointHit.java
deleted file mode 100644
index 6d800f81616..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventBreakpointHit.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- * Represents an information provided by the session when the program is
- * stopped by an event breakpoint
- * @since 7.0
- */
-public interface ICDIEventBreakpointHit extends ICDISessionObject {
- /**
- * Return the type of event breakpoint, as reported by the debugger backend
- * (e.g., gdb) when it reports the target suspended
- */
- String getEventBreakpointType();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventManager.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventManager.java
deleted file mode 100644
index f6232f4ce9c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIEventManager.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-
-/**
- *
- * Clients interested in the CDI model change notification may
- * register with this object.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIEventManager extends ICDISessionObject {
-
- /**
- * Adds the given listener to the collection of registered
- * event listeners. Has no effect if an identical listener is
- * already registered.
- *
- * @param listener - the listener to add
- */
- void addEventListener( ICDIEventListener listener );
-
- /**
- * Removes the given listener from the collection of registered
- * event listeners. Has no effect if an identical listener is not
- * already registered.
- *
- * @param listener - the listener to remove
- */
- void removeEventListener( ICDIEventListener listener );
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIExitInfo.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIExitInfo.java
deleted file mode 100644
index b5f88e96b0a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIExitInfo.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents an information provided by the session when the program
- * exited.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIExitInfo extends ICDISessionObject {
-
- /**
- * Returns an exit code.
- *
- * @return an exit code
- */
- int getCode();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFileLocation.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFileLocation.java
deleted file mode 100644
index 7232ba7c5b7..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFileLocation.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-public interface ICDIFileLocation extends ICDILocation {
-
- /**
- * Returns the source file of this location or null
- * if the source file is unknown.
- *
- * @return the source file of this location
- */
- String getFile();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormat.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormat.java
deleted file mode 100644
index e2bfcefb13c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormat.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- * Format constants.
- */
-public interface ICDIFormat {
-
- final static int NATURAL = 0;
- final static int DECIMAL = 1;
- final static int BINARY = 2;
- final static int OCTAL = 3;
- final static int HEXADECIMAL = 4;
- final static int FLOAT = 5;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormattable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormattable.java
deleted file mode 100644
index 870bc506a34..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFormattable.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 Freescale, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-
-/**
- * The CDI client's implementation of ICDIValue should implement this interface
- * if it wants to dictate the variable/register's natural format. If it doesn't,
- * CDT will provide a default behavior (e.g., all integral, non-pointer
- * ICDIValue variants will display as decimal).
- *
- * CDT will exercise this interface only for ICDIValue's whose natural
- * format isn't obvious or implied. For example, it will not be exercised for
- * ICDIDoubleValue, ICDICharValue or ICDIBoolValue, to name a few.
- *
- *
- */
-public interface ICDIFormattable {
- /**
- * Called when there is no obvious or implied natural format for the
- * ICDIValue.
- *
- * @return one of the ICDIFormat constants, excluding 'NATURAL' and 'OCTAL'.
- * Octal is not supported simply because the general support for it
- * is lacking in CDT (apparently no one is asking for it).
- * @throws CDIException
- */
- int getNaturalFormat() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionFinished.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionFinished.java
deleted file mode 100644
index 0e1d81942c0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionFinished.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-
-/*
- * ICDIFunctionFinished
- */
-public interface ICDIFunctionFinished extends ICDIEndSteppingRange {
-
- /**
- * Return the type of the return value of
- * the function.
- *
- * @return ICDIType returnType value
- */
- ICDIType getReturnType() throws CDIException;
-
- /**
- * The return value of the function.
- *
- * @return
- */
- ICDIValue getReturnValue() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionLocation.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionLocation.java
deleted file mode 100644
index a01da39ec4a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIFunctionLocation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents a file:function location in the debuggable program.
- *
- */
-public interface ICDIFunctionLocation extends ICDIFileLocation {
-
- /**
- * Returns the function of this location or null
- * if the function is unknown.
- *
- * @return the function of this location
- */
- String getFunction();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILineLocation.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILineLocation.java
deleted file mode 100644
index 622db49c462..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILineLocation.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents a file:line location in the debuggable program.
- *
- */
-public interface ICDILineLocation extends ICDIFileLocation {
-
- /**
- * Returns the line number of this location or 0
- * if the line number is unknown.
- *
- * @return the line number of this location
- */
- int getLineNumber();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocation.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocation.java
deleted file mode 100644
index c0936d78230..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocation.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents a location in the debuggable program.
- *
- */
-public interface ICDILocation {
-
- /**
- * Return true if both locations refer to the same place.
- */
- boolean equals(ICDILocation location);
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocator.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocator.java
deleted file mode 100644
index 6f8760de0dc..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDILocator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- * Locator contains information file:function:line:Address
- */
-public interface ICDILocator extends ICDIFileLocation, ICDILineLocation, ICDIFunctionLocation, ICDIAddressLocation {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java
deleted file mode 100644
index 16a7ba9a5f0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-
-/**
- *
- * Represents a debug session.
- *
- * @since Jun 28, 2002
- */
-public interface ICDISession {
- /**
- * Returns all the debug targets associatd with this sesion,
- * or an empty collection if no debug targets are associated
- * with this session.
- *
- * @return an array of debug targets
- */
- ICDITarget[] getTargets();
-
- /**
- * Sets the value of a debug session attribute.
- *
- * @param key the attribute key
- * @param value the attribute value
- */
- void setAttribute(String key, String value);
-
- /**
- * Returns the value of a debug session attribute.
- *
- * @param key the attribute key
- * @return value the attribute value, or null if undefined
- */
- String getAttribute(String key);
-
- /**
- * Returns the event manager of this debug session.
- *
- * @return the event manager
- */
- ICDIEventManager getEventManager();
-
- /**
- * Returns the configuration description of this debug session.
- *
- * @return the configuration description
- */
- ICDISessionConfiguration getConfiguration();
-
- /**
- * Causes this element to terminate, generating a KIND_TERMINATE event.
- *
- * @exception CDIException on failure. Reasons include:
- */
- void terminate() throws CDIException;
-
- /**
- * Gaves direct access to the underlying debugger process.
- * @return the debugger process.
- */
- Process getSessionProcess() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionConfiguration.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionConfiguration.java
deleted file mode 100644
index 957fcb22b82..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionConfiguration.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- * Describes the configuration of debug session.
- *
- * @since Aug 6, 2002
- */
-public interface ICDISessionConfiguration extends ICDISessionObject {
-
- /**
- * Returns whether the session should be terminated when the inferior exits.
- *
- * @return whether the session be terminated when the inferior exits
- */
- boolean terminateSessionOnExit();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionObject.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionObject.java
deleted file mode 100644
index d8d0a89d288..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISessionObject.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- *
- * Represents an object associated with a debug session.
- *
- * @since Jul 9, 2002
- */
-public interface ICDISessionObject {
-
- /**
- * Returns the debug session this object is associated with.
- *
- * @return the debug session this object is associated with
- */
- ICDISession getSession();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISharedLibraryEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISharedLibraryEvent.java
deleted file mode 100644
index f6e46b050c9..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISharedLibraryEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-
-/**
- *
- * Represents an information provided by the session when the program
- * stopped by a shared libary event.
- *
- * @since Aug 18, 2003
- */
-public interface ICDISharedLibraryEvent extends ICDISessionObject {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalExitInfo.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalExitInfo.java
deleted file mode 100644
index 50b4f96be47..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalExitInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-/**
- * Represents information provided by the session when the program exited.
- *
- */
-public interface ICDISignalExitInfo extends ICDISessionObject {
-
- /**
- * Method getName.
- * @return String
- */
- String getName();
-
- /**
- * Method getDescription.
- * @return String
- */
- String getDescription();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalReceived.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalReceived.java
deleted file mode 100644
index c95d864a780..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISignalReceived.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-
-/**
- *
- * Represents a signal.
- *
- * @since Jul 10, 2002
- */
-public interface ICDISignalReceived extends ICDISessionObject {
-
- /**
- * Method getSignal.
- * @return ICDISignal
- */
- ICDISignal getSignal();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceManager.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceManager.java
deleted file mode 100644
index 45cb0373fce..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceManager.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDITracepoint;
-
-/**
- * Manages the collection of registered tracepoints and trace snapshoits
- * in the debug session. Provides methods to control tracing.
- *
- * @since May 15, 2003
- */
-public interface ICDITraceManager extends ICDISessionObject {
- /**
- * Returns a collection of all tracepoints set for this session.
- * Returns an empty array if no tracepoints are set.
- *
- * @return a collection of all tracepoints set for this session
- * @throws CDIException on failure. Reasons include:
- */
- ICDITracepoint[] getTracepoints() throws CDIException;
-
- /**
- * Deletes the given tracepoint.
- *
- * @param tracepoint - a tracepoint to be deleted
- * @throws CDIException on failure. Reasons include:
- */
- void deleteTracepoint( ICDITracepoint tracepoint ) throws CDIException;
-
- /**
- * Deletes the given array of tracepoints.
- *
- * @param tracepoints - the array of tracepoints to be deleted
- * @throws CDIException on failure. Reasons include:
- */
- void deleteTracepoints( ICDITracepoint[] tracepoints ) throws CDIException;
-
- /**
- * Deletes all tracepoints.
- *
- * @throws CDIException on failure. Reasons include:
- */
- void deleteAllTracepoints() throws CDIException;
-
- /**
- * Sets a tracepoint at the given location.
- * The tracepoint is set acording to the choices:
- *
- * if location.getFile() != null then
- * if location.getFunction() != null then
- * tracepoint = file:function
- * else
- * tracepoint = file:line
- * else if (location.getFuntion() != null) then
- * tracepoint = function
- * else if (location.getLineNumber() != 0 then
- * tracepoint = line
- * else
- * tracepoint = address
- * end
- *
- *
- * @param location - the location
- * @return a tracepoint
- * @throws CDIException on failure. Reasons include:
- */
- ICDITracepoint setTracepoint( ICDILocation location ) throws CDIException;
-
- /**
- * Allows the manager to interrupt the excution of program
- * when setting a tracepoint.
- */
- void allowProgramInterruption( boolean allow );
-
- /**
- * Starts the tracing and begins collecting data.
- *
- * @throws CDIException on failure. Reasons include:
- */
- void startTracing() throws CDIException;
-
- /**
- * Stops the tracing and ends collecting data.
- *
- * @throws CDIException on failure. Reasons include:
- */
- void stopTracing() throws CDIException;
-
- /**
- * Returns the status of tracing.
- *
- * @return the status of tracing
- * @throws CDIException on failure. Reasons include:
- */
- boolean isTracing() throws CDIException;
-
- /**
- * Enables/disables the snapshot debugging mode.
- *
- * @param enabled true to enable, and false
- * to disable
- * @throws CDIException on failure. Reasons include:
- */
- void enableSnapshotMode( boolean enabled ) throws CDIException;
-
- /**
- * Returns all trace snapshots for this session.
- *
- * @return all trace snapshots for this session
- * @throws CDIException on failure. Reasons include:
- */
- ICDITraceSnapshot[] getSnapshots() throws CDIException;
-
- /**
- * Returns all trace snapshots associated with the given tracepoints.
- *
- * @param tracepoints - an array of tracepoints
- * @return all trace snapshots associated with the given tracepoints
- * @throws CDIException on failure. Reasons include:
- */
- ICDITraceSnapshot[] getSnapshots( ICDITracepoint[] tracepoints ) throws CDIException;
-
- /**
- * Returns all trace snapshots associated with the given locations.
- *
- * @param locations - an array of locations
- * @return all trace snapshots associated with the given locations
- * @throws CDIException on failure. Reasons include:
- */
- ICDITraceSnapshot[] getSnapshots( ICDILocation[] locations ) throws CDIException;
-
- /**
- * Creates an ICDILocation object for given file name and line number or function.
- *
- * @param file - a file name
- * @param function - a function name
- * @param line - a line number
- * @return an ICDILocation object
- */
- ICDILocation createLocation( String file, String function, int line );
-
- /**
- * Creates an ICDILocation object for given address.
- *
- * @param address - an address
- * @return an ICDILocation object
- */
- ICDILocation createLocation( BigInteger address );
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceSnapshot.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceSnapshot.java
deleted file mode 100644
index 5ecfbfccd7b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDITraceSnapshot.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITracepoint;
-
-/**
- * Represents a trace snapshot in the debug session.
- *
- * @since May 15, 2003
- */
-public interface ICDITraceSnapshot extends ICDISessionObject {
-
- /**
- * Returns the number of this snapshot.
- *
- * @return the number of this snapshot
- */
- int getNumber();
-
- /**
- * Selects this snapshot.
- *
- * @throws CDIException on failure. Reasons include:
- */
- void select() throws CDIException;
-
- /**
- * Returns the data collected at this snapshot.
- *
- * @return the data collected at this snapshot
- * @throws CDIException on failure. Reasons include:
- */
- ICDIObject[] getData() throws CDIException;
-
- /**
- * Returns the array of tracepoints associated with this snapshot.
- *
- * @return array of tracepoints
- */
- ICDITracepoint[] getTracepoints();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointScope.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointScope.java
deleted file mode 100644
index e39db7a2149..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointScope.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-
-/**
- *
- * Represents an information provided by the session when a watchpoint
- * is going out of scope.
- *
- * @since Aug 27, 2002
- */
-public interface ICDIWatchpointScope extends ICDISessionObject {
- /**
- * Returns the out of scope watchpoint.
- *
- * @return the watchpoint
- */
- ICDIWatchpoint getWatchpoint();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointTrigger.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointTrigger.java
deleted file mode 100644
index 4f53301d94a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIWatchpointTrigger.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-
-/**
- *
- * Represents an information provided by the session when a watchpoint
- * is triggered.
- *
- * @since Aug 27, 2002
- */
-public interface ICDIWatchpointTrigger extends ICDISessionObject {
- /**
- * Returns the triggered watchpoint.
- *
- * @return the triggered watchpoint
- */
- ICDIWatchpoint getWatchpoint();
-
- /**
- * Returns the old value of the watching expression.
- *
- * @return the old value of the watching expression
- */
- String getOldValue();
-
- /**
- * Returns the new value of the watching expression.
- *
- * @return the new value of the watching expression
- */
- String getNewValue();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointMovedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointMovedEvent.java
deleted file mode 100644
index 4329e90ad1c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointMovedEvent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-
-/**
- *
- * Notifies that a breakpoint has changed location.
- */
-
-public interface ICDIBreakpointMovedEvent extends ICDIEvent {
-
- /** Returns the new location for the breakpoint.
- * @return the breakpoint's new location.
- */
- ICDILocator getNewLocation();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointProblemEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointProblemEvent.java
deleted file mode 100644
index 827fbd73730..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIBreakpointProblemEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-
-/**
- *
- * Notifies that a breakpoint problem has occurred.
- */
-public interface ICDIBreakpointProblemEvent {
-
- /** The problem type is a string that identifies specific
- * kinds of breakproblems.
- * @return problem type name
- */
- String getProblemType();
-
- /** The CDI breakpoint that has the problem
- * @return the cdi breakpoint that has the problem
- */
- ICDIBreakpoint getBreakpoint();
-
- /** A description of the problem.
- * This will be presented in the problems view.
- * @return a description of the problem
- */
- String getDescription();
-
- /** The severity code maps to the IMarker.SEVERITY_XXX constants.
- * @return severity code.
- */
- int getSeverity();
-
- /** Indicated that existing problems of this type and at this
- * breakpoint's location will be removed, no new ones will
- * be added.
- * @return only remove existing problems
- */
- boolean removeOnly();
-
- /** Indicated that any existing problems of this type
- * and at this breakpoint's location will be removed
- * before the new problem is added.
- * @return remove any existing markers
- */
- boolean removeExisting();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIChangedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIChangedEvent.java
deleted file mode 100644
index e21a0db19ba..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIChangedEvent.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has changed.
- * Can be originated by any CDI model object.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIChangedEvent extends ICDIEvent {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDICreatedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDICreatedEvent.java
deleted file mode 100644
index 2ad8f72bede..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDICreatedEvent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has been created.
- * The originators:
- *
- *
target (ICDITarget)
- *
thread (ICDIThread)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDICreatedEvent extends ICDIEvent {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDestroyedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDestroyedEvent.java
deleted file mode 100644
index ebd0fb08017..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDestroyedEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has terminated.
- * The originators:
- *
- *
target (ICDITarget)
- *
thread (ICDIThread)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDIDestroyedEvent extends ICDIEvent {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDisconnectedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDisconnectedEvent.java
deleted file mode 100644
index f1986b93f79..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIDisconnectedEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has disconnected.
- * The originators:
- *
- *
target (ICDITarget)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDIDisconnectedEvent extends ICDIEvent {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEvent.java
deleted file mode 100644
index 60f07c331fb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-
-/**
- *
- * A base interface for all CDI events.
- *
- * @since Jul 18, 2002
- */
-public interface ICDIEvent {
- /**
- * The CDI object on which the event initially occurred.
- *
- * @return the CDI object on which the event initially occurred
- */
- ICDIObject getSource();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEventListener.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEventListener.java
deleted file mode 100644
index b2b5c7fe89c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIEventListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * An event listener registers with the event manager to receive event
- * notification from the CDI model objects.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIEventListener {
- /**
- * Notifies this listener of the given event.
- *
- * @param event - the event
- */
- void handleDebugEvents(ICDIEvent[] event);
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExecutableReloadedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExecutableReloadedEvent.java
deleted file mode 100644
index 75a8e1544d2..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExecutableReloadedEvent.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that an executable had been reloaded, perhaps after being rebuilt.
- */
-
-public interface ICDIExecutableReloadedEvent extends ICDIEvent {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExitedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExitedEvent.java
deleted file mode 100644
index d4d24ced639..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIExitedEvent.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-
-/**
- *
- * Notifies that the program has exited.
- * The originators:
- *
- *
target (ICDITarget)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDIExitedEvent extends ICDIDestroyedEvent {
- /**
- * Returns the information provided by the session when program
- * is exited.
- *
- * @return the exit information
- */
- ICDISessionObject getReason();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIMemoryChangedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIMemoryChangedEvent.java
deleted file mode 100644
index a0f2609a29b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIMemoryChangedEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import java.math.BigInteger;
-
-/**
- *
- * Notifies that the originator has changed.
- *
- */
-public interface ICDIMemoryChangedEvent extends ICDIChangedEvent {
- /**
- * @return the modified addresses.
- */
- BigInteger[] getAddresses();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIRestartedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIRestartedEvent.java
deleted file mode 100644
index 4e697fd1d89..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIRestartedEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has been restarted.
- * The originators:
- *
- *
target (ICDITarget)
- *
- *
- * @since Jul 11, 2002
- */
-public interface ICDIRestartedEvent extends ICDIEvent {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIResumedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIResumedEvent.java
deleted file mode 100644
index 024586bee8b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDIResumedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.event;
-
-/**
- *
- * Notifies that the originator has been resumed.
- * The originators:
- *
- *
target (ICDITarget)
- *
thread (ICDIThread)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDIResumedEvent extends ICDIEvent {
- final static public int CONTINUE = 0;
- final static public int STEP_OVER = 1;
- final static public int STEP_INTO = 2;
- final static public int STEP_OVER_INSTRUCTION = 3;
- final static public int STEP_INTO_INSTRUCTION = 4;
- final static public int STEP_RETURN = 5;
-
- /**
- * Returns the stepping type.
- *
- * @return the stepping type
- */
- int getType();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDISuspendedEvent.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDISuspendedEvent.java
deleted file mode 100644
index 155d9f4de13..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/event/ICDISuspendedEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-
-/**
- *
- * Notifies that the originator has been suspended.
- * The originators:
- *
- *
target (ICDITarget)
- *
thread (ICDIThread)
- *
- * The reason of the suspension can be one of the following session
- * objects:
- *
- *
breakpoint (ICDIBreakpoint)
- *
signal (ICDISignalReceived)
- *
end of the stepping range (ICDIEndSteppingRange)
- *
- *
- * @since Jul 10, 2002
- */
-public interface ICDISuspendedEvent extends ICDIEvent {
-
- /**
- * Returns the session object that caused the suspension.
- *
- * @return ICDIObject
- */
- ICDISessionObject getReason();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressBreakpoint.java
deleted file mode 100644
index d8b71b6c387..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressBreakpoint.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents an address breakpoint.
- *
- */
-public interface ICDIAddressBreakpoint extends ICDILocationBreakpoint {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressFactoryManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressFactoryManagement.java
deleted file mode 100644
index 44b68a4f14b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressFactoryManagement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.core.IAddressFactory;
-
-/**
- */
-public interface ICDIAddressFactoryManagement {
- /**
- * Returns an AddressFactory.
- * @return a IAddressFactory.
- */
- IAddressFactory getAddressFactory();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressToSource.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressToSource.java
deleted file mode 100644
index ca296a39618..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIAddressToSource.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Allows the CDI back-end to translate an address to a source location.
- * Usually implemented in the same context as ICDITarget.
- * THIS API IS EXPERIMENTAL AND MAY CHANGE IN THE FUTURE.
- */
-public interface ICDIAddressToSource {
-
-
- /**
- * Represents a source location returned by
- * ICDIAddressToSource.getSourceForAddress.
- *
- */
- interface IMappedSourceLocation extends Comparable {
-
- /**
- * Returns the address of the source location.
- * This should be the same address passed to
- * ICDIAddressToSource.getSourceForAddress.
- * @return address of the source location.
- */
- IAddress getAddress();
-
- /**
- * Returns the location of the source file.
- * @return the location of the source file.
- */
- IPath getSourceFile();
-
- /**
- * Returns the line number corresponding to the address.
- * @return the line number corresponding to the address.
- */
- int getLineNumber();
-
- /**
- * Returns the name of the function the address is in.
- * @return the name of the function the address is in.
- */
- String getFunctionName();
-
- /**
- * Returns the unmangled name of the function the address is in.
- * @return the unmangled name of the function the address is in.
- */
- String getUnmangledFunctionName();
-
- /**
- * Return the path to the executable the address is in.
- * @return the path to the executable the address is in.
- */
- IPath getExecutable();
- }
-
- /** Returns a symbol that maps to an address at runtime in a targeted process
- * @return the symbol (if any) that maps to an address
- */
- IMappedSourceLocation getSourceForAddress(IAddress address) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgument.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgument.java
deleted file mode 100644
index befe3bcb58b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgument.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents an argument in the stack frame.
- *
- * @since Jul 22, 2002
- */
-public interface ICDIArgument extends ICDILocalVariable, ICDIArgumentDescriptor {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgumentDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgumentDescriptor.java
deleted file mode 100644
index d284797ddeb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIArgumentDescriptor.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-
-/**
- */
-public interface ICDIArgumentDescriptor extends ICDILocalVariableDescriptor {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java
deleted file mode 100644
index 645db9f332e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-
-/**
- *
- * A breakpoint is capable of suspending the execution of a program
- * whenever a certain point in the program is reached. Provides a
- * basic functionality for the location breakpoints, watchpoints,
- * and event breakpoints
- *
- * @see ICDILineBreakpoint
- * @see ICDIFunctionBreakpoint
- * @see ICDIAddressBreakpoint
- * @see ICDIWatchpoint
- * @see ICDIEventBreakpoint
- *
- * @since Jul 9, 2002
- */
-public interface ICDIBreakpoint extends ICDIObject {
- /** @deprecated use ICBreakpointTyped.REGULAR */
- @Deprecated
- final static public int REGULAR = ICBreakpointType.REGULAR;
- /** @deprecated use ICBreakpointTyped.TEMPORARY */
- @Deprecated
- final static public int TEMPORARY = ICBreakpointType.TEMPORARY;
- /** @deprecated use ICBreakpointTyped.HARDWARE */
- @Deprecated
- final static public int HARDWARE = ICBreakpointType.HARDWARE;
-
- /**
- * @return whether this breakpoint is temporary
- * @deprecated by {@link ICDIBreakpoint2#getType()}
- */
- @Deprecated
- boolean isTemporary();
-
- /**
- * @return whether this breakpoint is hardware-assisted
- * @deprecated by {@link ICDIBreakpoint2#getType()}
- */
- @Deprecated
- boolean isHardware();
-
- /**
- * Returns whether this breakpoint is enabled.
- *
- * @return whether this breakpoint is enabled
- * @throws CDIException if this method fails. Reasons include:
- */
- boolean isEnabled() throws CDIException;
-
- /**
- * Sets the enabled state of this breakpoint. This has no effect
- * if the current enabled state is the same as specified by
- * the enabled parameter.
- *
- * @param enabled - whether this breakpoint should be enabled
- * @throws CDIException if this method fails. Reasons include:
- */
- void setEnabled(boolean enabled) throws CDIException;
-
- /**
- * Returns the condition of this breakpoint or null
- * if the breakpoint's condition is not set.
- *
- * @return the condition of this breakpoint
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDICondition getCondition() throws CDIException;
-
- /**
- * Sets the condition of this breakpoint.
- *
- * @param the condition to set
- * @throws CDIException if this method fails. Reasons include:
- */
- void setCondition(ICDICondition condition) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint2.java
deleted file mode 100644
index 41aa10fb1a1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint2.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Freescale and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-
-/**
- * Extension of the ICDIBreakpoint interface
- */
-public interface ICDIBreakpoint2 extends ICDIBreakpoint {
-
- /**
- * Return the type of the breakpoint. If the breakpoint's creation
- * originated in CDT, then CDT specified the type as part of that request
- * and this method must return that value. If the breakpoint's creation
- * originated in the CDI client, then this method is invoked by CDT to
- * discover the type of the breakpoint.
- *
- * If the CDI breakpoint implements this interface, then
- * {@link ICDIBreakpoint#isTemporary()} and
- * {@link ICDIBreakpoint#isHardware()} will never get called by CDT, as this
- * method is meant to replace those.
- *
- * @return one of the type constants defined in ICBreakpointType (note that
- * {@link ICBreakpointType#TEMPORARY} can be bit-applied to any of
- * the type values to qualify it as a temporary breakpoint.
- */
- int getType();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java
deleted file mode 100644
index cf97564a0ae..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-
-/**
- * Breapoints action on the Target.
- */
-public interface ICDIBreakpointManagement {
-
- /**
- * Set a line breakpoint.
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @return
- * @throws CDIException
- */
- ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location,
- ICDICondition condition, boolean deferred) throws CDIException;
-
- /**
- * Set a function breakpoint.
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @return
- * @throws CDIException
- */
- ICDIFunctionBreakpoint setFunctionBreakpoint(int type, ICDIFunctionLocation location,
- ICDICondition condition, boolean deferred) throws CDIException;
-
- /**
- * Set an address Breakpoint
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @return
- * @throws CDIException
- */
- ICDIAddressBreakpoint setAddressBreakpoint(int type, ICDIAddressLocation location,
- ICDICondition condition, boolean deferred) throws CDIException;
-
- /**
- * Set a watchpoint.
- *
- * @param type
- * @param watchType
- * @param expression
- * @param condition
- * @return
- * @throws CDIException
- */
- ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
- ICDICondition condition) throws CDIException;
-
- /**
- * Set an exception point.
- *
- * @param clazz
- * @param stopOnThrow
- * @param stopOnCatch
- * @return
- * @throws CDIException
- */
- ICDIExceptionpoint setExceptionBreakpoint(String clazz, boolean stopOnThrow, boolean stopOnCatch) throws CDIException;
-
- /**
- * Return all the breakpoints
- *
- * @return
- * @throws CDIException
- */
- ICDIBreakpoint[] getBreakpoints() throws CDIException;
-
- /**
- * Remove the breakpoints
- * @param breakpoints
- * @throws CDIException
- */
- void deleteBreakpoints(ICDIBreakpoint[] breakpoints) throws CDIException;
-
- /**
- * Remove all the breakpoints
- *
- * @throws CDIException
- */
- void deleteAllBreakpoints() throws CDIException;
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement2.java
deleted file mode 100644
index 424ce84c056..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement2.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- * Freescale Semiconductor - Address watchpoints, https://bugs.eclipse.org/bugs/show_bug.cgi?id=118299
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-
-public interface ICDIBreakpointManagement2 extends ICDIBreakpointManagement {
-
- /**
- * Set a line breakpoint.
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @param enabled
- * @return
- * @throws CDIException
- */
- ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException;
-
- /**
- * Set a function breakpoint.
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @param enabled
- * @return
- * @throws CDIException
- */
- ICDIFunctionBreakpoint setFunctionBreakpoint(int type, ICDIFunctionLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException;
-
- /**
- * Set an address Breakpoint
- *
- * @param type
- * @param location
- * @param condition
- * @param deferred
- * @param enabled
- * @return
- * @throws CDIException
- */
- ICDIAddressBreakpoint setAddressBreakpoint(int type, ICDIAddressLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException;
-
- /**
- * Set a watchpoint.
- *
- * @param type
- * @param watchType
- * @param expression
- * @param condition
- * @param enabled
- * @return
- * @throws CDIException
- */
- ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
- ICDICondition condition, boolean enabled) throws CDIException;
-
- /**
- * Set a watchpoint.
- *
- * @param type
- * @param watchType
- * @param expression
- * @param memorySpace set to "" for default memorySpace
- * @param range set to "" for default range
- * @param condition
- * @return
- * @throws CDIException
- */
- ICDIWatchpoint setWatchpoint(int type, int watchType, String expression, String memorySpace, BigInteger range,
- ICDICondition condition, boolean enabled) throws CDIException;
-
- /**
- * Set an exception point.
- *
- * @param clazz
- * @param stopOnThrow
- * @param stopOnCatch
- * @param enabled
- * @return
- * @throws CDIException
- */
- ICDIExceptionpoint setExceptionBreakpoint(String clazz, boolean stopOnThrow,
- boolean stopOnCatch, boolean enabled) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement3.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement3.java
deleted file mode 100644
index 798387ef2ff..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement3.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 QNX Software Systems and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * QNX Software Systems - catchpoints - bug 226689
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-
-public interface ICDIBreakpointManagement3 extends ICDIBreakpointManagement2{
- /**
- * Set an event breakpoint
- * @param type - event breakpoint type, interpreted by backend
- * @param arg - extra argument, for example signal number
- * @param cdiBreakpointType - cdi breakpoint type, just in case some inferiors support "hardware" event breakpoints
- */
- ICDIEventBreakpoint setEventBreakpoint(String type, String arg, int cdiBreakpointType,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIDisposable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIDisposable.java
deleted file mode 100644
index 411a73a3cd6..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIDisposable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * Some CDI interfaces have a dispose method, but a number of others don't (and
- * should). E.g., ICDIVariable does, but ICDIStackFrame doesn't. This interface
- * was created to introduce a dispose capability to CDI objects that call for it
- * without breaking existing interfaces.
- *
- * CDT uses instanceof to check whether a CDI object supports this interface and
- * if so calls the dispose method when it has no further need for the object. This
- * does not apply to all CDI object; just ones for which it makes sense. The list
- * is subject to grow:
- *
- *
{@link ICDITarget}
- *
{@link ICDIStackFrame}
- *
{@link ICDIThread}
- *
- * @since 6.0
- */
-public interface ICDIDisposable {
- /**
- * Called when the object is no longer needed by CDT.
- */
- public void dispose();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIEventBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIEventBreakpoint.java
deleted file mode 100644
index e831357ed05..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIEventBreakpoint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 QNX Software Systems and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * QNX Software Systems - catchpoints - bug 226689
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.core.runtime.CoreException;
-
-public interface ICDIEventBreakpoint extends ICDIBreakpoint {
- /**
- * Get event breakpoint type. This is usually id in reverse web notation.
- * @return event breakpoint type id
- * @throws CoreException
- */
- String getEventType() throws CoreException;
-
- /**
- * Get extra event argument. For example name of the exception or number of a signal.
- * @return event argument
- * @throws CoreException
- */
- String getExtraArgument() throws CoreException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExceptionpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExceptionpoint.java
deleted file mode 100644
index 48fbe8a0ba1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExceptionpoint.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * ICDIExceptionpoint
- */
-public interface ICDIExceptionpoint extends ICDIBreakpoint {
-
- boolean isStopOnThrow();
-
- boolean isStopOnCatch();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteMoveInstructionPointer.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteMoveInstructionPointer.java
deleted file mode 100644
index 62eab84b782..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteMoveInstructionPointer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Freescale Secmiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- * Provides the ability to perform a jump without changing the run state of a thread or debug target.
- * @since 6.0
- */
-public interface ICDIExecuteMoveInstructionPointer {
-
- /**
- * Moves the instruction pointer to the specified location without changing the run state
- * The result is undefined if it moves outside of the stackframe.
- * Can only be called when the associated target is suspended.
- *
- * @param location
- * @throws CDIException if this method fails. Reasons include:
- */
- void moveInstructionPointer(ICDILocation location) throws CDIException;
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteResume.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteResume.java
deleted file mode 100644
index 5c8e131003d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteResume.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- * Provides the ability to resume a thread or debug target.
- * @since 6.0
- */
-public interface ICDIExecuteResume {
-
- /**
- * Causes this target to resume its execution.
- * if passSignal is fase and the target was
- * suspended by a signal when resuming the signal will be discarded
- * Has no effect on a target that is not suspended.
- *
- * @param passSignal whether to discar the signal
- * @throws CDIException if this method fails. Reasons include:
- */
- void resume(boolean passSignal) throws CDIException;
-
- /**
- * Resume execution at location. Note the method does not change stackframe.
- * The result is undefined if it jumps outside of the stacframe.
- * Can only be called when the associated target is suspended.
- *
- * @param location
- * @throws CDIException if this method fails. Reasons include:
- */
- void resume(ICDILocation location) throws CDIException;
-
- /**
- * Resume execution where the program stopped but immediately give the
- * signal.
- *
- * @param signal
- * @throws CDIException
- */
- void resume(ICDISignal signal) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStep.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStep.java
deleted file mode 100644
index 42dd11db557..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStep.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- * Provides the ability to step into, over, and until
- * from the current execution location. Implementations
- * must be non-blocking.
- */
-public interface ICDIExecuteStep {
-
- /**
- * Steps over the current source line.
- * if count <= 0 it is a noop.
- * Can only be called when the associated target/thread is suspended.
- *
- * @param count as in `step', but do so count times.
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepOver(int count) throws CDIException;
-
- /**
- * Steps over the current machine instruction. Can only be called
- * when the associated target/thread is suspended.
- * if count <= 0 it is a noop.
- *
- * @param count as in `stepOverInstruction', but do so count times.
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepOverInstruction(int count) throws CDIException;
-
- /**
- * Steps into the current source line. Can only be called
- * when the associated target/thread is suspended.
- * if count <= 0 it is a noop.
- *
- * @param count as in `step', but do so count times.
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepInto(int count) throws CDIException;
-
- /**
- * Steps into the current machine instruction. Can only be called
- * when the associated target/thread is suspended.
- * if count <= 0 it is a noop.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepIntoInstruction(int count) throws CDIException;
-
- /**
- * Continues running until location is reached.
- * If the program will be suspended if attempt to exit the current frame.
- * Can only be called when the associated target is suspended.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepUntil(ICDILocation location) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStepReturn.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStepReturn.java
deleted file mode 100644
index efd570f3e4a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExecuteStepReturn.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Provides the ability to step return from the frame.
- * Implementations must be non-blocking.
- */
-public interface ICDIExecuteStepReturn {
-
- /**
- * Continue execution until the frame return.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepReturn() throws CDIException;
-
- /**
- * Cancel execution of the frame and return with value.
- * value can be null, if no return value is needed.
- * Can only be called when the associated target/thread is suspended.
- *
- * @param value use as the returning value.
- * @throws CDIException if this method fails. Reasons include:
- */
- void stepReturn(ICDIValue value) throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpression.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpression.java
deleted file mode 100644
index 333b1f3dc3f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpression.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * An expression is a snippet of code that can be evaluated to
- * produce a value.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIExpression extends ICDIObject {
-
-
- /**
- * Returns the expression snippet of code.
- *
- * @return the expression
- */
- String getExpressionText();
-
- /**
- * Returns true if the variable Object are the same,
- * For example event if the name is the same because of
- * casting this may return false;
- * @return true if the same
- */
- boolean equals(ICDIExpression expr);
-
- /**
- * Returns the value of this expression.
- *
- * @param ICDIStackFrame frame context
- * @return the value of this expression
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIValue getValue(ICDIStackFrame context) throws CDIException;
-
- /**
- * Remove the expression from the manager list.
- *
- * @param var
- * @return ICDIArgument
- * @throws CDIException
- */
- void dispose() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpressionManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpressionManagement.java
deleted file mode 100644
index 52af8a09507..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIExpressionManagement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * ICDIExpressionManagement
- */
-public interface ICDIExpressionManagement {
-
- /**
- * Create an expression for code snippet
- * @param code
- * @return ICDIExpression
- * @throws CDIException
- */
- ICDIExpression createExpression(String code) throws CDIException;
-
- /**
- * Return all expressions for this target
- * @return
- * @throws CDIException
- */
- ICDIExpression[] getExpressions() throws CDIException;
-
- /**
- * Remove expressions for this target
- *
- * @param expressions
- */
- void destroyExpressions(ICDIExpression[] expressions) throws CDIException;
-
- /**
- * Remove all expressions on this target
- *
- */
- void destroyAllExpressions() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIFunctionBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIFunctionBreakpoint.java
deleted file mode 100644
index 640ea3806c4..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIFunctionBreakpoint.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents a function breakpoint.
- *
- */
-public interface ICDIFunctionBreakpoint extends ICDILocationBreakpoint {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariable.java
deleted file mode 100644
index 00034ecd3f3..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariable.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * ICDIGlobalVariable
- */
-public interface ICDIGlobalVariable extends ICDIVariable, ICDIGlobalVariableDescriptor {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariableDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariableDescriptor.java
deleted file mode 100644
index d29aa483107..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIGlobalVariableDescriptor.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * ICDIGlobalVariableDescriptor
- */
-public interface ICDIGlobalVariableDescriptor extends ICDIVariableDescriptor {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIInstruction.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIInstruction.java
deleted file mode 100644
index c9fef552d22..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIInstruction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-
-/**
- *
- * Represents a machine instruction.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIInstruction extends ICDIObject {
- /**
- * Returns the Address.
- * @return the address.
- */
- BigInteger getAdress();
-
- /**
- * @return the function name.
- */
- String getFuntionName();
-
- /**
- * @return the instruction.
- */
- String getInstruction();
-
- /**
- * @return the opcode
- */
- String getOpcode();
-
- /**
- * @return any arguments to the opcode
- */
- String getArgs();
-
- /**
- * @return the offset of this machine instruction
- * Returns the instruction's offset.
- *
- * @return the offset of this machine instruction
- */
- long getOffset();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILineBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILineBreakpoint.java
deleted file mode 100644
index 334bf13e64c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILineBreakpoint.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents a line breakpoint.
- *
- */
-public interface ICDILineBreakpoint extends ICDILocationBreakpoint {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariable.java
deleted file mode 100644
index 70effa0a9d1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariable.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * ICDILocalVariable
- */
-public interface ICDILocalVariable extends ICDIVariable, ICDILocalVariableDescriptor {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariableDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariableDescriptor.java
deleted file mode 100644
index 4874096c80c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocalVariableDescriptor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * ICDILocalVariableDescriptor
- */
-public interface ICDILocalVariableDescriptor extends ICDIVariableDescriptor {
-
- /**
- * Return the stackframe.
- *
- * @return ICDIStackFrame
- * @throws CDIException
- */
- ICDIStackFrame getStackFrame() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocationBreakpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocationBreakpoint.java
deleted file mode 100644
index 18b50bc132c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDILocationBreakpoint.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-
-/**
- *
- * Abstract class returning location of breakpoint: file, line, function, address.
- *
- */
-public interface ICDILocationBreakpoint extends ICDIBreakpoint {
-
- /**
- * Returns the location of the breakpoint.
- * @return ICDILocator
- */
- ICDILocator getLocator();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java
deleted file mode 100644
index 90f992de6c5..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * A contiguous segment of memory in an execution context. A memory
- * block is represented by a starting memory address and a length.
- *
- * @since Jul 18, 2002
- */
-public interface ICDIMemoryBlock extends ICDIObject {
-
- /**
- * Bit mask used to indicate a byte is read-only.
- */
- public static final byte READ_ONLY = 0x01;
-
- /**
- * Bit mask used to indicate a byte is valid.
- */
- public static final byte VALID = 0x02;
-
- /**
- * Returns the start address of this memory block.
- *
- * @return the start address of this memory block
- */
- BigInteger getStartAddress();
-
- /**
- * Returns the length of this memory block in bytes.
- *
- * @return the length of this memory block in bytes
- */
- long getLength();
-
- /**
- * This method is a misnomer. It should be getAddressableSize. This is how
- * CDT finds out from the CDI client the addressable size of the
- * memory--i.e., how many bytes per address. Some embedded systems have
- * memory with addressable sizes >1. Such backends should make sure to
- * ignore the now deprecated wordSize parameter of
- * ICDIMemoryBlockManagement.createMemory block() and not regurgitate that
- * value in the implementation of this method.
- *
- * @return The addressable size of the memory
- */
- int getWordSize();
-
- /**
- * Returns the values of the bytes currently contained
- * in this this memory block.
- * Note: the number maybe greater or lower to what
- * was requested.
- * @return the values of the bytes currently contained
- * in this this memory block
- * @exception CDIException if this method fails. Reasons include:
- *
Failure communicating with the debug target. The CDIException's
- * status code contains the underlying exception responsible for
- * the failure.
- *
- */
- byte[] getBytes() throws CDIException;
-
- /**
- * Returns this memory byte's attribute as a bit mask.
- * The method throw IndexOutOfBoundsException if the offset
- * is out of range of the block.
- *
- * @return this memory byte's attribute as a bit mask
- */
- public byte getFlags(int offset);
-
- /**
- * Sets the value of the bytes in this memory block at the specified
- * offset within this memory block to the spcified bytes.
- * The offset is zero based.
- *
- * @param offset the offset at which to set the new values
- * @param bytes the new values
- * @exception CDIException if this method fails. Reasons include:
- *
Failure communicating with the debug target. The CDIException's
- * status code contains the underlying exception responsible for
- * the failure.
- *
This memory block does not support value modification
- *
The specified offset is greater than or equal to the length
- * of this memory block, or the number of bytes specified goes
- * beyond the end of this memory block (index of out of range)
- *
- */
- void setValue(long offset, byte[] bytes) throws CDIException;
-
- /**
- * @return true if the block does not update.
- */
- boolean isFrozen();
-
- /**
- * A memoryBlock set frozen means that the block will
- * not update and check for new data.
- * @param frozen the block is frozen by default.
- */
- void setFrozen(boolean frozen);
-
- /**
- * Refresh the data, this may cause events to be trigger
- * if the data values changed.
- */
- void refresh() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java
deleted file mode 100644
index a419efce877..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * The memory manager manages the collection of memory blocks
- * specified for the debug session.
- *
- * ICDIMemoryBlockManagement
- *
- */
-public interface ICDIMemoryBlockManagement {
-
- /**
- * Returns a memory block specified by given identifier.
- * @param address
- * @param units - number of bytes
- * @param wordSize - this parameter has been deprecated in 4.0
- * and will always be passed as the value 1. If the memory
- * has an addressable size (number of bytes per address)
- * greather than 1, the CDI client should take care not to
- * return the value of wordSize we pass in here, but rather
- * return the actual addressable size for that memory.
- * @return a memory block with the specified identifier
- * @throws CDIException on failure. Reasons include:
- */
- ICDIMemoryBlock createMemoryBlock(String address, int units, int wordSize)
- throws CDIException;
-
- /**
- * Removes the given array of memory blocks from the debug session.
- *
- * @param memoryBlock - the array of memory blocks to be removed
- * @exception CDIException on failure. Reasons include:
- */
- void removeBlocks(ICDIMemoryBlock[] memoryBlocks) throws CDIException;
-
- /**
- * Removes all memory blocks from the debug session.
- *
- * @exception CDIException on failure. Reasons include:
- */
- void removeAllBlocks() throws CDIException;
-
- /**
- * Returns an array of all memory blocks set for this debug session.
- *
- * @return an array of all memory blocks set for this debug session
- * @throws CDIException on failure. Reasons include:
- */
- ICDIMemoryBlock[] getMemoryBlocks() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java
deleted file mode 100644
index 125a19f8601..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 Freescale, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Extension of ICDIMemoryBlockManagement
- *
- * @since May 26, 2006
- */
-public interface ICDIMemoryBlockManagement2 extends ICDIMemoryBlockManagement {
-
- /**
- * Returns a memory block specified by given parameters. Differs
- * from {@link ICDIMemoryBlockManagement#createMemoryBlock(String, int, int)}
- * in that this support memory spaces.
- * @param address
- * @param memorySpaceID - value is meaningful only to the backend
- * @param size - number of bytes
- * @return a memory block with the specified identifier
- * @throws CDIException on failure. Reasons include:
- */
- ICDIMemoryBlock createMemoryBlock(BigInteger address, String memorySpaceID, int size)
- throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceEncoder.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceEncoder.java
deleted file mode 100644
index f11d3beb930..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceEncoder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Freescale Semiconductor, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Add-on interface for objects that implement ICDIMemorySpaceManagement.
- * Provides the string encoding and decoding of a memory space qualified
- * address. CDT provides a default encoding of [memory-space-id]:[expression].
- * If this is adequate, the CDI client need not implement this interface. This
- * method is called when having to represent a memory-space qualified address as
- * a single string.
- *
- * @since 7.0
- */
-public interface ICDIMemorySpaceEncoder extends ICDIObject {
- /**
- * Encode an expression + memory space ID to a string.
- *
- * @param expression
- * the expression representing a location within a memory space.
- * This can be a simple numeric expression like "0x10000" or
- * something more complex "$EAX+(gCustomerCount*100)".
- * @param memorySpaceID
- * a string which represents the memory space
- * @return the encoded string representation of the address; never null
- */
- String encodeAddress(String expression, String memorySpaceID);
-
- /**
- * The inverse of {@link #encodeAddress(String, String)}.
- *
- * @param str
- * the encoded string
- * @return the result of decoding the string into its components; never null
- * @throws CDIException
- * if string is not in the expected format
- */
- DecodeResult decodeAddress(String str) throws CDIException;
-
- interface DecodeResult {
- String getMemorySpaceId();
- String getExpression();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceManagement.java
deleted file mode 100644
index ca2224a6c2b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemorySpaceManagement.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 Freescale, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * The memory space manager provides varous memory-space related operations.
- * The backend implementation of ICDITarget should implement this interface
- * as well if the target supports memory spaces.
- */
-public interface ICDIMemorySpaceManagement extends ICDIObject {
- /**
- * Optionally provides the string encoding of a memory space qualified
- * address. CDT provides a default encoding of
- * :. If this is adequate, the client can
- * return null from this function.
- *
- * @param address
- * a numeric address
- * @param memorySpaceID
- * a string which represents the memory space
- * @return the encoded string representation of the address or null
- * @deprecated CDI clients should implement ICDIMemorySpaceEncoder
- */
- @Deprecated
- String addressToString(BigInteger address, String memorySpaceID);
-
- /**
- * The inverse of addressToString. Optionally decodes a memoryspace/address
- * string to its components. Client must provide decoding if it provides
- * encoding in addressToString. Conversely, it should return null if
- * addressToString returns null.
- *
- * @param str
- * the encoded string (contains memory space + hex address
- * value)
- * @param memorySpaceID_out
- * the memory space ID
- * @return the BigInteger part of str; client should return null if the
- * default decoding provided by CDT is sufficient
- * (:)
- * @throws CDIException
- * if string is not in the expected format
- * @deprecated CDI clients should implement ICDIMemorySpaceEncoder
- */
- @Deprecated
- BigInteger stringToAddress(String str, StringBuffer memorySpaceID_out) throws CDIException;
-
- /**
- * Provides the memory spaces available.
- *
- * @return an array of memory space identifiers
- */
- String [] getMemorySpaces();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMixedInstruction.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMixedInstruction.java
deleted file mode 100644
index a9715eb2ff8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMixedInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents a machine instruction.
- *
- * @since Jul 10, 2002
- */
-public interface ICDIMixedInstruction extends ICDIObject {
- /**
- * @return the line Number.
- */
- int getLineNumber();
-
- /**
- * @return the file name
- */
- String getFileName();
-
- /**
- * @return the array of instruction.
- */
- ICDIInstruction[] getInstructions();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIObject.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIObject.java
deleted file mode 100644
index 096df69d3cb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIObject.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- *
- * Represents an object in the CDI model.
- *
- * @since Jul 8, 2002
- */
-public interface ICDIObject {
- /**
- * Returns the target this object is contained in.
- *
- * @return the target this object is contained in
- */
- ICDITarget getTarget();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
deleted file mode 100644
index b10055ba5a8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * A register is a special kind of variable that is contained
- * in a register group. Each register has a name and a value.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIRegister extends ICDIRegisterDescriptor {
- /**
- * Returns true if the value of this variable could be changed.
- *
- * @return true if the value of this variable could be changed
- * @throws CDIException if this method fails. Reasons include:
- */
- boolean isEditable() throws CDIException;
-
- /**
- * Returns the value of this variable.
- *
- * @param context
- * @return the value of this variable
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIValue getValue(ICDIStackFrame context) throws CDIException;
-
- /**
- * Attempts to set the value of this variable to the value of
- * the given expression.
- *
- * @param expression - an expression to generate a new value
- * @throws CDIException if this method fails. Reasons include:
- */
- void setValue(String expression) throws CDIException;
-
- /**
- * Sets the value of this variable to the given value.
- *
- * @param value - a new value
- * @throws CDIException if this method fails. Reasons include:
- */
- void setValue(ICDIValue value) throws CDIException;
-
- /**
- * Remove the variable from the manager list.
- *
- * @param var
- * @return ICDIArgument
- * @throws CDIException
- */
- void dispose() throws CDIException;
-
- boolean equals(ICDIRegister reg);
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterDescriptor.java
deleted file mode 100644
index 55e5ee7f4a2..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterDescriptor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-
-/**
- *
- * Represents a break condition.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIRegisterDescriptor extends ICDIVariableDescriptor {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterGroup.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterGroup.java
deleted file mode 100644
index eaad77dd423..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegisterGroup.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a group of registers that are assigned to a target.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIRegisterGroup extends ICDIObject {
-
- /**
- * The name of the group.
- *
- * @return String name
- */
- String getName();
-
- /**
- * Returns the register descriptors in this register group.
- *
- * @return ICDIRegisterDescriptor[] in this register group
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIRegisterDescriptor[] getRegisterDescriptors() throws CDIException;
-
- /**
- * Returns whether this register group currently contains any registers.
- *
- * @return whether this register group currently contains any registers
- * @exception CDIException if this method fails. Reasons include:
- */
- public boolean hasRegisters() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRuntimeOptions.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRuntimeOptions.java
deleted file mode 100644
index 489af8f64cc..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRuntimeOptions.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.util.Properties;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Describes the configuration of debug session.
- *
- * @since Aug 6, 2002
- */
-public interface ICDIRuntimeOptions extends ICDIObject {
-
- /**
- * Program/Inferior arguments.
- *
- * @param args the string representing the arguments.
- */
- void setArguments(String[] args) throws CDIException;
-
- /**
- * Program/Inferior environment settings.
- *
- * @param props the new environment variable to add.
- */
- void setEnvironment(Properties props) throws CDIException;
-
- /**
- * Program/Inferior working directory.
- *
- * @param wd the working directory to start the program.
- */
- void setWorkingDirectory(String wd) throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibrary.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibrary.java
deleted file mode 100644
index 24eb41c946c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibrary.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a shared library which has been loaded into
- * the debug target.
- *
- * @since Jul 8, 2002
- */
-public interface ICDISharedLibrary extends ICDIObject {
- /**
- * Returns the name of shared library file.
- *
- * @return the name of shared library file
- */
- String getFileName();
-
- /**
- * Returns the start address of this library.
- *
- * @return the start address of this library
- */
- BigInteger getStartAddress();
-
- /**
- * Returns the end address of this library.
- *
- * @return the end address of this library
- */
- BigInteger getEndAddress();
-
- /**
- * Returns whether the symbols of this library are read.
- *
- * @return whether the symbols of this library are read
- */
- boolean areSymbolsLoaded();
-
- /**
- * Loads the library symbols.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void loadSymbols() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibraryManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibraryManagement.java
deleted file mode 100644
index 566812e079b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibraryManagement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Manages the sharedLibraries in the target.
- */
-public interface ICDISharedLibraryManagement {
-
- /**
- * Returns the array of shared libraries for this target.
- *
- * @return ICDISharedLibrary[] array
- * @throws CDIException on failure.
- */
- ICDISharedLibrary[] getSharedLibraries() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java
deleted file mode 100644
index 166acbb141d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a signal.
- *
- * @since Jul 10, 2002
- */
-public interface ICDISignal extends ICDIObject {
-
- /**
- * Returns the name of this signal.
- *
- * @return the name of this signal
- */
- String getName();
-
- /**
- * Returns the meaning of this signal.
- *
- * @return the meaning of this signal
- */
- String getDescription();
-
- /**
- * if false means program will see the signal.
- * Otherwise program does not know.
- *
- * @return boolean
- */
- boolean isIgnore();
-
- /**
- * Means reenter debugger if this signal happens
- *
- * Method isStopSet.
- * @return boolean
- */
- boolean isStopSet();
-
- /**
- * Continue program giving it this signal.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void signal() throws CDIException ;
-
- /**
- * Change the way debugger handles this signal.
- *
- * @param ignore - if true the debugger should not allow your program to see this signal
- * @param stop - if true the debugger should stop your program when this signal happens
- * @throws CDIException if this method fails. Reasons include:
- */
- void handle(boolean ignore, boolean stop) throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignalManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignalManagement.java
deleted file mode 100644
index 40378ab1e75..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISignalManagement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- */
-public interface ICDISignalManagement {
-
- /**
- * Returns the array of signals defined for this target.
- *
- * @return the array of signals
- * @throws CDIException on failure. Reasons include:
- */
- ICDISignal[] getSignals() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISourceManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISourceManagement.java
deleted file mode 100644
index e0bd5778f4d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISourceManagement.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Maintains the list of directories to search for source files.
- * Auto update is off by default.
- *
- */
-public interface ICDISourceManagement {
- /**
- * Set the source search paths for the debug session.
- * @param String array of search paths
- */
- void setSourcePaths(String[] srcPaths) throws CDIException;
-
- /**
- * Return the array of source paths
- * @return String array of search paths.
- */
- String[] getSourcePaths() throws CDIException;
-
- /**
- * @param startAddress is the begining address
- * @param endAddress is the end address
- * @throws CDIException on failure.
- */
- ICDIInstruction[] getInstructions(BigInteger startAddress, BigInteger endAddress)
- throws CDIException;
-
- /**
- * @param filename is the name of the file to disassemble
- * @param linenum is the line number to disassemble around
- * @throws CDIException on failure
- */
- ICDIInstruction[] getInstructions(String filename, int linenum)
- throws CDIException;
-
- /**
- * @param filename is the name of the file to disassemble
- * @param linenum is the line number to disassemble around
- * @param lines is the number of disassembly to produced
- * @throws CDIException on failure
- */
- ICDIInstruction[] getInstructions(String filename, int linenum, int lines)
- throws CDIException;
-
- /**
- * @param startAddress is the begining address
- * @param endAddress is the end address
- * @throws CDIException on failure.
- */
- ICDIMixedInstruction[] getMixedInstructions(
- BigInteger startAddress,
- BigInteger endAddress)
- throws CDIException;
-
- /**
- * @param filename is the name of the file to disassemble
- * @param linenum is the line number to disassemble around
- * @param lines is the number of disassembly to produced
- * @throws CDIException on failure
- */
- ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum)
- throws CDIException;
-
- /**
- * @param filename is the name of the file to disassemble
- * @param linenum is the line number to disassemble around
- * @param lines is the number of disassembly to produced
- * @throws CDIException on failure
- */
- ICDIMixedInstruction[] getMixedInstructions(
- String filename,
- int linenum,
- int lines)
- throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
deleted file mode 100644
index ddde8e1bcd8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-
-/**
- *
- * A stack frame in a suspended thread.
- * A stack frame contains variables representing visible locals and
- * arguments at the current execution location.
- *
- * @since Jul 8, 2002
- */
-public interface ICDIStackFrame extends ICDIExecuteStepReturn, ICDIObject {
-
- /**
- * Returns the location of the instruction pointer in this
- * stack frame.
- *
- * @return the location of the instruction pointer
- */
- ICDILocator getLocator();
-
- /**
- * Returns the visible variables in this stack frame. An empty
- * collection is returned if there are no visible variables.
- *
- * @return a collection of visible variables
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDILocalVariableDescriptor[] getLocalVariableDescriptors() throws CDIException;
-
- /**
- * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- * @param varDesc ICDThreadStorageDesc
- * @return
- * @throws CDIException
- */
- ICDIArgument createArgument(ICDIArgumentDescriptor varDesc) throws CDIException;
-
- /**
- * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- * @param varDesc ICDThreadStorageDesc
- * @return
- * @throws CDIException
- */
- ICDILocalVariable createLocalVariable(ICDILocalVariableDescriptor varDesc) throws CDIException;
-
- /**
- * Returns the arguments in this stack frame. An empty collection
- * is returned if there are no arguments.
- *
- * @return a collection of arguments
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIArgumentDescriptor[] getArgumentDescriptors() throws CDIException;
-
- /**
- * Returns the thread this stackframe is contained in.
- *
- * @return the thread
- */
- ICDIThread getThread();
-
- /**
- * Returns the level of the stack frame, 1 based.
- *
- * @return the level of the stack frame
- */
- int getLevel();
-
- /**
- * Return true if the frames are the same.
- */
- boolean equals(ICDIStackFrame stackframe);
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISuspend.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISuspend.java
deleted file mode 100644
index 24929f48972..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDISuspend.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * Provides the ability to suspend a thread or debug target.
-*/
-public interface ICDISuspend {
-
- /**
- * Causes this target/thread to suspend its execution.
- * Has no effect on an already suspended thread.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void suspend() throws CDIException;
-
- /**
- * Returns whether this target/thread is currently suspended.
- *
- * @return whether this target/thread is currently suspended
- */
- boolean isSuspended();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
deleted file mode 100644
index 0a083965fe7..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-
-/**
- *
- * Represents a debuggable process. This is a root object of the CDI
- * model.
- *
- * @since Jul 8, 2002
- */
-public interface ICDITarget extends ICDIThreadGroup, ICDIExpressionManagement,
- ICDISourceManagement, ICDISharedLibraryManagement, ICDIMemoryBlockManagement, ICDISessionObject {
-
- /**
- * Gets the target process.
- *
- * @return the output stream connected to the normal input of the
- * target process.
- */
- Process getProcess();
-
- /**
- * Returns the configuration description of this debug session.
- *
- * @return the configuration description
- */
- ICDITargetConfiguration getConfiguration();
-
- /**
- * Evaluates the expression specified by the given string.
- * Returns the evaluation result as a String.
- *
- * @param - expression string to be evaluated
- * @return the result of the evaluation
- * @throws CDIException if this method fails. Reasons include:
- */
- String evaluateExpressionToString(ICDIStackFrame context, String expressionText)
- throws CDIException;
-
- /**
- * A static/global variable in a particular function or file,
- * filename or/and function is the context for the static ICDIVariableDescriptor.
- *
- * @param filename
- * @param function
- * @param name
- * @return ICDIGlobalVariableDescriptor
- * @throws CDIException
- */
- ICDIGlobalVariableDescriptor getGlobalVariableDescriptors(String filename, String function, String name) throws CDIException;
-
- /**
- * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- *
- * @param varDesc ICDIGlobalVariableDescriptor
- * @return ICDIGlobalVariable
- * @throws CDIException
- */
- ICDIGlobalVariable createGlobalVariable(ICDIGlobalVariableDescriptor varDesc) throws CDIException;
-
- /**
- * Return the register groups.
- *
- * @return ICDIRegisterGroup[]
- */
- ICDIRegisterGroup[] getRegisterGroups() throws CDIException;
-
- /**
- * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- * @param varDesc ICDThreadStorageDesc
- * @return
- * @throws CDIException
- */
- ICDIRegister createRegister(ICDIRegisterDescriptor varDesc) throws CDIException;
-
- /**
- * Returns whether this target is terminated.
- *
- * @return whether this target is terminated
- */
- boolean isTerminated();
-
- /**
- * Causes this target to terminate.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void terminate() throws CDIException;
-
- /**
- * Returns whether this target is disconnected.
- *
- * @return whether this target is disconnected
- */
- boolean isDisconnected();
-
- /**
- * Disconnects this target from the debuggable process. Generally,
- * disconnecting ends a debug session with this target, but allows
- * the debuggable program to continue running.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void disconnect() throws CDIException;
-
- /**
- * Restarts the execution of this target.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void restart() throws CDIException;
-
- /**
- * Equivalent to resume(false)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void resume() throws CDIException;
-
- /**
- * Equivalent to stepOver(1)
- *
- * @deprecated
- * @see #stepOver(int)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepOver() throws CDIException;
-
- /**
- * Equivalent to stepInto(1)
- *
- * @deprecated
- * @see #stepInto(int)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepInto() throws CDIException;
-
- /**
- * Equivalent to stepOverInstruction(1)
- *
- * @deprecated
- * @see stepOverInstruction(int)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepOverInstruction() throws CDIException;
-
- /**
- * Equivalent to stepIntoInstruction(1)
- *
- * @deprecated
- * @see #stepIntoInstruction(int)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepIntoInstruction() throws CDIException;
-
- /**
- * Equivaltent to stepUntil(location)
- *
- * @deprecated
- * @see #stepUntil(ICDILocation)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void runUntil(ICDILocation location) throws CDIException;
-
- /**
- * Equivalent to resume(location
- *
- * @deprecated
- * @see #resume(ICDLocation)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void jump(ICDILocation location) throws CDIException;
-
- /**
- * Equivalent to resume(false)
- *
- * @deprecated
- * @throws CDIException
- */
- @Deprecated
- void signal() throws CDIException;
-
- /**
- * Equivalent to resume(signal)
- *
- * @deprecated
- * @see #resume(ICDISignal)
- * @param signal
- * @throws CDIException
- */
- @Deprecated
- void signal(ICDISignal signal) throws CDIException;
-
- /**
- * Returns the Runtime options for this target debug session.
- *
- * @return the configuration description
- */
- ICDIRuntimeOptions getRuntimeOptions();
-
- /**
- * Return a ICDICondition
- */
- ICDICondition createCondition(int ignoreCount, String expression);
-
- /**
- * Return a ICDICondition
- */
- ICDICondition createCondition(int ignoreCount, String expression, String[] threadIds);
-
- /**
- * Returns a ICDILineLocation
- */
- ICDILineLocation createLineLocation(String file, int line);
-
- /**
- * Returns a ICDIFunctionLocation
- */
- ICDIFunctionLocation createFunctionLocation(String file, String function);
-
- /**
- * Returns a ICDIAddressLocation
- */
- ICDIAddressLocation createAddressLocation(BigInteger address);
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget2.java
deleted file mode 100644
index b970e07cd53..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget2.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-
-public interface ICDITarget2 extends ICDITarget {
-
-
- /** Returns a list of global variables for the targeted process
- * @return list of globals for the targeted process
- */
- ICDIGlobalVariableDescriptor[] getGlobalVariables();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration.java
deleted file mode 100644
index 81e2a7b031a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * Describes the configuration of the target.
- *
- */
-public interface ICDITargetConfiguration extends ICDIObject {
-
- /**
- * Returns whether this target supports termination.
- *
- * @return whether this target supports termination
- */
- boolean supportsTerminate();
-
- /**
- * Returns whether this target supports disconnecting.
- *
- * @return whether this target supports disconnecting
- */
- boolean supportsDisconnect();
-
- /**
- * Returns whether this target supports suspend.
- *
- * @return whether this target supports suspend.
- */
- boolean supportsSuspend();
-
- /**
- * Returns whether this target supports Resume.
- *
- * @return whether this target supports Resume.
- */
- boolean supportsResume();
-
- /**
- * Returns whether this target supports restarting.
- *
- * @return whether this target supports restarting
- */
- boolean supportsRestart();
-
- /**
- * Returns whether this target supports stepping.
- *
- * @return whether this target supports stepping
- */
- boolean supportsStepping();
-
- /**
- * Returns whether this target supports instruction stepping.
- *
- * @return whether this target supports instruction stepping
- */
- boolean supportsInstructionStepping();
-
- /**
- * Returns whether this target supports breakpoints.
- *
- * @return whether this target supports breakpoints
- */
- boolean supportsBreakpoints();
-
- /**
- * Returns whether this target supports registers.
- *
- * @return whether this target supports registers
- */
- boolean supportsRegisters();
-
- /**
- * Returns whether this target supports register modification.
- *
- * @return whether this target supports registers modification
- */
- boolean supportsRegisterModification();
-
- /**
- * Returns whether this target supports shared library.
- *
- * @return whether this target supports registers modification
- */
- boolean supportsSharedLibrary();
-
- /**
- * Returns whether this target supports memory retrieval.
- *
- * @return whether this target supports memory retrieval
- */
- boolean supportsMemoryRetrieval();
-
- /**
- * Returns whether this target supports memory modification.
- *
- * @return whether this target supports memory modification
- */
- boolean supportsMemoryModification();
-
- /**
- * Returns whether this target supports expression evaluation.
- *
- * @return whether this target supports expression evaluation
- */
- boolean supportsExpressionEvaluation();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration2.java
deleted file mode 100644
index 7fcae298022..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration2.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-public interface ICDITargetConfiguration2 extends ICDITargetConfiguration {
-
- /**
- * Returns whether this target supports thread control, namely whether it
- * supports suspending/resuming threads individually.
- *
- * @return whether this target supports thread control, namely whether it
- * supports suspending/resuming threads individually.
- */
- boolean supportsThreadControl();
-
- /**
- * Returns whether this target supports passive variable updating. If so
- * targets will not be actively sending variable value change notification
- * when a thread is suspended but will wait until they are asked to
- * redisplay the value. Passive variable updating lets a CDI plugin avoid
- * maintaining its own variable cache and having to keep it in sync with
- * CDT's. Targets that support this feature will need to be able to detect
- * when a variable value has changed and fire a changedEvent in its
- * implementation of ICDIValue.getValueString().
- *
- * Also, targets that support this feature will not have their variables
- * disposed when the user disables them in the GUI. Such a dispose only
- * serves to reduce step-time overhead in the debugger engine. As such
- * overhead is negligible for engines with passive variables, the dispose
- * is unnecessary.
- *
- * @return whether this target supports passive variable updating.
- */
- boolean supportsPassiveVariableUpdate();
-
- /**
- * Returns whether this target supports runtime type indentification.
- * If so this means the type of a variable may change when its value changes.
- *
- * @return whether this target supports runtime type indentification.
- * If so this means the type of a variable may change when its value changes.
- */
- boolean supportsRuntimeTypeIdentification();
-
- /**
- * Returns whether this target supports having address breakpoints
- * enabled when a debug session starts.
- * If so this means address breaks will not be disabled on startup.
- *
- * @return whether this target supports having address breakpoints
- * enabled when a debug session starts.
- * If so this means address breaks will not be disabled on startup.
- */
- boolean supportsAddressBreaksOnStartup();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration3.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration3.java
deleted file mode 100644
index 8bc524ea2e7..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITargetConfiguration3.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-
-public interface ICDITargetConfiguration3 extends ICDITargetConfiguration2 {
-
- /**
- * It may be desirable to update all variables when a certain event occurs.
- * For example, some CDI clients may want all variabless updated when memory
- * is changed (when an ICDIMemoryChangedEvent is received) because it's
- * impractical or impossible for those backends to determine what specific
- * variables the memory change affected.
- *
- * CDT will call this method to determine desired behavior for a limited set
- * of event types. The CDI backend should not expect to use this hook as a
- * general control mechanism for when variables are updated.
- *
- * @return Whether the value for all active variables should be invalidated
- * and re-fetched from the CDI backend on the occurence of the given
- * event
- */
- boolean needsVariablesUpdated(ICDIEvent event);
-
- /**
- * Same idea as needsRegistersUpdated() but for registers. Embedded systems
- * often have memory mapped registers; changing bytes in memory might, in
- * effect, change a register value
- *
- * @return Whether the value for all active registers should be invalidated
- * and re-fetched from the CDI backend on the occurence of the given
- * event
- */
- boolean needsRegistersUpdated(ICDIEvent event);
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
deleted file mode 100644
index f9c11d1e73e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- *
- * A thread in a debug target.
- * A thread contains stack frames. Stack frames are only available
- * when the thread is suspended, and are returned in top-down order.
- *
- * @since Jul 8, 2002
- */
-public interface ICDIThread extends ICDIExecuteStep, ICDIExecuteResume, ICDISuspend, ICDIObject {
-
- /**
- * Returns the stack frames contained in this thread. An
- * empty collection is returned if this thread contains
- * no stack frames, or is not currently suspended. Stack frames
- * are returned in top down order.
- *
- * @return a collection of stack frames
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIStackFrame[] getStackFrames() throws CDIException;
-
- /**
- * Returns the stack frames contained in this thread whose levels
- * are between the two arguments(inclusive).
- * An empty collection is returned if this thread contains
- * no stack frames, or is not currently suspended. Stack frames
- * are returned in top down order.
- *
- * @return a collection of stack frames
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIStackFrame[] getStackFrames(int lowFrame, int highFrame) throws CDIException;
-
- /**
- * Returns the depth of the stack frames.
- *
- * @return depth of stack frames
- * @throws CDIException if this method fails. Reasons include:
- */
- int getStackFrameCount() throws CDIException;
-
- /**
- * Return thread local storage variables descriptor.
- *
- * @return
- * @throws CDIException
- */
- ICDIThreadStorageDescriptor[] getThreadStorageDescriptors() throws CDIException;
-
- /**
- * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- * @param varDesc ICDThreadStorageDesc
- * @return
- * @throws CDIException
- */
- ICDIThreadStorage createThreadStorage(ICDIThreadStorageDescriptor varDesc) throws CDIException;
-
- /**
- * Equivalent to resume(false)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void resume() throws CDIException;
-
- /**
- * Equivalent to stepOver(1)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepOver() throws CDIException;
-
- /**
- * Equivalent to stepInto(1)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepInto() throws CDIException;
-
- /**
- * Equivalent to stepOverInstruction(1)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepOverInstruction() throws CDIException;
-
- /**
- * Equivalent to stepIntoInstruction(1)
- *
- * @deprecated
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void stepIntoInstruction() throws CDIException;
-
- /**
- * This method is deprecated and will only be available
- * on the stackframe
- *
- * @deprecated
- * @see ICDIStackFrame.stepReturn()
- * @throws CDIException
- */
- @Deprecated
- void stepReturn() throws CDIException;
-
- /**
- * Equivalent to stepUntil(location)
- *
- * @deprecated
- * @see #stepUntil(ICDILocation)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void runUntil(ICDILocation location) throws CDIException;
-
- /**
- * Equivalent to resume(location)
- *
- * @deprecated
- * @see #resume(ICDILocation)
- * @throws CDIException if this method fails. Reasons include:
- */
- @Deprecated
- void jump(ICDILocation location) throws CDIException;
-
- /**
- * Equivalent to resume(false)
- *
- * @deprecated
- * @see #resume(boolean)
- * @throws CDIException
- */
- @Deprecated
- void signal() throws CDIException;
-
- /**
- * Equivalent to resume(signal)
- *
- * @deprecated
- * @see #resume(ICDISignal)
- * @param signal
- * @throws CDIException
- */
- @Deprecated
- void signal(ICDISignal signal) throws CDIException;
-
- /**
- * Returns true if the threads are the same.
- */
- boolean equals(ICDIThread thead);
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadGroup.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadGroup.java
deleted file mode 100644
index caf42d862b8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadGroup.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- */
-public interface ICDIThreadGroup extends ICDIBreakpointManagement, ICDIExecuteStep, ICDIExecuteResume,
- ICDISuspend, ICDISignalManagement, ICDIObject {
-
- /**
- * Returns the threads contained in this target.
- * An empty collection is returned if this target contains no
- * threads.
- *
- * @return a collection of threads
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIThread[] getThreads() throws CDIException;
-
- /**
- * Returns the currently selected thread.
- *
- * @return the currently selected thread
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIThread getCurrentThread() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorage.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorage.java
deleted file mode 100644
index f5840ee8a9f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorage.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-/**
- * ICDIThreadStorage
- */
-public interface ICDIThreadStorage extends ICDIVariable, ICDIThreadStorageDescriptor {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorageDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorageDescriptor.java
deleted file mode 100644
index df48cf8d3e9..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThreadStorageDescriptor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- * ICDIThreadStorageDescriptor
- */
-public interface ICDIThreadStorageDescriptor extends ICDIVariableDescriptor {
-
- /**
- * Return the thread.
- *
- * @return ICDIThread
- * @throws CDIException
- */
- ICDIThread getThread() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITracepoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITracepoint.java
deleted file mode 100644
index bc201adf3d0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITracepoint.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- * Defines a point in the program execution when the specified data to be collected.
- *
- * @since May 15, 2003
- */
-public interface ICDITracepoint extends ICDIObject {
-
- /**
- * Represents an action to be taken when the tracepoint is hit.
- *
- * @since May 15, 2003
- */
- public interface IAction {
- }
-
- /**
- * Returns the location of this tracepoint.
- *
- * @return the location of this tracepoint
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDILocation getLocation() throws CDIException;
-
- /**
- * Returns whether this tracepoint is enabled.
- *
- * @return whether this tracepoint is enabled
- * @throws CDIException if this method fails. Reasons include:
- */
- boolean isEnabled() throws CDIException;
-
- /**
- * Sets the enabled state of this tracepoint. This has no effect
- * if the current enabled state is the same as specified by
- * the enabled parameter.
- *
- * @param enabled - whether this tracepoint should be enabled
- * @throws CDIException if this method fails. Reasons include:
- */
- void setEnabled( boolean enabled ) throws CDIException;
-
- /**
- * Returns the passcount of this tracepoint.
- *
- * @return the passcount of this tracepoint
- * @throws CDIException if this method fails. Reasons include:
- */
- int getPassCount() throws CDIException;
-
- /**
- * Sets the passcount of this tracepoint.
- *
- * @param the passcount to set
- * @throws CDIException if this method fails. Reasons include:
- */
- void setPassCount( int passCount ) throws CDIException;
-
- /**
- * Adds the given actions to the action list of thie tracepoint.
- *
- * @param actions to add
- * @throws CDIException if this method fails. Reasons include:
- */
- void addActions( ICDITracepoint.IAction[] actions ) throws CDIException;
-
- /**
- * Removes the given actions from the action list of thie tracepoint.
- *
- * @param actions to remove
- * @throws CDIException if this method fails. Reasons include:
- */
- void removeActions( ICDITracepoint.IAction[] actions ) throws CDIException;
-
- /**
- * Clears the action list of thie tracepoint.
- *
- * @throws CDIException if this method fails. Reasons include:
- */
- void clearActions() throws CDIException;
-
- /**
- * Returns the actions assigned to this tracepoint.
- *
- * @return the actions of this tracepoint
- */
- ICDITracepoint.IAction[] getActions();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIValue.java
deleted file mode 100644
index e674c327519..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIValue.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-
-/**
- *
- * Represents the value of a variable. A value representing
- * a complex data structure contains variables.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIValue extends ICDIObject {
- /**
- * Returns a description of the type of data this value contains.
- *
- * @return the name of this value's data type
- * @throws CDIException if this method fails. Reasons include:
- */
- String getTypeName() throws CDIException;
-
- /**
- * Return the type of this value.
- *
- * @return
- * @throws CDIException
- */
- ICDIType getType() throws CDIException;
-
- /**
- * Returns this value as a String.
- *
- * @return a String representation of this value
- * @throws CDIException if this method fails. Reasons include:
- */
- String getValueString() throws CDIException;
-
- /**
- * Return the number of children.
- * @return int children count
- */
- int getChildrenNumber() throws CDIException;
-
- /**
- * @return true if value is a container like structure.
- */
- boolean hasChildren() throws CDIException;
-
- /**
- * Returns the variables in this value. An empty collection
- * is returned if there are no variables.
- *
- * @return an array of variables
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIVariable[] getVariables() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
deleted file mode 100644
index 19d99a120e5..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a data structure in the program. Each variable has
- * a value which may in turn contain more variables.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIVariable extends ICDIVariableDescriptor {
-
- /**
- * Returns true if the value of this variable could be changed.
- *
- * @return true if the value of this variable could be changed
- * @throws CDIException if this method fails. Reasons include:
- */
- boolean isEditable() throws CDIException;
-
- /**
- * Returns the value of this variable.
- *
- * @return the value of this variable
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIValue getValue() throws CDIException;
-
- /**
- * Attempts to set the value of this variable to the value of
- * the given expression.
- *
- * @param expression - an expression to generate a new value
- * @throws CDIException if this method fails. Reasons include:
- */
- void setValue(String expression) throws CDIException;
-
- /**
- * Sets the value of this variable to the given value.
- *
- * @param value - a new value
- * @throws CDIException if this method fails. Reasons include:
- */
- void setValue(ICDIValue value) throws CDIException;
-
- /**
- * Remove the variable from the manager list.
- *
- * @param var
- * @return ICDIArgument
- * @throws CDIException
- */
- void dispose() throws CDIException;
-
- boolean equals(ICDIVariable variable);
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
deleted file mode 100644
index 14e27da64fb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-
-
-/**
- *
- */
-public interface ICDIVariableDescriptor extends ICDIObject {
-
- /**
- * Returns the name of this variable.
- *
- * @return String the name of this variable
- */
- String getName();
-
- /**
- * Returns the type of this variable descriptor.
- *
- * @return the type of data this variable is declared
- * @throws CDIException if this method fails. Reasons include:
- */
- ICDIType getType() throws CDIException;
-
- /**
- * Returns the type name of this variable descriptor.
- *
- * @return the type of data this variable is declared
- * @throws CDIException if this method fails. Reasons include:
- */
- String getTypeName() throws CDIException;
-
- /**
- * Returns the size of this variable descriptor.
- *
- * @return the size of this variable
- * @throws CDIException if this method fails. Reasons include:
- */
- int sizeof() throws CDIException;
-
- /**
- * Returns the qualified name of this variable.
- *
- * @return the qualified name of this variable
- * @throws CDIException if this method fails. Reasons include:
- */
- String getQualifiedName() throws CDIException;
-
- /**
- * Consider the variable object as an Array of type and range[start, start + length - 1]
- * @param stack
- * @param name
- * @return ICDIVariableDescriptor
- * @throws CDIException
- */
- ICDIVariableDescriptor getVariableDescriptorAsArray(int start, int length) throws CDIException;
-
- /**
- * Consider the variable descritor as type.
- *
- * @param stack
- * @param name
- * @return ICDIVariableDescriptor
- * @throws CDIException
- */
- ICDIVariableDescriptor getVariableDescriptorAsType(String type) throws CDIException;
-
- /**
- * Returns true if the variable Object are the same,
- * For example event if the name is the same because of
- * casting this may return false;
- * @return true if the same
- */
- boolean equals(ICDIVariableDescriptor varDesc);
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint.java
deleted file mode 100644
index c974f19b7a1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a watchpoint.
- *
- * @since Jul 9, 2002
- */
-public interface ICDIWatchpoint extends ICDIBreakpoint {
- final static public int WRITE = 0x1;
- final static public int READ = 0x2;
-
- /**
- * Returns whether this watchppoint is a write watchpoint.
- *
- * @return whether this watchppoint is a write watchpoint
- */
- boolean isWriteType();
-
- /**
- * Returns whether this watchppoint is a read watchpoint.
- *
- * @return whether this watchppoint is a read watchpoint
- */
- boolean isReadType();
-
- /**
- * Returns the watchpoint's expression.
- *
- * @return the expression of this watchpoint
- * @throws CDIException if this method fails. Reasons include:
- */
- String getWatchExpression() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint2.java
deleted file mode 100644
index c3f9f946c48..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIWatchpoint2.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation, https://bugs.eclipse.org/bugs/show_bug.cgi?id=118299
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model;
-
-import java.math.BigInteger;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-/**
- *
- * Represents a watchpoint.
- *
- */
-public interface ICDIWatchpoint2 extends ICDIWatchpoint {
-
- /**
- * Returns the memory space associated with this
- * watchpoint's start address, or null if there is no memory space.
- *
- * @return the memory space Id associated with the address of
- * this watchpoint
- * @throws CDIException if this method fails. Reasons include:
- */
- String getMemorySpace() throws CDIException;
-
- /**
- * Returns the range for this watchpoint in addressable units.
- *
- * @return the range of the watchpoint.
- * @throws CDIException if this method fails. Reasons include:
- */
- BigInteger getRange() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateType.java
deleted file mode 100644
index b1b1342ceb1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIAggregateType extends ICDIType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateValue.java
deleted file mode 100644
index b9fcceb141d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIAggregateValue.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIAggregateValue extends ICDIValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayType.java
deleted file mode 100644
index e39f50602a4..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIArrayType extends ICDIDerivedType {
-
- int getDimension();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayValue.java
deleted file mode 100644
index 285fcdd33f7..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIArrayValue.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-
-
-/**
- *
- * Represents a value of a array type.
- *
- * @since April 15, 2003
- */
-public interface ICDIArrayValue extends ICDIDerivedValue {
- ICDIVariable[] getVariables(int index, int length) throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBigIntegerValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBigIntegerValue.java
deleted file mode 100644
index fdf28271e2f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBigIntegerValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since 6.0
- */
-public interface ICDIBigIntegerValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolType.java
deleted file mode 100644
index d592c2b326c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIBoolType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolValue.java
deleted file mode 100644
index 5eda323adcd..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIBoolValue.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIBoolValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharType.java
deleted file mode 100644
index 4e3433b308d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDICharType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharValue.java
deleted file mode 100644
index ad568721f57..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDICharValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDICharValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedType.java
deleted file mode 100644
index f5c9b48e6d8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIDerivedType extends ICDIType {
-
- ICDIType getComponentType();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedValue.java
deleted file mode 100644
index 0c92d700326..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDerivedValue.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIDerivedValue extends ICDIValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleType.java
deleted file mode 100644
index b7572232c2e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIDoubleType extends ICDIFloatingPointType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleValue.java
deleted file mode 100644
index e29d0376bb0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIDoubleValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIDoubleValue extends ICDIFloatingPointValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumType.java
deleted file mode 100644
index 35a474025cf..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIEnumType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumValue.java
deleted file mode 100644
index d2f7dc277a1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIEnumValue.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIEnumValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatType.java
deleted file mode 100644
index 2dfae757556..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIFloatType extends ICDIFloatingPointType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatValue.java
deleted file mode 100644
index f1dd0be8b36..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIFloatValue extends ICDIFloatingPointValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointType.java
deleted file mode 100644
index 9d4d10a03ac..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIFloatingPointType extends ICDIType {
-
- boolean isImaginary();
-
- boolean isComplex();
-
- boolean isLong();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointValue.java
deleted file mode 100644
index df29a34cf3d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFloatingPointValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIFloatingPointValue extends ICDIValue {
-
- float floatValue() throws CDIException;
-
- double doubleValue() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionType.java
deleted file mode 100644
index 98f5401042d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIFunctionType extends ICDIDerivedType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionValue.java
deleted file mode 100644
index a704d0970e0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIFunctionValue.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIFunctionValue extends ICDIDerivedValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntType.java
deleted file mode 100644
index bd3d8adc710..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIIntType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntValue.java
deleted file mode 100644
index 327e6b76f6b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIIntValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralType.java
deleted file mode 100644
index 4125bf84e5f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIIntegralType extends ICDIType{
-
- boolean isUnsigned();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralValue.java
deleted file mode 100644
index dea2ddd68bb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIIntegralValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIIntegralValue extends ICDIValue {
-
- public BigInteger bigIntegerValue() throws CDIException;
-
- public long longValue() throws CDIException;
-
- public int intValue() throws CDIException;
-
- public short shortValue() throws CDIException;
-
- public int byteValue() throws CDIException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongType.java
deleted file mode 100644
index 06408a8413c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDILongLongType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongValue.java
deleted file mode 100644
index dcaa0ec39c5..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongLongValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDILongLongValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongType.java
deleted file mode 100644
index c5a772e261f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDILongType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongValue.java
deleted file mode 100644
index 6837e23851a..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDILongValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDILongValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerType.java
deleted file mode 100644
index 596f814155f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIPointerType extends ICDIDerivedType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerValue.java
deleted file mode 100644
index 9498aa724b7..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIPointerValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIPointerValue extends ICDIDerivedValue {
-
- BigInteger pointerValue() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceType.java
deleted file mode 100644
index 274af9e2cda..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceType.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- */
-public interface ICDIReferenceType extends ICDIDerivedType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java
deleted file mode 100644
index 912006db06c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-
-/**
- */
-public interface ICDIReferenceValue extends ICDIDerivedValue {
-
- /**
- * Return the reference value.
- * @return ICDIValue
- * @throws CDIException
- */
- ICDIValue referenceValue() throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortType.java
deleted file mode 100644
index 52b0e526d37..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIShortType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortValue.java
deleted file mode 100644
index 3d39f2961c5..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIShortValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the value of a variable.
- *
- * @since April 15, 2003
- */
-public interface ICDIShortValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructType.java
deleted file mode 100644
index 4262059e4bb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIStructType extends ICDIAggregateType {
-
- boolean isClass();
-
- boolean isStruct();
-
- boolean isUnion();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructValue.java
deleted file mode 100644
index ccdcf049372..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIStructValue.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIStructValue extends ICDIAggregateValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIType.java
deleted file mode 100644
index ce0802603c3..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIType extends ICDIObject {
-
- /**
- * Returns the name.
- *
- * @return the name of the data type
- * @throws CDIException if this method fails.
- */
- String getTypeName();
-
- /**
- * Returns a more desciptive name.
- * @return
- */
- String getDetailTypeName();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIVoidType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIVoidType.java
deleted file mode 100644
index b3e49f346ea..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIVoidType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-
-
-/**
- *
- * Represents the type of a variable.
- *
- * @since Apr 15, 2003
- */
-public interface ICDIVoidType extends ICDIType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharType.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharType.java
deleted file mode 100644
index 4978b543d68..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIWCharType extends ICDIIntegralType {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharValue.java
deleted file mode 100644
index 7873ce1c8fb..00000000000
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIWCharValue.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.cdi.model.type;
-
-/**
- */
-public interface ICDIWCharValue extends ICDIIntegralValue {
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/plugin.xml b/debug/org.eclipse.cdt.debug.core/plugin.xml
index a67ad4ae711..bbbb4c5a6a5 100644
--- a/debug/org.eclipse.cdt.debug.core/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.core/plugin.xml
@@ -1,7 +1,6 @@
-
@@ -384,30 +383,6 @@
name="%containerName.programRelativePath">
-
-
-
-
-
-
-
-
-
-
-
-
-
- ../../pom.xml
- 7.8.0-SNAPSHOT
+ 8.0.0-SNAPSHOTorg.eclipse.cdt.debug.coreeclipse-plugin
diff --git a/debug/org.eclipse.cdt.debug.core/schema/CDebugger.exsd b/debug/org.eclipse.cdt.debug.core/schema/CDebugger.exsd
deleted file mode 100644
index cdeb3f46ec4..00000000000
--- a/debug/org.eclipse.cdt.debug.core/schema/CDebugger.exsd
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
-
-
-
- [Enter description of this extension point]
-
-
-
-
-
-
-
-
-
-
-
- a fully qualified identifier of the target extension point
-
-
-
-
-
-
- an optional identifier of the extension instance
-
-
-
-
-
-
- an optional name of the extension instance
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- specifies the debugger's name
-
-
-
-
-
-
- specifies the comma separated list of debugging modes (run,core,attach).
-
-
-
-
-
-
- specifies a fully qualified name of a Java class that implements <code>ICDIDebugger2</code>
-
-
-
-
-
-
-
-
-
- specifies a unique identifier for this debugger.
-
-
-
-
-
-
- specifies a comma separated list of supported platforms.
-
-
-
-
-
-
- specifies a comma separated list of supported architectures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [Enter extension point usage example here.]
-
-
-
-
-
-
-
-
- [Enter API information here.]
-
-
-
-
-
-
-
-
- [Enter information about supplied implementation of this extension point.]
-
-
-
-
-
-
-
-
- Copyright (c) 2004, 2005 QNX Software Systems and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
index 9d549066e8c..d9feb25195f 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
@@ -14,20 +14,11 @@
*******************************************************************************/
package org.eclipse.cdt.debug.core;
-import java.io.IOException;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IBinaryParser;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.model.CoreModelUtil;
-import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint2;
@@ -51,10 +42,7 @@ import org.eclipse.cdt.debug.internal.core.breakpoints.CLineBreakpoint;
import org.eclipse.cdt.debug.internal.core.breakpoints.CLineDynamicPrintf;
import org.eclipse.cdt.debug.internal.core.breakpoints.CLineTracepoint;
import org.eclipse.cdt.debug.internal.core.breakpoints.CWatchpoint;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -64,14 +52,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IProcess;
/**
* Provides utility methods for creating debug sessions, targets and breakpoints
@@ -88,154 +72,6 @@ public class CDIDebugModel {
return CDebugCorePlugin.getUniqueIdentifier();
}
- /**
- * Creates and returns a debug target for the given CDI target, with the
- * specified name, and associates it with the given process for console I/O.
- * The debug target is added to the given launch.
- *
- * @param launch
- * the launch the new debug target will be contained in
- * @param project
- * the project to use to persist breakpoints.
- * @param cdiTarget
- * the CDI target to create a debug target for
- * @param name
- * the name to associate with this target, which will be returned
- * from IDebugTarget.getName.
- * @param debuggeeProcess
- * the process to associate with the debug target, which will be
- * returned from IDebugTarget.getProcess
- * @param file
- * the executable to debug.
- * @param allowTerminate
- * allow terminate().
- * @param allowDisconnect
- * allow disconnect().
- * @param stopSymbol
- * place temporary breakpoint at stopSymbol, ignore
- * if null or empty.
- * @param resumeTarget
- * resume target.
- * @return a debug target
- * @throws DebugException
- * @since 3.1
- */
- public static IDebugTarget newDebugTarget(final ILaunch launch, final IProject project, final ICDITarget cdiTarget,
- final String name, final IProcess debuggeeProcess, final IBinaryObject file, final boolean allowTerminate,
- final boolean allowDisconnect, final String stopSymbol, final boolean resumeTarget) throws DebugException {
- final IDebugTarget[] target = new IDebugTarget[1];
- IWorkspaceRunnable r = new IWorkspaceRunnable() {
-
- @Override
- public void run(IProgressMonitor m) throws CoreException {
- target[0] = new CDebugTarget(launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate,
- allowDisconnect);
- ((CDebugTarget) target[0]).start(stopSymbol, resumeTarget);
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(r, null);
- } catch (CoreException e) {
- CDebugCorePlugin.log(e);
- throw new DebugException(e.getStatus());
- }
- return target[0];
- }
-
- /**
- * Creates and returns a debug target for the given CDI target, with the
- * specified name, and associates it with the given process for console I/O.
- * The debug target is added to the given launch.
- *
- * @param launch
- * the launch the new debug target will be contained in
- * @param project
- * the project to use to persist breakpoints.
- * @param cdiTarget
- * the CDI target to create a debug target for
- * @param name
- * the name to associate with this target, which will be returned
- * from IDebugTarget.getName.
- * @param debuggeeProcess
- * the process to associate with the debug target, which will be
- * returned from IDebugTarget.getProcess
- * @param file
- * the executable to debug.
- * @param allowTerminate
- * allow terminate().
- * @param allowDisconnect
- * allow disconnect().
- * @param stopInMain
- * place temporary breakpoint at main()
- * @param resumeTarget
- * resume target.
- * @return a debug target
- * @throws DebugException
- * @deprecated
- */
- @Deprecated
- public static IDebugTarget newDebugTarget(final ILaunch launch, final IProject project, final ICDITarget cdiTarget,
- final String name, final IProcess debuggeeProcess, final IBinaryObject file, final boolean allowTerminate,
- final boolean allowDisconnect, final boolean stopInMain, final boolean resumeTarget) throws DebugException {
- final IDebugTarget[] target = new IDebugTarget[1];
- IWorkspaceRunnable r = new IWorkspaceRunnable() {
-
- @Override
- public void run(IProgressMonitor m) throws CoreException {
- String stopSymbol = null;
- if (stopInMain)
- stopSymbol = launch.getLaunchConfiguration().getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
- ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
- target[0] = new CDebugTarget(launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate,
- allowDisconnect);
- ((CDebugTarget) target[0]).start(stopSymbol, resumeTarget);
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(r, null);
- } catch (CoreException e) {
- CDebugCorePlugin.log(e);
- throw new DebugException(e.getStatus());
- }
- return target[0];
- }
-
- /**
- * Creates and returns a debug target for the given CDI target, with the
- * specified name, and associates it with the given process for console I/O.
- * The debug target is added to the given launch.
- *
- * @param launch
- * the launch the new debug target will be contained in
- * @param project
- * the project to use to persist breakpoints.
- * @param cdiTarget
- * the CDI target to create a debug target for
- * @param name
- * the name to associate with this target, which will be returned
- * from IDebugTarget.getName.
- * @param debuggeeProcess
- * the process to associate with the debug target, which will be
- * returned from IDebugTarget.getProcess
- * @param file
- * the executable to debug.
- * @param allowTerminate
- * allow terminate().
- * @param allowDisconnect
- * allow disconnect().
- * @param resumeTarget
- * resume target.
- * @return a debug target
- * @throws DebugException
- */
- public static IDebugTarget newDebugTarget(ILaunch launch, IProject project, ICDITarget cdiTarget,
- final String name, IProcess debuggeeProcess, IBinaryObject file, boolean allowTerminate,
- boolean allowDisconnect, boolean resumeTarget) throws DebugException {
- return newDebugTarget(launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate, allowDisconnect,
- null, resumeTarget);
- }
-
/**
* Calculates breakpoint marker ID based on the breakpoint object type.
*
@@ -1376,61 +1212,6 @@ public class CDIDebugModel {
return null;
}
- /**
- * @deprecated
- */
- @Deprecated
- public static IDebugTarget newDebugTarget(ILaunch launch, ICDITarget target, String name, IProcess iprocess,
- IProcess debuggerProcess, IFile file, boolean allowTerminate, boolean allowDisconnect, boolean stopInMain)
- throws CoreException {
- IBinaryExecutable exeFile = getBinary(file);
- String stopSymbol = null;
- if (stopInMain)
- stopSymbol = launch.getLaunchConfiguration().getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
- ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
- return newDebugTarget(launch, file.getProject(), target, name, iprocess, exeFile, allowTerminate,
- allowDisconnect, stopSymbol, true);
- }
-
- /**
- * @deprecated
- */
- @Deprecated
- public static IDebugTarget newAttachDebugTarget(ILaunch launch, ICDITarget target, String name,
- IProcess debuggerProcess, IFile file) throws CoreException {
- IBinaryExecutable exeFile = getBinary(file);
- return newDebugTarget(launch, file.getProject(), target, name, null, exeFile, true, true, false);
- }
-
- /**
- * @deprecated
- */
- @Deprecated
- public static IDebugTarget newCoreFileDebugTarget(final ILaunch launch, final ICDITarget target, final String name,
- final IProcess debuggerProcess, final IFile file) throws CoreException {
- IBinaryExecutable exeFile = getBinary(file);
- return newDebugTarget(launch, file.getProject(), target, name, null, exeFile, true, false, false);
- }
-
- private static IBinaryExecutable getBinary(IFile file) throws CoreException {
- IProject project = file.getProject();
- ICConfigExtensionReference[] binaryParsersExt = CCorePlugin.getDefault().getDefaultBinaryParserExtensions(
- project);
- for (int i = 0; i < binaryParsersExt.length; i++) {
- IBinaryParser parser = CoreModelUtil.getBinaryParser(binaryParsersExt[i]);
- try {
- IBinaryFile exe = parser.getBinary(file.getLocation());
- if (exe instanceof IBinaryExecutable) {
- return (IBinaryExecutable) exe;
- }
- } catch (IOException e) {
- }
- }
- throw new CoreException(new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), -1,
- DebugCoreMessages.getString("CDIDebugModel.0"), null)); //$NON-NLS-1$
- }
-
private static boolean sameSourceHandle(String handle1, String handle2) {
if (handle1 == null || handle2 == null)
return false;
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java
index 41274aa5adb..177b245c5d1 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java
@@ -12,11 +12,7 @@
*******************************************************************************/
package org.eclipse.cdt.debug.core;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import org.eclipse.cdt.debug.core.breakpointactions.BreakpointActionManager;
import org.eclipse.cdt.debug.core.command.CCommandAdapterFactory;
@@ -27,11 +23,9 @@ import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
import org.eclipse.cdt.debug.core.sourcelookup.CProjectSourceContainer;
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
import org.eclipse.cdt.debug.core.sourcelookup.ProgramRelativePathSourceContainer;
-import org.eclipse.cdt.debug.internal.core.DebugConfiguration;
import org.eclipse.cdt.debug.internal.core.DebugModelProvider;
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
import org.eclipse.cdt.debug.internal.core.ListenerList;
-import org.eclipse.cdt.debug.internal.core.SessionManager;
import org.eclipse.cdt.debug.internal.core.Trace;
import org.eclipse.cdt.debug.internal.core.disassembly.DisassemblyContextService;
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
@@ -41,8 +35,6 @@ import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
@@ -74,10 +66,6 @@ public class CDebugCorePlugin extends Plugin {
*/
private static CDebugCorePlugin plugin;
- private HashMap fDebugConfigurations;
-
- private HashSet fActiveDebugConfigurations;
-
/**
* Breakpoint listener list.
*/
@@ -105,8 +93,6 @@ public class CDebugCorePlugin extends Plugin {
*/
private CommonSourceLookupDirector fCommonSourceLookupDirector;
- private SessionManager fSessionManager = null;
-
/**
* The constructor.
*/
@@ -179,117 +165,6 @@ public class CDebugCorePlugin extends Plugin {
getDefault().getLog().log(new Status(IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), INTERNAL_ERROR, message, null));
}
- private void initializeDebugConfiguration() {
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(getUniqueIdentifier(), CDEBUGGER_EXTENSION_POINT_ID);
- IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
- fDebugConfigurations = new HashMap(infos.length);
- for(int i = 0; i < infos.length; i++) {
- IConfigurationElement configurationElement = infos[i];
- if (configurationElement.getName().equals(DEBUGGER_ELEMENT)) {
- DebugConfiguration configType = new DebugConfiguration(configurationElement);
- fDebugConfigurations.put(configType.getID(), configType);
- }
- }
- }
-
- private void initializeActiveDebugConfigurations() {
- fActiveDebugConfigurations = new HashSet(getDebugConfigurations().length);
- fActiveDebugConfigurations.addAll(fDebugConfigurations.keySet());
- String[] filteredTypes = CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_FILTERED_DEBUGGERS).split("\\,"); //$NON-NLS-1$
- fActiveDebugConfigurations.removeAll(Arrays.asList(filteredTypes));
- }
-
- public ICDebugConfiguration[] getDebugConfigurations() {
- if (fDebugConfigurations == null) {
- initializeDebugConfiguration();
- }
- return fDebugConfigurations.values().toArray(new ICDebugConfiguration[fDebugConfigurations.size()]);
- }
-
- public ICDebugConfiguration[] getActiveDebugConfigurations() {
- if (fDebugConfigurations == null) {
- initializeDebugConfiguration();
- }
- if (fActiveDebugConfigurations == null) {
- initializeActiveDebugConfigurations();
- }
- ArrayList list = new ArrayList(fActiveDebugConfigurations.size());
-
- for (String id : fActiveDebugConfigurations) {
- DebugConfiguration dc = fDebugConfigurations.get(id);
- if (dc != null)
- list.add(dc);
- }
- return list.toArray(new ICDebugConfiguration[list.size()]);
- }
-
- public ICDebugConfiguration[] getDefaultActiveDebugConfigurations() {
- List filtered = Arrays.asList(CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_FILTERED_DEBUGGERS).split("\\,")); //$NON-NLS-1$
- HashMap all = new HashMap(fDebugConfigurations);
- all.keySet().removeAll(filtered);
- return all.values().toArray(new ICDebugConfiguration[all.size()]);
- }
-
- public void saveFilteredDebugConfigurations(ICDebugConfiguration[] configurations) {
- disposeActiveDebugConfigurations();
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < configurations.length; ++i) {
- sb.append(configurations[i].getID()).append(',');
- }
- CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_FILTERED_DEBUGGERS, sb.toString());
- CDebugCorePlugin.getDefault().savePluginPreferences();
- }
-
- public void saveDefaultDebugConfiguration(String id) {
- CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE, (id != null) ? id : ""); //$NON-NLS-1$
- }
-
- public ICDebugConfiguration getDefaultDebugConfiguration() {
- ICDebugConfiguration result = null;
- try {
- result = getDebugConfiguration(CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE));
- } catch (CoreException e) {
- }
- return result;
- }
-
- public ICDebugConfiguration getDefaultDefaultDebugConfiguration() {
- ICDebugConfiguration result = null;
- try {
- result = getDebugConfiguration(CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE));
- } catch (CoreException e) {
- }
- if (result == null) {
- }
- return result;
- }
-
- public boolean isDefaultDebugConfiguration(String id) {
- return id.compareTo(CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE)) == 0;
- }
-
- public ICDebugConfiguration getDebugConfiguration(String id) throws CoreException {
- if (fDebugConfigurations == null) {
- initializeDebugConfiguration();
- }
- ICDebugConfiguration dbgCfg = fDebugConfigurations.get(id);
- if (dbgCfg == null) {
- IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 100, DebugCoreMessages.getString("CDebugCorePlugin.0"), null); //$NON-NLS-1$
- throw new CoreException(status);
- }
- return dbgCfg;
- }
-
- protected SessionManager getSessionManager() {
- return fSessionManager;
- }
-
- protected void setSessionManager(SessionManager sm) {
- if (fSessionManager != null)
- fSessionManager.dispose();
- fSessionManager = sm;
- }
-
public void saveCommonSourceLocations(ICSourceLocation[] locations) {
CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_SOURCE_LOCATIONS, SourceUtils.getCommonSourceLocationsMemento(locations));
}
@@ -348,7 +223,6 @@ public class CDebugCorePlugin extends Plugin {
createCommandAdapterFactory();
createBreakpointListenersList();
createDisassemblyContextService();
- setSessionManager(new SessionManager());
setDefaultLaunchDelegates();
Platform.getAdapterManager().registerAdapters(new DebugModelProvider(), ICDebugElement.class);
@@ -359,11 +233,9 @@ public class CDebugCorePlugin extends Plugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
- setSessionManager(null);
disposeDisassemblyContextService();
disposeBreakpointListenersList();
disposeCommonSourceLookupDirector();
- disposeDebugConfigurations();
super.stop(context);
}
@@ -423,21 +295,6 @@ public class CDebugCorePlugin extends Plugin {
private void convertSourceLocations(CommonSourceLookupDirector director) {
director.setSourceContainers(SourceUtils.convertSourceLocations(getCommonSourceLocations()));
}
-
- private void disposeActiveDebugConfigurations() {
- if (fActiveDebugConfigurations != null) {
- fActiveDebugConfigurations.clear();
- fActiveDebugConfigurations = null;
- }
- }
-
- private void disposeDebugConfigurations() {
- disposeActiveDebugConfigurations();
- if (fDebugConfigurations != null) {
- fDebugConfigurations.clear();
- fDebugConfigurations = null;
- }
- }
public BreakpointActionManager getBreakpointActionManager() {
if (breakpointActionManager == null)
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
index 3d6329c3b9d..0c607e563cb 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
@@ -32,17 +32,14 @@ import javax.xml.transform.stream.StreamResult;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
import org.eclipse.cdt.debug.core.model.ICDynamicPrintf;
import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICValue;
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
import org.eclipse.cdt.debug.core.model.ICWatchpoint2;
-import org.eclipse.cdt.debug.internal.core.model.CFloatingPointValue;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@@ -246,16 +243,6 @@ public class CDebugUtils {
return serializeDocument(doc, true);
}
- public static Number getFloatingPointValue(ICValue value) {
- if (value instanceof CFloatingPointValue) {
- try {
- return ((CFloatingPointValue)value).getFloatingPointValue();
- } catch (CDIException e) {
- }
- }
- return null;
- }
-
public static boolean isNaN(Number value) {
if (value instanceof Double) {
return ((Double) value).isNaN();
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java
deleted file mode 100644
index a50cf3bb6ae..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core;
-
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-
-/**
- * @deprecated use ICDIDebugger2.
- */
-@Deprecated
-public interface ICDIDebugger {
-
- /**
- * @deprecated use createSession of ICDIDebugger2
- */
- @Deprecated
- public ICDISession createDebuggerSession(ILaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger2.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger2.java
deleted file mode 100644
index bc9cba0550b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger2.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core;
-
-import java.io.File;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-
-/**
- * Replacement for deprecated ICDIDebugger.
- */
-public interface ICDIDebugger2 extends ICDIDebugger {
-
- /**
- * null can be passed as executable allowing debuggers to create session without executables,
- * or load executables later during the session.
- */
- public ICDISession createSession(ILaunch launch, File executable, IProgressMonitor monitor) throws CoreException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java
deleted file mode 100644
index 8573f5fd077..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core;
-
-import org.eclipse.core.runtime.CoreException;
-
-public interface ICDebugConfiguration {
- final static String CPU_NATIVE = "native"; //$NON-NLS-1$
-
- /**
- * @return
- * @throws CoreException
- * @deprecated
- */
- @Deprecated
- ICDebugger getDebugger() throws CoreException;
-
- ICDIDebugger createDebugger() throws CoreException;
- String getName();
- String getID();
- String getPlatform();
- String[] getCPUList();
- String[] getModeList();
- String[] getCoreFileExtensions();
- boolean supportsCPU(String cpu);
- boolean supportsMode(String mode);
-
- /**
- * Returns a list of supported build configuration ids.
- * Returns an empty array if a list has not been specified,
- * which means that this debug configuration supports all
- * build configurations.
- */
- String[] getSupportedBuildConfigPatterns();
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugger.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugger.java
deleted file mode 100644
index 633d1014228..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugger.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.debug.core.ILaunchConfiguration;
-
-/**
- *
- * @deprecated - see ICDIDebugger
- */
-@Deprecated
-public interface ICDebugger {
- public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException ;
- public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException;
- public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile) throws CDIException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICGlobalVariableManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICGlobalVariableManager.java
deleted file mode 100644
index fbe4523ccaa..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICGlobalVariableManager.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core;
-
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Manages the collection of global variables added to a debug target.
- */
-public interface ICGlobalVariableManager {
-
- /**
- * Registers with this manager the global variables specified by given descriptors.
- *
- * @param descriptors the descriptors of global variables to register with this manager
- * @throws DebugException
- */
- public void addGlobals( IGlobalVariableDescriptor[] descriptors ) throws DebugException;
-
- /**
- * Removes specified global variables from this manager.
- *
- * @param globals global variables to remove
- */
- public void removeGlobals( ICGlobalVariable[] globals );
-
- /**
- * Removes all global variables from this manager.
- */
- public void removeAllGlobals();
-
- /**
- * Returns the array of descriptors of global varibales added to this manager.
- *
- * @return the array of descriptors
- */
- public IGlobalVariableDescriptor[] getDescriptors();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionAdapterFactory.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionAdapterFactory.java
deleted file mode 100644
index 00aafd75368..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionAdapterFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.breakpointactions;
-
-import org.eclipse.cdt.debug.internal.core.model.CThread;
-import org.eclipse.core.runtime.IAdapterFactory;
-
-public class BreakpointActionAdapterFactory implements IAdapterFactory {
-
- @Override
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType.equals(ILogActionEnabler.class)) {
- if (adaptableObject instanceof CThread) {
- return new LogActionEnabler((CThread) adaptableObject);
- }
- }
- if (adapterType.equals(IResumeActionEnabler.class)) {
- if (adaptableObject instanceof CThread) {
- return new ResumeActionEnabler((CThread) adaptableObject);
- }
- }
- return null;
- }
-
- @Override
- public Class[] getAdapterList() {
- return new Class[] { ILogActionEnabler.class, IResumeActionEnabler.class, };
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/LogActionEnabler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/LogActionEnabler.java
deleted file mode 100644
index 8f3c3198145..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/LogActionEnabler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.breakpointactions;
-
-import java.util.List;
-
-import org.eclipse.cdt.debug.internal.core.model.CStackFrame;
-import org.eclipse.cdt.debug.internal.core.model.CThread;
-
-public class LogActionEnabler implements ILogActionEnabler {
-
- private CThread thread;
-
- public LogActionEnabler(CThread thread) {
- this.thread = thread;
- }
-
- @Override
- public String evaluateExpression(String expression) throws Exception {
- List frames = thread.computeStackFrames();
- CStackFrame frame = (CStackFrame) frames.get(0);
-
- return frame.evaluateExpressionToString(expression);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/ResumeActionEnabler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/ResumeActionEnabler.java
deleted file mode 100644
index 0412f310f84..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/ResumeActionEnabler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.breakpointactions;
-
-import org.eclipse.cdt.debug.internal.core.model.CThread;
-
-public class ResumeActionEnabler implements IResumeActionEnabler {
-
- private CThread thread;
-
- public ResumeActionEnabler(CThread adaptableObject) {
- thread = adaptableObject;
- }
-
- @Override
- public void resume() throws Exception {
- thread.resume();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CVariableFormat.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CVariableFormat.java
deleted file mode 100644
index 21e5b3a6c94..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CVariableFormat.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-/**
- * Defines the variable format types.
- */
-public class CVariableFormat {
-
- private final String fName;
- private final int fNum;
-
- private CVariableFormat( String name, int num ) {
- this.fName = name;
- this.fNum= num;
- }
-
- @Override
- public String toString() {
- return this.fName;
- }
-
- public int getFormatNumber() {
- return this.fNum;
- }
-
- public static CVariableFormat getFormat( int code ) {
- if ( code == NATURAL.getFormatNumber() ) {
- return NATURAL;
- } else if ( code == DECIMAL.getFormatNumber() ) {
- return DECIMAL;
- } else if ( code == BINARY.getFormatNumber() ) {
- return BINARY;
- } else if ( code == OCTAL.getFormatNumber() ) {
- return OCTAL;
- } else if ( code == HEXADECIMAL.getFormatNumber() ) {
- return HEXADECIMAL;
- } else {
- // unexpected value, mapping to NATURAL
- return NATURAL;
- }
- }
-
- public static final CVariableFormat NATURAL = new CVariableFormat( "natural", 0 ); //$NON-NLS-1$
- public static final CVariableFormat DECIMAL = new CVariableFormat( "decimal", 1 ); //$NON-NLS-1$
- public static final CVariableFormat BINARY = new CVariableFormat( "binary", 2 ); //$NON-NLS-1$
- public static final CVariableFormat OCTAL = new CVariableFormat( "octal", 3 ); //$NON-NLS-1$
- public static final CVariableFormat HEXADECIMAL = new CVariableFormat( "hexadecimal", 4 ); //$NON-NLS-1$
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAddRegisterGroupHandler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAddRegisterGroupHandler.java
deleted file mode 100644
index 1e402ad491b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAddRegisterGroupHandler.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc Khouzam (Ericsson) - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.debug.core.commands.IDebugCommandHandler;
-
-/**
- * Handler interface to for the addRegisterGroup command
- *
- * @since 7.6
- */
-public interface IAddRegisterGroupHandler extends IDebugCommandHandler {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICBreakpointFilterExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICBreakpointFilterExtension.java
deleted file mode 100644
index a30526da030..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICBreakpointFilterExtension.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Wind River Systems - Refactored from ICBreakpoint
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Breakpoint extension to allow filtering based on CDTs extended standard debug
- * model elements.
- */
-public interface ICBreakpointFilterExtension extends ICBreakpointExtension {
-
- /**
- * Add the given target to the list of this breakpoint's targets.
- * Target filters are not persisted across workbench invocations.
- *
- * @param target the target to add to the list of this breakpoint's targets.
- * @throws CoreException if unable to set the target filter
- */
- public void setTargetFilter( ICDebugTarget target ) throws CoreException;
-
- /**
- * Removes the given target from the breakpoint's target list.
- * The breakpoint has no effect in the given target.
- *
- * @param target the target filter to be removed
- * @exception CoreException if unable to remove the target filter
- */
- public void removeTargetFilter( ICDebugTarget target ) throws CoreException;
-
- /**
- * Restricts this breakpoint to suspend only in the given threads
- * when encounterd in the given threads' target.
- * All threads must be from the same target.
- * Thread filters are not persisted across workbench invocations.
- *
- * @param threads the thread filters to be set
- * @exception CoreException if unable to set the thread filters
- */
- public void setThreadFilters( ICThread[] threads ) throws CoreException;
-
- /**
- * Returns all target filters set on this breakpoint.
- *
- * @return the targets that this breakpoint is resticted to
- * @exception CoreException if unable to determine this breakpoint's
- * target filters
- */
- public ICDebugTarget[] getTargetFilters() throws CoreException;
-
- /**
- * Removes this breakpoint's thread filters in the given target, if any.
- * Has no effect if this breakpoint does not have filters in the given target.
- * All threads must be from the same target.
- *
- * @param threads the thread filters to be removed
- * @exception CoreException if unable to remove the thread filter
- */
- public void removeThreadFilters( ICThread[] threads ) throws CoreException;
-
- /**
- * Returns the threads in the given target in which this breakpoint
- * is enabled or null if this breakpoint is enabled in
- * all threads in the given target.
- *
- * @return the threads in the given target that this breakpoint is enabled for
- * @exception CoreException if unable to determine this breakpoint's thread
- * filters
- */
- public ICThread[] getThreadFilters( ICDebugTarget target ) throws CoreException;
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java
deleted file mode 100644
index 9962c470315..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IRegisterGroup;
-
-/**
- * C/C++ extension of IDebugTarget.
- */
-public interface ICDebugTarget extends IDebugTarget,
- IExecFileInfo,
- IRestart,
- IResumeWithoutSignal,
- ICDebugElement,
- ISteppingModeTarget,
- IModuleRetrieval,
- ITargetProperties {
-
- /**
- * Returns whether this target is little endian.
- *
- * @return whether this target is little endian
- */
- @Override
- public boolean isLittleEndian();
-
- /**
- * Returns whether this target supports signals.
- *
- * @return whether this target supports signals
- * @throws DebugException if this method fails.
- */
- public boolean hasSignals() throws DebugException;
-
- /**
- * Returns the list of signals defined for this target.
- *
- * @return the list of signals defined for this target
- * @throws DebugException if this method fails.
- */
- public ICSignal[] getSignals() throws DebugException;
-
- /**
- * Returns the disassembly provider of this debug target.
- *
- * @return the disassembly provider of this debug target
- * @throws DebugException if this method fails.
- */
- public IDisassembly getDisassembly() throws DebugException;
-
- /**
- * Returns whether this target is a post mortem type.
- *
- * @return whether this target is a post mortem type
- */
- public boolean isPostMortem();
-
- /**
- * Returns the list of descriptors of the target registers
- *
- * @return the list register descriptors
- * @throws DebugException if this method fails. Reasons include:
- *
- * @since 3.0
- */
- public IRegisterDescriptor[] getRegisterDescriptors() throws DebugException;
-
- /**
- * Adds a new user-defined register group to this target
- *
- * @param name the group name
- * @param descriptors the list of registers to be grouped
- *
- * @since 3.0
- */
- public void addRegisterGroup( String name, IRegisterDescriptor[] descriptors );
-
- /**
- * Removes the given register group from the target
- *
- * @param group a group to be removed
- *
- * @since 3.0
- */
- public void removeRegisterGroups( IRegisterGroup[] groups );
-
- /**
- * Replace the given group's register descriptors by the specified descriptors.
- *
- * @param group a group to be modified
- * @param descriptors a descriptor array to replace existing descriptors
- *
- * @since 3.0
- */
- public void modifyRegisterGroup( IPersistableRegisterGroup group, IRegisterDescriptor[] descriptors );
-
-
- /**
- * Removes all user-defined register groups and restores the hardware groups.
- *
- * @since 3.0
- */
- public void restoreDefaultRegisterGroups();
-
- /**
- * Returns the target address of the given breakpoint.
- *
- * @return the target address of the given breakpoint
- * @throws DebugException if the address is not available
- */
- public IAddress getBreakpointAddress( ICLineBreakpoint breakpoint ) throws DebugException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICGlobalVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICGlobalVariable.java
deleted file mode 100644
index 19e9eb06c3e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICGlobalVariable.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-/**
- * Represents a global C/C++ variable.
- */
-public interface ICGlobalVariable extends ICVariable {
-
- /**
- * Returns the descriptor of this variable. Will be null if a child of a global.
- *
- * @return the descriptor of this variable
- */
- public IGlobalVariableDescriptor getDescriptor();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICRegister.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICRegister.java
deleted file mode 100644
index 4e619d63765..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICRegister.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 ARM Limited and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * ARM Limited - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.debug.core.model.IRegister;
-
-/**
- * C/C++ specific extension of IRegister.
- * Added to be able to contribute a label provider.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=186981
- */
-public interface ICRegister extends ICVariable, IRegister {
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICVariable.java
deleted file mode 100644
index cbd92257e8b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICVariable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValueModification;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * C/C++ specific extension IVariable.
- */
-public interface ICVariable extends IVariable, ICDebugElement, IFormatSupport, ICastToArray, IValueModification, IEnableDisableTarget {
-
- /**
- * Returns the type of this variable.
- *
- * @return the type of this variable
- * @throws DebugException
- */
- ICType getType() throws DebugException;
-
- /**
- * Returns whether this variable is an argument.
- *
- * @return whether this variable is an argument
- */
- boolean isArgument();
-
- /**
- * Returns the text presentation of this variable as an expression.
- *
- * @return the text presentation of this variable as an expression
- * @throws DebugException
- */
- public String getExpressionString() throws DebugException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IChangeReverseMethodHandler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IChangeReverseMethodHandler.java
index 5766dea6b0b..c24f3ec3169 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IChangeReverseMethodHandler.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IChangeReverseMethodHandler.java
@@ -15,7 +15,7 @@ import org.eclipse.debug.core.commands.IDebugCommandHandler;
/**
* Handler interface for the reverse debug change trace method command
*
- * @since 7.8
+ * @since 8.0
*/
public interface IChangeReverseMethodHandler extends IReverseToggleHandler, IDebugCommandHandler {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IFormatSupport.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IFormatSupport.java
deleted file mode 100644
index 290b9e3f857..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IFormatSupport.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.model;
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to set and get the format of a variable.
- */
-public interface IFormatSupport {
-
- /**
- * Returns whether this variable supports formatting operations.
- *
- * @return whether this variable supports formatting operations
- */
- boolean supportsFormatting();
-
- /**
- * Returns the current format of this variable.
- *
- * @return the current format of this variable
- */
- CVariableFormat getFormat();
-
- /**
- * Sets the current format of this variable to format.
- *
- * @param format the new format type
- * @throws DebugException if this method fails.
- */
- void changeFormat( CVariableFormat format ) throws DebugException;
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
deleted file mode 100644
index bdd060f4cb0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
+++ /dev/null
@@ -1,1542 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Matthias Spycher (matthias@coware.com) - patch for bug #112008
- * Ken Ryall (Nokia) - bugs 170027, 105196
- * Ling Wang (Nokia) - bug 176081
- * Freescale Semiconductor - Address watchpoints, https://bugs.eclipse.org/bugs/show_bug.cgi?id=118299
- * QNX Software Systems - catchpoints - bug 226689
- * James Blackburn (Broadcom) - bug 314865
- * Marc Khouzam (Ericsson) - Support for dynamic printf (400628)
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIBreakpointMovedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIBreakpointProblemEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDICreatedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIExecutableReloadedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement3;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
-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.ICDILocationBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint2;
-import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointFilterExtension;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.ICDynamicPrintf;
-import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICThread;
-import org.eclipse.cdt.debug.core.model.ICTracepoint;
-import org.eclipse.cdt.debug.core.model.ICWatchpoint;
-import org.eclipse.cdt.debug.core.model.ICWatchpoint2;
-import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
-import org.eclipse.cdt.debug.internal.core.breakpoints.BreakpointProblems;
-import org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.core.IBreakpointsListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
-
-public class CBreakpointManager implements IBreakpointsListener, IBreakpointManagerListener, ICDIEventListener, IAdaptable {
-
- static class BreakpointInProgess {
-
- private ICDIBreakpoint fCDIBreakpoint;
-
- void setCDIBreakpoint( ICDIBreakpoint b ) {
- fCDIBreakpoint = b;
- }
-
- ICDIBreakpoint getCDIBreakpoint() {
- return fCDIBreakpoint;
- }
- }
-
- class BreakpointMap {
-
- /**
- * Maps CBreakpoints to CDI breakpoints.
- */
- private HashMap fCBreakpoints;
-
- /**
- * Maps CDI breakpoints to CBreakpoints.
- */
- private HashMap fCDIBreakpoints;
-
- protected BreakpointMap() {
- fCBreakpoints = new HashMap( 10 );
- fCDIBreakpoints = new HashMap( 10 );
- }
-
- void register( ICBreakpoint breakpoint ) {
- fCBreakpoints.put( breakpoint, new BreakpointInProgess() );
- }
-
- void put( ICBreakpoint breakpoint, ICDIBreakpoint cdiBreakpoint ) {
- fCBreakpoints.put( breakpoint, cdiBreakpoint );
- fCDIBreakpoints.put( cdiBreakpoint, breakpoint );
- }
-
- Object get( ICBreakpoint breakpoint ) {
- return fCBreakpoints.get( breakpoint );
- }
-
- ICDIBreakpoint getCDIBreakpoint( ICBreakpoint breakpoint ) {
- Object b = fCBreakpoints.get( breakpoint );
- return ( b instanceof ICDIBreakpoint ) ? (ICDIBreakpoint)b : null;
- }
-
- ICBreakpoint getCBreakpoint( ICDIBreakpoint cdiBreakpoint ) {
- ICBreakpoint breakpoint = (ICBreakpoint)fCDIBreakpoints.get( cdiBreakpoint );
- if ( breakpoint == null ) {
- ICBreakpoint[] bip = getBreakpointsInProgress();
- for ( int i = 0; i < bip.length; ++i ) {
- if ( isSameBreakpoint( bip[i], cdiBreakpoint ) ) {
- breakpoint = bip[i];
- break;
- }
- }
- }
- return breakpoint;
- }
-
- void removeCDIBreakpoint( ICDIBreakpoint cdiBreakpoint ) {
- if ( cdiBreakpoint != null ) {
- ICBreakpoint breakpoint = (ICBreakpoint)fCDIBreakpoints.remove( cdiBreakpoint );
- if ( breakpoint != null )
- fCBreakpoints.remove( breakpoint );
- }
- }
-
- boolean isRegistered( ICBreakpoint breakpoint ) {
- return ( fCBreakpoints.get( breakpoint ) != null );
- }
-
- boolean isInProgress( ICBreakpoint breakpoint ) {
- return ( fCBreakpoints.get( breakpoint ) instanceof BreakpointInProgess );
- }
-
- ICBreakpoint[] getAllCBreakpoints() {
- Set set = fCBreakpoints.keySet();
- return (ICBreakpoint[])set.toArray( new ICBreakpoint[set.size()] );
- }
-
- void dispose() {
- fCBreakpoints.clear();
- fCDIBreakpoints.clear();
- }
-
- private ICBreakpoint[] getBreakpointsInProgress() {
- ArrayList list = new ArrayList();
- Set set = fCBreakpoints.entrySet();
- Iterator it = set.iterator();
- while ( it.hasNext() ) {
- Map.Entry entry = (Map.Entry)it.next();
- if ( entry.getValue() instanceof BreakpointInProgess ) {
- list.add( entry.getKey() );
- }
- }
- return (ICBreakpoint[])list.toArray( new ICBreakpoint[list.size()] );
- }
-
- private boolean isSameBreakpoint( ICBreakpoint breakpoint, ICDIBreakpoint cdiBreakpoint ) {
- try {
- if ( breakpoint instanceof ICFunctionBreakpoint && cdiBreakpoint instanceof ICDIFunctionBreakpoint ) {
- return ( ((ICFunctionBreakpoint)breakpoint).getFunction().compareTo( ((ICDIFunctionBreakpoint)cdiBreakpoint).getLocator().getFunction() ) == 0 );
- }
- if ( breakpoint instanceof ICAddressBreakpoint && cdiBreakpoint instanceof ICDIAddressBreakpoint ) {
- IAddressFactory factory = getDebugTarget().getAddressFactory();
- return factory.createAddress( ((ICAddressBreakpoint)breakpoint).getAddress() ).equals( factory.createAddress( ((ICDIAddressBreakpoint)cdiBreakpoint).getLocator().getAddress() ) );
- }
- if ( breakpoint instanceof ICLineBreakpoint && cdiBreakpoint instanceof ICDILineBreakpoint ) {
- ICDILocator location = ((ICDILineBreakpoint)cdiBreakpoint).getLocator();
- String file = location.getFile();
- String sourceHandle = file;
- if ( !isEmpty( file ) ) {
- Object sourceElement = getSourceElement( file );
- if ( sourceElement instanceof IFile ) {
- sourceHandle = ((IFile)sourceElement).getLocation().toOSString();
- }
- else if ( sourceElement instanceof IStorage ) {
- sourceHandle = ((IStorage)sourceElement).getFullPath().toOSString();
- }
- else if ( sourceElement instanceof ITranslationUnit ) {
- sourceHandle = ((ITranslationUnit)sourceElement).getLocation().toOSString();
- }
- String bpSourceHandle = ((ICLineBreakpoint)breakpoint).getSourceHandle();
- if ( sourceElement instanceof LocalFileStorage ) { // see bug #112008
- try {
- bpSourceHandle = new File( bpSourceHandle ).getCanonicalPath();
- }
- catch( IOException e ) {
- }
- }
- return sourceHandle.equals( bpSourceHandle ) && location.getLineNumber() == ((ICLineBreakpoint)breakpoint).getLineNumber();
- }
- }
- if ( breakpoint instanceof ICWatchpoint && cdiBreakpoint instanceof ICDIWatchpoint ) {
- try {
- ICWatchpoint watchpoint = (ICWatchpoint)breakpoint;
- if ( watchpoint instanceof ICWatchpoint2 && cdiBreakpoint instanceof ICDIWatchpoint2 ) {
- ICWatchpoint2 wp2 = (ICWatchpoint2)breakpoint;
- ICDIWatchpoint2 cdiwp2 = (ICDIWatchpoint2)cdiBreakpoint;
- if ( !wp2.getMemorySpace().equals( cdiwp2.getMemorySpace() )
- || !wp2.getRange().equals( cdiwp2.getRange() ) ) {
- return false;
- }
- }
- ICDIWatchpoint cdiWatchpoint = (ICDIWatchpoint)cdiBreakpoint;
- return ( watchpoint.getExpression().compareTo( cdiWatchpoint.getWatchExpression() ) == 0 &&
- watchpoint.isReadType() == cdiWatchpoint.isReadType() &&
- watchpoint.isWriteType() == cdiWatchpoint.isWriteType() );
- }
- catch( CDIException e ) {
- }
- }
- if ( breakpoint instanceof ICEventBreakpoint && cdiBreakpoint instanceof ICDIEventBreakpoint) {
- ICEventBreakpoint mevtbkpt = (ICEventBreakpoint) breakpoint;
- ICDIEventBreakpoint cdievtbkpt = (ICDIEventBreakpoint) cdiBreakpoint;
- if (!mevtbkpt.getEventType().equals(cdievtbkpt.getEventType())) return false;
- return (mevtbkpt.getEventArgument().equals(cdievtbkpt.getExtraArgument()));
- }
- }
- catch( CoreException e ) {
- }
- return false;
- }
- }
-
- private CDebugTarget fDebugTarget;
-
- private BreakpointMap fMap;
-
- private boolean fSkipBreakpoint = false;
-
- private ArrayList fBreakpointProblems = new ArrayList();
-
- public CBreakpointManager( CDebugTarget target ) {
- super();
- fDebugTarget = target;
- fMap = new BreakpointMap();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
- */
- @Override
- public void breakpointsAdded( IBreakpoint[] breakpoints ) {
- if ( !isTargetAvailable() )
- return;
- setBreakpointsOnTarget( breakpoints );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- @Override
- public void breakpointsRemoved( IBreakpoint[] breakpoints, IMarkerDelta[] deltas ) {
- if ( !isTargetAvailable() )
- return;
- ArrayList list = new ArrayList( breakpoints.length );
- synchronized( getBreakpointMap() ) {
- for ( int i = 0; i < breakpoints.length; ++i ) {
- if ( breakpoints[i] instanceof ICBreakpoint ) {
- try { // Remove any problem markers for this breakpoint
- BreakpointProblems.removeProblemsForBreakpoint((ICBreakpoint)breakpoints[i]);
- } catch (CoreException e) {}
- Object obj = getBreakpointMap().get( (ICBreakpoint)breakpoints[i] );
- ICDIBreakpoint b = null;
- if ( obj instanceof ICDIBreakpoint ) {
- b = (ICDIBreakpoint)obj;
- }
- else if ( obj instanceof BreakpointInProgess ) {
- b = ((BreakpointInProgess)obj).getCDIBreakpoint();
- }
- if ( b != null ) {
- list.add( b );
- }
- }
- }
- }
- if ( list.isEmpty() )
- return;
- final ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])list.toArray( new ICDIBreakpoint[list.size()] );
- final ICDITarget cdiTarget = getCDITarget();
- DebugPlugin.getDefault().asyncExec( new Runnable() {
- @Override
- public void run() {
- try {
- cdiTarget.deleteBreakpoints( cdiBreakpoints );
- }
- catch( CDIException e ) {
- }
- }
- } );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- @Override
- public void breakpointsChanged( IBreakpoint[] breakpoints, IMarkerDelta[] deltas ) {
- ArrayList removeList = new ArrayList( breakpoints.length );
- ArrayList installList = new ArrayList( breakpoints.length );
- synchronized ( getBreakpointMap() ) {
- for ( int i = 0; i < breakpoints.length; ++i ) {
- if ( !(breakpoints[i] instanceof ICBreakpoint) || !isTargetAvailable() )
- continue;
- ICBreakpoint b = (ICBreakpoint)breakpoints[i];
- boolean install = false;
- try {
- ICDebugTarget[] tfs = getFilterExtension(b).getTargetFilters();
- install = Arrays.asList( tfs ).contains( getDebugTarget() );
- }
- catch( CoreException e ) {
- }
- boolean registered = getBreakpointMap().isRegistered( b );
- boolean inProgress = getBreakpointMap().isInProgress( b );
- if ( registered && !inProgress && !install ) {
- removeList.add( b );
- }
- if ( !registered && install ) {
- installList.add( b );
- }
- }
- }
- breakpointsRemoved( (ICBreakpoint[])removeList.toArray( new ICBreakpoint[removeList.size()] ), new IMarkerDelta[0] );
- breakpointsAdded( (ICBreakpoint[])installList.toArray( new ICBreakpoint[removeList.size()] ) );
- for ( int i = 0; i < breakpoints.length; ++i ) {
- if ( breakpoints[i] instanceof ICBreakpoint && isTargetAvailable() )
- changeBreakpointProperties( (ICBreakpoint)breakpoints[i], deltas[i] );
- }
- }
-
- @Override
- public void breakpointManagerEnablementChanged( boolean enabled ) {
- doSkipBreakpoints( !enabled );
- }
-
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- if ( source != null && source.getTarget().equals( getDebugTarget().getCDITarget() ) ) {
- if ( event instanceof ICDICreatedEvent ) {
- if ( source instanceof ICDIBreakpoint )
- handleBreakpointCreatedEvent( (ICDIBreakpoint)source );
- }
- else if ( event instanceof ICDIDestroyedEvent ) {
- if ( source instanceof ICDIBreakpoint )
- handleBreakpointDestroyedEvent( (ICDIBreakpoint)source );
- }
- else if ( event instanceof ICDIChangedEvent ) {
- if ( source instanceof ICDIBreakpoint )
- handleBreakpointChangedEvent( (ICDIBreakpoint)source );
- }
- else if ( event instanceof ICDIBreakpointMovedEvent ) {
- if ( source instanceof ICDIBreakpoint )
- handleBreakpointMovedEvent( (ICDIBreakpointMovedEvent) event );
- }
- else if ( event instanceof ICDIExecutableReloadedEvent ) {
- if ( source instanceof ICDITarget )
- handleExecutableReloadedEvent( (ICDIExecutableReloadedEvent) event );
- }
- else if ( event instanceof ICDIBreakpointProblemEvent ) {
- if ( source instanceof ICDIBreakpoint )
- handleBreakpointProblemEvent( (ICDIBreakpointProblemEvent) event );
- }
- }
- }
- }
-
- @Override
- public Object getAdapter( Class adapter ) {
- if ( CBreakpointManager.class.equals( adapter ) )
- return this;
- if ( CDebugTarget.class.equals( adapter ) )
- return getDebugTarget();
- if ( ICDebugTarget.class.equals( adapter ) )
- return getDebugTarget();
- if ( IDebugTarget.class.equals( adapter ) )
- return getDebugTarget();
- return null;
- }
-
- public CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- public void initialize() {
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener( this );
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener( this );
- getDebugTarget().getCDISession().getEventManager().addEventListener( this );
- }
-
- public void dispose() {
- getDebugTarget().getCDISession().getEventManager().removeEventListener( this );
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener( this );
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener( this );
- removeAllBreakpoints();
- getBreakpointMap().dispose();
- }
-
- public IAddress getBreakpointAddress( ICLineBreakpoint breakpoint ) {
- BigInteger address = null;
- synchronized ( getBreakpointMap() ) {
- ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
- if ( cdiBreakpoint instanceof ICDILocationBreakpoint ) {
- ICDILocator locator = ((ICDILocationBreakpoint)cdiBreakpoint).getLocator();
- if ( locator != null ) {
- address = locator.getAddress();
- }
- }
- }
- return ( address != null ) ? getDebugTarget().getAddressFactory().createAddress( address ) : null;
- }
-
- public IBreakpoint getBreakpoint( ICDIBreakpoint cdiBreakpoint ) {
- ICBreakpoint b;
- synchronized ( getBreakpointMap() ) {
- b = getBreakpointMap().getCBreakpoint( cdiBreakpoint );
- }
- return b;
- }
-
- /**
- * @return true if the breakpoint is of a temporary type, otherwise false
- */
- private boolean isTemporary(ICDIBreakpoint cdiBreakpoint) {
- if (cdiBreakpoint instanceof ICDIBreakpoint2) {
- return (((ICDIBreakpoint2)cdiBreakpoint).getType() & ICBreakpointType.TEMPORARY) != 0;
- }
- else {
- return cdiBreakpoint.isTemporary();
- }
- }
-
- private void handleBreakpointCreatedEvent( ICDIBreakpoint cdiBreakpoint ) {
- if ( cdiBreakpoint instanceof ICDIWatchpoint )
- doHandleWatchpointCreatedEvent( (ICDIWatchpoint)cdiBreakpoint );
- if ( cdiBreakpoint instanceof ICDIEventBreakpoint )
- doHandleEventBreakpointCreatedEvent( (ICDIEventBreakpoint)cdiBreakpoint );
- else if ( cdiBreakpoint instanceof ICDILocationBreakpoint )
- doHandleLocationBreakpointCreatedEvent( (ICDILocationBreakpoint)cdiBreakpoint );
- try {
- if ( !isTemporary(cdiBreakpoint) && !DebugPlugin.getDefault().getBreakpointManager().isEnabled() && cdiBreakpoint.isEnabled() ) {
- changeBreakpointPropertiesOnTarget(cdiBreakpoint, false, null);
- }
- } catch (CDIException e){
- }
- }
-
- private void doHandleEventBreakpointCreatedEvent(ICDIEventBreakpoint cdiEventBkpt) {
- ICBreakpoint breakpoint = null;
- ICBreakpoint newBreakpoint = null;
- boolean createNewCBkpt = false;
- final BreakpointMap bkptMap = getBreakpointMap();
-
- synchronized( bkptMap ) {
- createNewCBkpt = (bkptMap.getCBreakpoint( cdiEventBkpt ) == null);
- }
-
- // This has to be done outside the breakpoint map lock, or a deadlock
- // can occur (according to rev 1.71). Not certain we'll use this new CDT
- // breakpoint; we need to check the map again.
- if (createNewCBkpt) {
- try {
- newBreakpoint = createEventBreakpoint( cdiEventBkpt );
- }
- catch( CDIException e ) {}
- catch( CoreException e ) {}
- }
-
- synchronized( bkptMap ) {
- breakpoint = bkptMap.getCBreakpoint( cdiEventBkpt );
- if ( breakpoint == null ) {
- breakpoint = newBreakpoint;
- }
-
- if ( breakpoint != null ) {
- // filter must be set up prior to adding the breakpoint to the
- // map to avoid a race condition in breakpointsChanged for the
- // "registered && !inProgress && !install" condition
- try {
- getFilterExtension(breakpoint).setTargetFilter( getDebugTarget() );
- }
- catch( CoreException e ) {}
-
- bkptMap.put( breakpoint, cdiEventBkpt );
- }
- }
-
- // Delete the new CDT breakpoint if we didn't end up using it
- if (newBreakpoint != null && newBreakpoint != breakpoint) {
- try {
- newBreakpoint.delete();
- } catch (CoreException e) {}
- }
-
- if ( breakpoint != null ) {
- try {
- ((CBreakpoint)breakpoint).register( true );
- }
- catch( CoreException e ) {
- }
- getBreakpointNotifier().breakpointInstalled( getDebugTarget(), breakpoint );
- changeBreakpointProperties( breakpoint, cdiEventBkpt );
- }
-
- }
-
- private void doHandleLocationBreakpointCreatedEvent( ICDILocationBreakpoint cdiBreakpoint ) {
- if ( isTemporary(cdiBreakpoint) )
- return;
- ICBreakpoint breakpoint = null;
- ICBreakpoint newBreakpoint = null;
- final BreakpointMap bkptMap = getBreakpointMap();
- boolean createNewCBkpt = false;
- synchronized( bkptMap ) {
- createNewCBkpt = (bkptMap.getCBreakpoint( cdiBreakpoint ) == null);
- }
-
- // This has to be done outside the breakpoint map lock, or a deadlock
- // can occur (according to rev 1.71). Not certain we'll use this new CDT
- // breakpoint; we need to check the map again.
- if ( createNewCBkpt ) {
- newBreakpoint = createLocationBreakpoint( cdiBreakpoint );
- }
-
- synchronized( bkptMap ) {
- breakpoint = bkptMap.getCBreakpoint( cdiBreakpoint );
- if ( breakpoint == null ) {
- breakpoint = newBreakpoint;
- }
-
- if ( breakpoint != null ) {
- // filter must be set up prior to adding the breakpoint to the
- // map to avoid a race condition in breakpointsChanged for the
- // "registered && !inProgress && !install" condition
- try {
- getFilterExtension(breakpoint).setTargetFilter( getDebugTarget() );
- }
- catch( CoreException e ) {}
-
- bkptMap.put( breakpoint, cdiBreakpoint );
- }
- }
-
- // Delete the new CDT breakpoint if we didn't end up using it
- if (newBreakpoint != null && newBreakpoint != breakpoint) {
- try {
- newBreakpoint.delete();
- } catch (CoreException e) {}
- }
-
- if ( breakpoint != null ) {
- try {
- BreakpointProblems.removeProblemsForResolvedBreakpoint(breakpoint, getDebugTarget().getInternalID());
- ((CBreakpoint)breakpoint).register( true );
- }
- catch( CoreException e ) {
- }
- getBreakpointNotifier().breakpointInstalled( getDebugTarget(), breakpoint );
- changeBreakpointProperties( breakpoint, cdiBreakpoint );
- }
- }
-
- private void doHandleWatchpointCreatedEvent( ICDIWatchpoint cdiWatchpoint ) {
- ICBreakpoint breakpoint = null;
- ICBreakpoint newBreakpoint = null;
- boolean createNewCBkpt = false;
- final BreakpointMap bkptMap = getBreakpointMap();
-
- synchronized( bkptMap ) {
- createNewCBkpt = (bkptMap.getCBreakpoint( cdiWatchpoint ) == null);
- }
-
- // This has to be done outside the breakpoint map lock, or a deadlock
- // can occur (according to rev 1.71). Not certain we'll use this new CDT
- // breakpoint; we need to check the map again.
- if (createNewCBkpt) {
- try {
- newBreakpoint = createWatchpoint( cdiWatchpoint );
- }
- catch( CDIException e ) {}
- catch( CoreException e ) {}
- }
-
- synchronized( bkptMap ) {
- breakpoint = bkptMap.getCBreakpoint( cdiWatchpoint );
- if ( breakpoint == null ) {
- breakpoint = newBreakpoint;
- }
-
- if ( breakpoint != null ) {
- // filter must be set up prior to adding the breakpoint to the
- // map to avoid a race condition in breakpointsChanged for the
- // "registered && !inProgress && !install" condition
- try {
- getFilterExtension(breakpoint).setTargetFilter( getDebugTarget() );
- }
- catch( CoreException e ) {}
-
- bkptMap.put( breakpoint, cdiWatchpoint );
- }
- }
-
- // Delete the new CDT breakpoint if we didn't end up using it
- if (newBreakpoint != null && newBreakpoint != breakpoint) {
- try {
- newBreakpoint.delete();
- } catch (CoreException e) {}
- }
-
-
- if ( breakpoint != null ) {
- try {
- ((CBreakpoint)breakpoint).register( true );
- }
- catch( CoreException e ) {
- }
- getBreakpointNotifier().breakpointInstalled( getDebugTarget(), breakpoint );
- changeBreakpointProperties( breakpoint, cdiWatchpoint );
- }
- }
-
- private void handleBreakpointMovedEvent( ICDIBreakpointMovedEvent movedEvent )
- {
- ICBreakpoint breakpoint = getBreakpointMap().getCBreakpoint( (ICDIBreakpoint) movedEvent.getSource() );
- if (breakpoint != null)
- {
- try {
- int newLineNumber = movedEvent.getNewLocation().getLineNumber();
- int currLineNumber = breakpoint.getMarker().getAttribute(IMarker.LINE_NUMBER, newLineNumber);
- breakpoint.getMarker().setAttribute(IMarker.LINE_NUMBER, newLineNumber);
- IMarker marker = BreakpointProblems.reportBreakpointMoved(
- breakpoint, currLineNumber, newLineNumber, getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- } catch (CoreException e) {}
- }
-
- }
-
- private void handleExecutableReloadedEvent( ICDIExecutableReloadedEvent reloadedEvent )
- {
- ArrayList uninstalledCBplist = new ArrayList();
-
- IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
- IBreakpoint[] breakpoints = manager.getBreakpoints( CDIDebugModel.getPluginIdentifier() );
-
- for (int i = 0; i < breakpoints.length; i++) {
- if (breakpoints[i] instanceof ICBreakpoint && (getBreakpointMap().getCDIBreakpoint((ICBreakpoint) breakpoints[i]) == null))
- {
- uninstalledCBplist.add(breakpoints[i]);
- }
- }
-
- setBreakpointsOnTarget((IBreakpoint[]) uninstalledCBplist.toArray(new IBreakpoint[uninstalledCBplist.size()]));
- }
-
- private void handleBreakpointProblemEvent( ICDIBreakpointProblemEvent problemEvent )
- {
- ICBreakpoint breakpoint = getBreakpointMap().getCBreakpoint( problemEvent.getBreakpoint() );
- if (breakpoint != null)
- {
- try {
- IMarker marker;
- marker = BreakpointProblems.reportBreakpointProblem(breakpoint, problemEvent.getDescription(),
- problemEvent.getSeverity(), problemEvent.getProblemType(), problemEvent.removeExisting(),
- problemEvent.removeOnly(), getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- } catch (DebugException e) {}
- }
-
- }
-
- private void handleBreakpointChangedEvent( ICDIBreakpoint cdiBreakpoint ) {
- ICBreakpoint breakpoint = getBreakpointMap().getCBreakpoint( cdiBreakpoint );
- if ( breakpoint != null ) {
- Map map = new HashMap( 3 );
- try {
- if ( !fSkipBreakpoint && DebugPlugin.getDefault().getBreakpointManager().isEnabled() ) {
- map.put( IBreakpoint.ENABLED, Boolean.valueOf( cdiBreakpoint.isEnabled() ) );
- }
- else {
- map.put( IBreakpoint.ENABLED, Boolean.valueOf( breakpoint.isEnabled() ) );
- }
- }
- catch( CDIException e ) {
- }
- catch( CoreException e ) {
- }
- try {
- map.put( ICBreakpoint.IGNORE_COUNT, new Integer( cdiBreakpoint.getCondition().getIgnoreCount() ) );
- }
- catch( CDIException e ) {
- }
- try {
- map.put( ICBreakpoint.CONDITION, cdiBreakpoint.getCondition().getExpression() );
- }
- catch( CDIException e ) {
- }
- getBreakpointNotifier().breakpointChanged( getDebugTarget(), breakpoint, map );
- }
- }
-
- private void handleBreakpointDestroyedEvent( ICDIBreakpoint cdiBreakpoint ) {
- ICBreakpoint breakpoint = null;
- synchronized( getBreakpointMap() ) {
- breakpoint = getBreakpointMap().getCBreakpoint( cdiBreakpoint );
- getBreakpointMap().removeCDIBreakpoint( cdiBreakpoint );
- }
- if ( breakpoint != null ) {
- if ( isFilteredByTarget( breakpoint, getDebugTarget() ) ) {
- try {
- getFilterExtension(breakpoint).removeTargetFilter( getDebugTarget() );
- }
- catch( CoreException e ) {
- }
- }
- try {
- BreakpointProblems.removeProblemsForBreakpoint(breakpoint);
- } catch (CoreException e) {}
- getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), new IBreakpoint[] { breakpoint } );
- }
- }
-
- private BreakpointMap getBreakpointMap() {
- return fMap;
- }
-
- private void removeAllBreakpoints() {
- // Remove all breakpoint problem markers
- for (Iterator iter = fBreakpointProblems.iterator(); iter.hasNext();) {
- IMarker marker = (IMarker) iter.next();
- try {
- marker.delete();
- } catch (CoreException e) {}
- }
-
- ArrayList installedCDIBplist = new ArrayList();
- ArrayList installedCBplist = new ArrayList();
- ICBreakpoint[] breakpoints;
- synchronized( getBreakpointMap() ) {
- breakpoints = getBreakpointMap().getAllCBreakpoints();
- for ( int i = 0; i < breakpoints.length; ++i ) {
- if ( !getBreakpointMap().isInProgress( breakpoints[i] ) ) {
- installedCDIBplist.add( getBreakpointMap().getCDIBreakpoint( breakpoints[i] ) );
-
- installedCBplist.add(breakpoints[i]);
- }
- }
- }
- if ( installedCDIBplist.isEmpty() )
- return;
-
- final ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])installedCDIBplist.toArray( new ICDIBreakpoint[installedCDIBplist.size()] );
- final ICDITarget cdiTarget = getCDITarget();
-
- // Clean up the target filter to avoid that the CDebugTarget remains referenced by the breakpoint.
- // Note that though we're "removing" breakpoints from a debug session, the breakpoint objects in the
- // platform aren't going anywhere. They are "global" model elements. They go away only when the user
- // deletes them.
- CDebugTarget target = getDebugTarget();
- for (Iterator iter = installedCBplist.iterator(); iter.hasNext();) {
- ICBreakpoint breakpoint = (ICBreakpoint) iter.next();
- if ( isFilteredByTarget( breakpoint, target ) ) {
- try {
- getFilterExtension(breakpoint).removeTargetFilter( target );
- }
- catch( CoreException e ) {
- CDebugCorePlugin.log( e.getStatus() );
- }
- }
- }
-
- DebugPlugin.getDefault().asyncExec( new Runnable() {
- @Override
- public void run() {
- try {
- cdiTarget.deleteBreakpoints( cdiBreakpoints );
- }
- catch( CDIException e ) {
- }
- }
- } );
-
- getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), (ICBreakpoint[])installedCBplist.toArray( new ICBreakpoint[installedCBplist.size()] ) );
- }
-
- private ICBreakpoint[] register( IBreakpoint[] breakpoints ) {
- ArrayList list = new ArrayList( breakpoints.length );
- synchronized ( getBreakpointMap() ) {
- for ( int i = 0; i < breakpoints.length; ++i ) {
- if ( breakpoints[i] instanceof ICBreakpoint && isTargetBreakpoint( (ICBreakpoint)breakpoints[i] ) && !(getBreakpointMap().isRegistered( (ICBreakpoint)breakpoints[i] )) ) {
- getBreakpointMap().register( (ICBreakpoint)breakpoints[i] );
- list.add( breakpoints[i] );
- }
- }
- }
- return (ICBreakpoint[])list.toArray( new ICBreakpoint[list.size()] );
- }
-
- private void setBreakpointsOnTarget( IBreakpoint[] breakpoints ) {
- final ICBreakpoint[] bkpts = register( breakpoints );
- if ( bkpts.length > 0 ) {
- DebugPlugin.getDefault().asyncExec( new Runnable() {
- @Override
- public void run() {
- setBreakpointsOnTarget0( bkpts );
- }
- } );
- }
- }
-
- protected void setBreakpointsOnTarget0( ICBreakpoint[] breakpoints ) {
- ICDITarget cdiTarget = getCDITarget();
- ICDIBreakpointManagement2 bpManager2 = null;
- if (cdiTarget instanceof ICDIBreakpointManagement2)
- bpManager2 = (ICDIBreakpointManagement2) cdiTarget;
- for ( int i = 0; i < breakpoints.length; ++i ) {
- try {
- ICDIBreakpoint b = null;
- int breakpointType = ICBreakpointType.REGULAR;
- ICBreakpoint icbreakpoint = breakpoints[i];
- // Bug 314865: CDI breakpoint is only created enabled if the global breakpoint disable toggle isn't set
- boolean enabled = icbreakpoint.isEnabled() && DebugPlugin.getDefault().getBreakpointManager().isEnabled();
- if (icbreakpoint instanceof ICBreakpointType) {
- breakpointType = ((ICBreakpointType) icbreakpoint).getType();
- }
- if ( icbreakpoint instanceof ICTracepoint) {
- ICTracepoint tracepoint = (ICTracepoint)icbreakpoint;
- IMarker marker = BreakpointProblems.reportUnsupportedTracepoint(tracepoint, getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- } else if ( icbreakpoint instanceof ICDynamicPrintf) {
- ICDynamicPrintf dprintf = (ICDynamicPrintf)icbreakpoint;
- IMarker marker = BreakpointProblems.reportUnsupportedDynamicPrintf(dprintf, getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- }
- else if ( icbreakpoint instanceof ICFunctionBreakpoint ) {
- ICFunctionBreakpoint breakpoint = (ICFunctionBreakpoint)icbreakpoint;
- String function = breakpoint.getFunction();
- String fileName = breakpoint.getFileName();
- ICDIFunctionLocation location = cdiTarget.createFunctionLocation( fileName, function );
- ICDICondition condition = createCondition( breakpoint );
- IMarker marker = BreakpointProblems.reportUnresolvedBreakpoint(breakpoint, getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- if (bpManager2 != null)
- b = bpManager2.setFunctionBreakpoint( breakpointType, location, condition, true, enabled );
- else
- b = cdiTarget.setFunctionBreakpoint( breakpointType, location, condition, true );
- } else if ( icbreakpoint instanceof ICAddressBreakpoint ) {
- ICAddressBreakpoint breakpoint = (ICAddressBreakpoint)icbreakpoint;
- String address = breakpoint.getAddress();
- ICDIAddressLocation location = cdiTarget.createAddressLocation( new BigInteger ( ( address.startsWith( "0x" ) ) ? address.substring( 2 ) : address, 16 ) ); //$NON-NLS-1$
- ICDICondition condition = createCondition( breakpoint );
- if (bpManager2 != null)
- b = bpManager2.setAddressBreakpoint( breakpointType, location, condition, true, enabled );
- else
- b = cdiTarget.setAddressBreakpoint( breakpointType, location, condition, true );
- } else if ( icbreakpoint instanceof ICLineBreakpoint ) {
- ICLineBreakpoint breakpoint = (ICLineBreakpoint)icbreakpoint;
- String handle = breakpoint.getSourceHandle();
- IPath path = convertPath( handle );
- ICDILineLocation location = cdiTarget.createLineLocation( path.toPortableString(), breakpoint.getLineNumber() );
- ICDICondition condition = createCondition( breakpoint );
- IMarker marker = BreakpointProblems.reportUnresolvedBreakpoint(breakpoint, getDebugTarget().getName(), getDebugTarget().getInternalID());
- if (marker != null)
- fBreakpointProblems.add(marker);
- if (bpManager2 != null)
- b = bpManager2.setLineBreakpoint( breakpointType, location, condition, true, enabled );
- else
- b = cdiTarget.setLineBreakpoint( breakpointType, location, condition, true );
- } else if ( icbreakpoint instanceof ICWatchpoint ) {
- ICWatchpoint watchpoint = (ICWatchpoint)icbreakpoint;
- int accessType = 0;
- accessType |= (watchpoint.isWriteType()) ? ICDIWatchpoint.WRITE : 0;
- accessType |= (watchpoint.isReadType()) ? ICDIWatchpoint.READ : 0;
- String expression = watchpoint.getExpression();
- ICDICondition condition = createCondition( watchpoint );
- if ( bpManager2 != null ) {
- if ( icbreakpoint instanceof ICWatchpoint2 ) {
- ICWatchpoint2 wp2 = (ICWatchpoint2)watchpoint;
- b = bpManager2.setWatchpoint( breakpointType, accessType, expression, wp2.getMemorySpace(),
- wp2.getRange(), condition, enabled );
- } else {
- b = bpManager2.setWatchpoint( breakpointType, accessType, expression, condition, enabled );
- }
- } else {
- b = cdiTarget.setWatchpoint(breakpointType, accessType, expression, condition );
- }
- } else if (icbreakpoint instanceof ICEventBreakpoint) {
- ICEventBreakpoint eventbkpt = (ICEventBreakpoint) icbreakpoint;
- ICDICondition condition = createCondition(eventbkpt);
- if (cdiTarget instanceof ICDIBreakpointManagement3) {
- ICDIBreakpointManagement3 bpManager3 = (ICDIBreakpointManagement3) cdiTarget;
- b = bpManager3.setEventBreakpoint(eventbkpt.getEventType(), eventbkpt
- .getEventArgument(), breakpointType, condition, true, enabled);
- } else {
- throw new UnsupportedOperationException("BreakpointManager does not support this type of breapoints");
- }
-
- }
- if ( b != null ) {
- Object obj = getBreakpointMap().get( icbreakpoint );
- if ( obj instanceof BreakpointInProgess ) {
- ((BreakpointInProgess)obj).setCDIBreakpoint( b );
- }
- }
- // Hack: see bug 105196: [CDI]: Add "enabled" flag to the "set...Breakpoint" methods
- if (bpManager2 == null && b != null && b.isEnabled() != enabled ) {
- b.setEnabled( enabled );
- }
- }
- catch( CoreException e ) {
- }
- catch( NumberFormatException e ) {
- }
- catch( CDIException e ) {
- }
- }
- }
-
- protected ICDITarget getCDITarget() {
- return getDebugTarget().getCDITarget();
- }
-
- private ICDICondition createCondition( ICBreakpoint breakpoint ) throws CoreException, CDIException {
- return getCDITarget().createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition(), getThreadNames( breakpoint ) );
- }
-
- private String[] getThreadNames( ICBreakpoint breakpoint ) {
- try {
- ICThread[] threads = getFilterExtension(breakpoint).getThreadFilters( getDebugTarget() );
- if ( threads == null )
- return new String[0];
- String[] names = new String[threads.length];
- for ( int i = 0; i < threads.length; ++i ) {
- names[i] = threads[i].getName();
- }
- return names;
- }
- catch( DebugException e ) {
- }
- catch( CoreException e ) {
- }
- return new String[0];
- }
-
- private ICLineBreakpoint createLocationBreakpoint( ICDILocationBreakpoint cdiBreakpoint ) {
- ICLineBreakpoint breakpoint = null;
- try {
- ICDILocator location = cdiBreakpoint.getLocator();
- String file = location.getFile();
- String sourceHandle = file;
- IResource resource = getProject();
- if (file != null && file.length() > 0) {
- Object sourceElement = getSourceElement(file);
- if ( sourceElement instanceof IFile ) {
- sourceHandle = ((IFile)sourceElement).getLocation().toOSString();
- resource = (IResource)sourceElement;
- }
- else if ( sourceElement instanceof IStorage ) {
- sourceHandle = ((IStorage)sourceElement).getFullPath().toOSString();
- resource = ResourcesPlugin.getWorkspace().getRoot();
- }
- else if ( sourceElement instanceof ITranslationUnit ) {
- ITranslationUnit translationUnit = (ITranslationUnit)sourceElement;
- sourceHandle = translationUnit.getPath().toString();
- resource = translationUnit.getResource();
-
- // an IExternalTranslationUnit doesn't have an IResource
- if (resource == null) {
- resource = getProject();
- }
- }
- } else {
- sourceHandle = getExecFileHandle();
- }
- if ( cdiBreakpoint instanceof ICDILineBreakpoint ) {
- breakpoint = createLineBreakpoint( sourceHandle, resource, cdiBreakpoint );
- }
- else if ( cdiBreakpoint instanceof ICDIFunctionBreakpoint ) {
- breakpoint = createFunctionBreakpoint( sourceHandle, resource,cdiBreakpoint );
- }
- else if ( cdiBreakpoint instanceof ICDIAddressBreakpoint ) {
- breakpoint = createAddressBreakpoint( sourceHandle, resource,cdiBreakpoint );
- }
- }
- catch( CDIException e ) {
- }
- catch( CoreException e ) {
- }
- return breakpoint;
- }
-
- private ICLineBreakpoint createLineBreakpoint( String sourceHandle, IResource resource, ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException {
- ICLineBreakpoint breakpoint = CDIDebugModel.createLineBreakpoint( sourceHandle,
- resource,
- getCdiBreakpointType(cdiBreakpoint),
- cdiBreakpoint.getLocator().getLineNumber(),
- cdiBreakpoint.isEnabled(),
- cdiBreakpoint.getCondition().getIgnoreCount(),
- cdiBreakpoint.getCondition().getExpression(),
- false );
-// ICDILocator locator = cdiBreakpoint.getLocator();
-// if ( locator != null ) {
-// BigInteger address = locator.getAddress();
-// if ( address != null ) {
-// breakpoint.setAddress( address.toString() );
-// }
-// }
- return breakpoint;
- }
-
- /**
- * Utility method that queries the CDI client for the breakpoint type.
- *
- * @param cdiBreakpoint
- * the CDI breakpoint
- * @return an ICDIBreakpointType constant
- */
- @SuppressWarnings("deprecation")
- private int getCdiBreakpointType(ICDIBreakpoint cdiBreakpoint) {
- if (cdiBreakpoint instanceof ICDIBreakpoint2) {
- // the new way
- return ((ICDIBreakpoint2)cdiBreakpoint).getType();
- }
- else {
- // the old way
- int type = cdiBreakpoint.isHardware() ? ICBreakpointType.HARDWARE : ICBreakpointType.REGULAR;
- if (cdiBreakpoint.isTemporary()) {
- type |= ICBreakpointType.TEMPORARY;
- }
- return type;
- }
- }
-
- private ICFunctionBreakpoint createFunctionBreakpoint( String sourceHandle, IResource resource, ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException {
- ICDILocator location = cdiBreakpoint.getLocator();
- int line = location.getLineNumber();
- ICFunctionBreakpoint breakpoint = CDIDebugModel.createFunctionBreakpoint(
- sourceHandle,
- resource,
- getCdiBreakpointType(cdiBreakpoint),
- location.getFunction(),
- -1,
- -1,
- line,
- cdiBreakpoint.isEnabled(),
- cdiBreakpoint.getCondition().getIgnoreCount(),
- cdiBreakpoint.getCondition().getExpression(),
- false);
- return breakpoint;
- }
-
- private ICAddressBreakpoint createAddressBreakpoint( String sourceHandle, IResource resource, ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException {
- String binary = getExecFileHandle();
- IAddress address = getDebugTarget().getAddressFactory().createAddress( cdiBreakpoint.getLocator().getAddress() );
- ICDILocator location = cdiBreakpoint.getLocator();
- int line = location.getLineNumber();
- ICAddressBreakpoint breakpoint = CDIDebugModel.createAddressBreakpoint(
- binary,
- sourceHandle,
- resource,
- ICBreakpointType.REGULAR,
- line,
- address,
- cdiBreakpoint.isEnabled(),
- cdiBreakpoint.getCondition().getIgnoreCount(),
- cdiBreakpoint.getCondition().getExpression(),
- false);
- return breakpoint;
- }
-
- private ICWatchpoint createWatchpoint( ICDIWatchpoint cdiWatchpoint ) throws CDIException, CoreException {
- String sourceHandle = getExecFileHandle();
- ICWatchpoint watchpoint = null;
- if ( cdiWatchpoint instanceof ICDIWatchpoint2 ){
- watchpoint = CDIDebugModel.createWatchpoint( sourceHandle,
- getProject(),
- cdiWatchpoint.isWriteType(),
- cdiWatchpoint.isReadType(),
- cdiWatchpoint.getWatchExpression(),
- ( (ICDIWatchpoint2)cdiWatchpoint ).getMemorySpace(),
- ( (ICDIWatchpoint2)cdiWatchpoint ).getRange(),
- cdiWatchpoint.isEnabled(),
- cdiWatchpoint.getCondition().getIgnoreCount(),
- cdiWatchpoint.getCondition().getExpression(),
- false);
- } else {
- watchpoint = CDIDebugModel.createWatchpoint( sourceHandle,
- getProject(),
- cdiWatchpoint.isWriteType(),
- cdiWatchpoint.isReadType(),
- cdiWatchpoint.getWatchExpression(),
- cdiWatchpoint.isEnabled(),
- cdiWatchpoint.getCondition().getIgnoreCount(),
- cdiWatchpoint.getCondition().getExpression(),
- false );
- }
- return watchpoint;
- }
-
- private ICEventBreakpoint createEventBreakpoint(ICDIEventBreakpoint cdiEventBkpt) throws CDIException,
- CoreException {
-
- ICEventBreakpoint eventBkpt;
- eventBkpt = CDIDebugModel.eventBreakpointExists(cdiEventBkpt.getEventType(), cdiEventBkpt
- .getExtraArgument());
- if (eventBkpt != null)
- return eventBkpt;
- eventBkpt = CDIDebugModel.createEventBreakpoint(cdiEventBkpt.getEventType(), cdiEventBkpt
- .getExtraArgument(), false);
- return eventBkpt;
- }
-
- private void changeBreakpointProperties( ICBreakpoint breakpoint, IMarkerDelta delta ) {
- ICDIBreakpoint cdiBreakpoint = null;
- synchronized( getBreakpointMap() ) {
- if ( !getBreakpointMap().isInProgress( breakpoint ) )
- cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
- }
- if ( cdiBreakpoint == null )
- return;
- ICDITarget cdiTarget = getCDITarget();
- try {
- boolean enabled = breakpoint.isEnabled() && DebugPlugin.getDefault().getBreakpointManager().isEnabled();
- boolean oldEnabled = ( delta != null ) ? delta.getAttribute( IBreakpoint.ENABLED, true ) : enabled;
- int ignoreCount = breakpoint.getIgnoreCount();
- int oldIgnoreCount = ( delta != null ) ? delta.getAttribute( ICBreakpoint.IGNORE_COUNT, 0 ) : ignoreCount;
- String condition = breakpoint.getCondition();
- String oldCondition = ( delta != null ) ? delta.getAttribute( ICBreakpoint.CONDITION, "" ) : condition; //$NON-NLS-1$
- String[] newThreadIs = getThreadNames( breakpoint );
- Boolean enabled0 = null;
- ICDICondition condition0 = null;
- if ( enabled != oldEnabled && enabled != cdiBreakpoint.isEnabled() ) {
- enabled0 = Boolean.valueOf( enabled );
- }
- if ( ignoreCount != oldIgnoreCount || condition.compareTo( oldCondition ) != 0 || areThreadFiltersChanged( newThreadIs, cdiBreakpoint ) ) {
- ICDICondition cdiCondition = cdiTarget.createCondition( ignoreCount, condition, newThreadIs );
- if ( !cdiCondition.equals( cdiBreakpoint.getCondition() ) ) {
- condition0 = cdiCondition;
- }
- }
- int line = 0;
- if (breakpoint instanceof ILineBreakpoint) {
- ILineBreakpoint l = (ILineBreakpoint) breakpoint;
- line = l.getLineNumber();
- }
- int oldLine = ( delta != null ) ? delta.getAttribute( IMarker.LINE_NUMBER, 0 ) : 0;
- boolean basic = oldLine>0 && oldLine != line;
-
- if (breakpoint instanceof ICBreakpointType) {
- int oldType = ( delta != null ) ? delta.getAttribute( ICBreakpointType.TYPE, -1 ) : -1;
- basic |= oldType != -1 && (oldType != ((ICBreakpointType) breakpoint).getType());
- }
-
- if (basic) {
- final ICBreakpoint[] breakpoints = new ICBreakpoint[] {breakpoint};
- breakpointsRemoved(breakpoints, null);
- handleBreakpointDestroyedEvent(cdiBreakpoint); // events has to processed before add executes
- breakpointsAdded(breakpoints);
- } else if (enabled0 != null || condition0 != null) {
- changeBreakpointPropertiesOnTarget(cdiBreakpoint, enabled0, condition0);
- }
- }
- catch( CoreException e ) {
- }
- catch( CDIException e ) {
- }
- }
-
- private void changeBreakpointProperties( ICBreakpoint breakpoint, ICDIBreakpoint cdiBreakpoint ) {
- Boolean enabled = null;
- try {
- boolean shouldBeEnabled = breakpoint.isEnabled() && DebugPlugin.getDefault().getBreakpointManager().isEnabled();
- if ( cdiBreakpoint.isEnabled() != shouldBeEnabled )
- enabled = shouldBeEnabled;
- }
- catch( CDIException e ) {
- }
- catch( CoreException e ) {
- }
- ICDICondition condition = null;
- try {
- ICDICondition c = createCondition( breakpoint );
- if ( !cdiBreakpoint.getCondition().equals( c ) )
- condition = c;
- }
- catch( CDIException e ) {
- }
- catch( CoreException e ) {
- }
- if ( enabled != null || condition != null )
- changeBreakpointPropertiesOnTarget( cdiBreakpoint, enabled, condition );
- }
-
- private void changeBreakpointPropertiesOnTarget( final ICDIBreakpoint breakpoint, final Boolean enabled, final ICDICondition condition ) {
- DebugPlugin.getDefault().asyncExec( new Runnable() {
- @Override
- public void run() {
- if ( enabled != null ) {
- try {
- breakpoint.setEnabled( enabled.booleanValue() );
- }
- catch( CDIException e ) {
- }
- }
- if ( condition != null ) {
- try {
- breakpoint.setCondition( condition );
- }
- catch( CDIException e ) {
- }
- }
- }
- } );
- }
-
- public void setInitialBreakpoints() {
- IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
- IBreakpoint[] bps = manager.getBreakpoints( CDIDebugModel.getPluginIdentifier() );
-
- ICDITargetConfiguration config = getDebugTarget().getCDITarget().getConfiguration();
-
- if (!(config instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)config).supportsAddressBreaksOnStartup())
- { // Disable address breaks of the target does not support setting them on startup
- for( int i = 0; i < bps.length; i++ ) {
- if ( bps[i] instanceof ICBreakpoint && isTargetBreakpoint( (ICBreakpoint)bps[i] ) && !getBreakpointMap().isRegistered( (ICBreakpoint)bps[i] ) ) {
- if ( bps[i] instanceof ICAddressBreakpoint ) {
- // disable address breakpoints to prevent the debugger to insert them prematurely
- try {
- bps[i].setEnabled( false );
- }
- catch( CoreException e ) {
- }
- }
- }
- }
- }
-
- ICBreakpoint[] breakpoints = register( bps );
- setBreakpointsOnTarget0( breakpoints );
- }
-
- /**
- * Checks if matching between the symbolics referenced by the breakpoint
- * and the symbolics of the contained CDebugTarget should be done using also source handle.
- * @param breakpoint
- * @return true if source handle should be used
- */
- private boolean breakpointUsesSourceMatching(ICBreakpoint breakpoint) {
- boolean result = false;
- if (breakpoint instanceof ICLineBreakpoint) {
- result = true;
- if (breakpoint instanceof ICFunctionBreakpoint) {
- // ICDIFunctionBreakpoint on function elements from binary objects can be
- // set without having a source handle. For this case of line breakpoint
- // don't try to match breakpoints with source locator of contained CDebugTarget.
- String handle = null;
- try {
- handle = breakpoint.getSourceHandle();
- } catch (CoreException ex) {
- // ignore exception. source handle will be empty anyway.
- }
- result = (handle != null) && (handle.length() > 0);
-
- }
- }
- return result;
- }
-
- private boolean isTargetBreakpoint( ICBreakpoint breakpoint ) {
- if ( breakpoint instanceof ICAddressBreakpoint )
- return supportsAddressBreakpoint( (ICAddressBreakpoint)breakpoint );
-
- // If the breakpoint is set on a resource in this project
- // it should be enabled irrespective of what the CSourceLookupDirector thinks
- if (breakpoint.getMarker() != null) {
- IProject project = breakpoint.getMarker().getResource().getProject();
- if (getProject().equals(project))
- return true;
- if (CDebugUtils.isReferencedProject(getProject(), project))
- return true;
- }
-
- // Is it a line breakpoint with source handle ?
- if ( breakpointUsesSourceMatching( breakpoint ) ) {
- try {
- String handle = breakpoint.getSourceHandle();
- ISourceLocator sl = getSourceLocator();
- if ( sl instanceof ICSourceLocator )
- return ( ((ICSourceLocator)sl).findSourceElement( handle ) != null );
- else if ( sl instanceof CSourceLookupDirector ) {
- return ( ((CSourceLookupDirector)sl).contains( breakpoint ) );
- }
- }
- catch( CoreException e ) {
- CDebugCorePlugin.log(e);
- }
- } else {
- // Check the marker resource against the source containers ...
- IResource resource = breakpoint.getMarker().getResource();
- IProject project = resource.getProject();
- if ( project != null && project.exists() ) {
- ISourceLocator sl = getSourceLocator();
- if ( sl instanceof ICSourceLocator )
- return ((ICSourceLocator)sl).contains( project );
- else if ( sl instanceof CSourceLookupDirector )
- return ((CSourceLookupDirector)sl).contains( project );
- }
- }
- // Allow unclassified breakpoints i.e. those which aren't project scoped,
- // or not resource related (e.g. watchpoints)
- return true;
- }
-
- public boolean supportsBreakpoint( ICBreakpoint breakpoint ) {
- boolean s = false;
- synchronized( getBreakpointMap() ) {
- s = getBreakpointMap().isRegistered( breakpoint );
- }
- return s;
- }
-
- /**
- * Checks for a match between the symbolics referenced by the breakpoint
- * and the symbolics of the contained CDebugTarget.
- * @param breakpoint
- * @return true if the symbolics match or if the breakpoint has no symbolics
- */
- public boolean supportsAddressBreakpoint( ICAddressBreakpoint breakpoint ) {
- boolean sessionHasSymbols = getExecFileHandle() != null && getExecFileHandle().length() > 0;
- boolean bpHasSymbols = false;
- try {
- String module = breakpoint.getModule();
- if ( module != null && module.length() > 0 ) {
- bpHasSymbols = true;
- if ( sessionHasSymbols ) {
- return getExecFileHandle().equals( module );
- }
- }
- }
- catch( CoreException e ) {
- }
-
- // supporting old breakpoints (> 3.0)
- try {
- String sourceHandle = breakpoint.getSourceHandle();
- if ( sourceHandle != null && sourceHandle.length() > 0 ) {
- bpHasSymbols = true;
- if ( sessionHasSymbols ) {
- return getExecFileHandle().equals( sourceHandle );
- }
- }
- }
- catch( CoreException e ) {
- }
-
- // an address breakpoint can also be set in the absence of any symbols
- return !bpHasSymbols;
- }
-
- public void skipBreakpoints( boolean enabled ) {
- if ( fSkipBreakpoint != enabled && (DebugPlugin.getDefault().getBreakpointManager().isEnabled() || !enabled) ) {
- fSkipBreakpoint = enabled;
- doSkipBreakpoints( enabled );
- }
- }
-
- public void watchpointOutOfScope( ICDIWatchpoint cdiWatchpoint ) {
- handleBreakpointDestroyedEvent( cdiWatchpoint );
- }
-
- private void doSkipBreakpoints( boolean enabled ) {
- ICBreakpoint[] cBreakpoints = getBreakpointMap().getAllCBreakpoints();
- for ( int i = 0; i < cBreakpoints.length; ++i ) {
- try {
- if ( cBreakpoints[i].isEnabled() ) {
- ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( cBreakpoints[i] );
- if ( cdiBreakpoint != null ) {
- cdiBreakpoint.setEnabled( !enabled );
- }
- }
- }
- catch( CoreException e ) {
- // ignore
- }
- catch( CDIException e ) {
- // ignore
- }
- }
- }
-
- private IPath convertPath( String sourceHandle ) {
- IPath path = null;
- if ( Path.EMPTY.isValidPath( sourceHandle ) ) {
- ISourceLocator sl = getSourceLocator();
- if ( sl instanceof CSourceLookupDirector ) {
- path = ((CSourceLookupDirector)sl).getCompilationPath( sourceHandle );
- }
- if ( path == null ) {
- path = new Path( sourceHandle );
- }
- }
- return path;
- }
-
- private IProject getProject() {
- return getDebugTarget().getProject();
- }
-
- private String getExecFileHandle() {
- CDebugTarget target = getDebugTarget();
- if ( target != null ) {
- IBinaryObject binary = target.getExecFile();
- if ( binary != null ) {
- IPath path = binary.getPath();
- if ( path != null ) {
- return path.toOSString();
- }
- }
- }
- return null;
- }
-
- private ISourceLocator getSourceLocator() {
- return getDebugTarget().getLaunch().getSourceLocator();
- }
-
- protected Object getSourceElement( String file ) {
- Object sourceElement = null;
- ISourceLocator locator = getSourceLocator();
- if ( locator instanceof ICSourceLocator || locator instanceof CSourceLookupDirector ) {
- if ( locator instanceof ICSourceLocator )
- sourceElement = ((ICSourceLocator)locator).findSourceElement( file );
- else
- sourceElement = ((CSourceLookupDirector)locator).getSourceElement( file );
- }
- return sourceElement;
- }
-
- protected boolean isEmpty( String str ) {
- return !( str != null && str.trim().length() > 0 );
- }
-
- private boolean isTargetAvailable() {
- return getDebugTarget().getCDITarget().getConfiguration().supportsBreakpoints() && getDebugTarget().isAvailable();
- }
-
- private CBreakpointNotifier getBreakpointNotifier() {
- return CBreakpointNotifier.getInstance();
- }
-
- private boolean isFilteredByTarget( ICBreakpoint breakpoint, ICDebugTarget target ) {
- boolean result = false;
- try {
- ICDebugTarget[] tfs = getFilterExtension(breakpoint).getTargetFilters();
- result = Arrays.asList( tfs ).contains( target );
- }
- catch( CoreException e ) {
- // ignore
- }
- return result;
- }
-
- private boolean areThreadFiltersChanged( String[] newIds, ICDIBreakpoint cdiBreakpoint ) {
- try {
- String[] oldIds = cdiBreakpoint.getCondition().getThreadIds();
- if ( oldIds.length != newIds.length )
- return true;
- List list = Arrays.asList( oldIds );
- for ( int i = 0; i < newIds.length; ++i ) {
- if ( !list.contains( newIds[i] ) ) {
- return true;
- }
- }
- }
- catch( CDIException e ) {
- }
- return false;
- }
-
- private ICBreakpointFilterExtension getFilterExtension(ICBreakpoint bp) throws CoreException{
- return bp.getExtension(
- CDIDebugModel.getPluginIdentifier(), ICBreakpointFilterExtension.class);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java
deleted file mode 100644
index 01ea87d4319..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2013 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.util.Date;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDIDebugger;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.ICDebugger;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IProcess;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.MessageFormat;
-
-public class CDebugAdapter implements ICDIDebugger {
- final ICDebugger fDebugger;
-
- /**
- * @param debugger
- */
- public CDebugAdapter(ICDebugger debugger) {
- fDebugger = debugger;
- }
-
- /* (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.ICDIDebugger#createDebuggerSession(org.eclipse.debug.core.ILaunch,
- * org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public ICDISession createDebuggerSession(ILaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException {
- ILaunchConfiguration config = launch.getLaunchConfiguration();
- if (exe == null) {
- abort(InternalDebugCoreMessages.CDebugAdapter_Program_file_not_specified, null,
- ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
- }
- IFile[] exeFile = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(exe.getPath());
- if (exeFile.length == 0) {
- abort(InternalDebugCoreMessages.CDebugAdapter_0, null, -1);
- }
- int pid = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, -1);
- String coreFile = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null);
- ICDISession session;
- try {
- if (pid == -1 && coreFile == null) {
- session = fDebugger.createLaunchSession(config, exeFile[0]);
- } else if (pid != -1) {
- session = fDebugger.createAttachSession(config, exeFile[0], pid);
- } else {
- session = fDebugger.createCoreSession(config, exeFile[0], new Path(coreFile));
- }
- Process debugger = session.getSessionProcess();
- if (debugger != null) {
- IProcess debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
- launch.addProcess(debuggerProcess);
- }
- return session;
- } catch (CDIException e) {
- abort(e.getLocalizedMessage(), e, -1);
- }
- throw new IllegalStateException(); // should never happen
- }
-
- protected String renderDebuggerProcessLabel() {
- String format = "{0} ({1})"; //$NON-NLS-1$
- String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
- String message = InternalDebugCoreMessages.CDebugAdapter_1;
- return MessageFormat.format(format, message, timestamp);
- }
-
- protected void abort(String message, Throwable exception, int code) throws CoreException {
- MultiStatus status = new MultiStatus(CDebugCorePlugin.getUniqueIdentifier(), code, message, exception);
- status.add(new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), code,
- exception == null ? "" : exception.getLocalizedMessage(), //$NON-NLS-1$
- exception));
- throw new CoreException(status);
- }
-
- public static ICProject getCProject(ILaunchConfiguration configuration) throws CoreException {
- String projectName = getProjectName(configuration);
- if (projectName != null) {
- projectName = projectName.trim();
- if (projectName.length() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
- if (cProject != null && cProject.exists()) {
- return cProject;
- }
- }
- }
- return null;
- }
-
- public static String getProjectName(ILaunchConfiguration configuration) throws CoreException {
- return configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
- }
-
- public static String getProgramName(ILaunchConfiguration configuration) throws CoreException {
- String programName = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String) null);
- if (programName != null) {
- programName = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(programName);
- }
- return programName;
- }
-
- public static IPath getProgramPath(ILaunchConfiguration configuration) throws CoreException {
- String path = getProgramName(configuration);
- if (path == null) {
- return null;
- }
- return new Path(path);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java
index a6a33294142..d951fd1b0e7 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java
@@ -16,7 +16,6 @@ import java.nio.charset.Charset;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.cdi.ICDIFormat;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
@@ -42,9 +41,6 @@ public class CDebugCorePreferenceInitializer extends AbstractPreferenceInitializ
IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(CDebugCorePlugin.PLUGIN_ID);
defaultPreferences.putInt(ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, ICDebugConstants.DEF_NUMBER_OF_INSTRUCTIONS);
- defaultPreferences.putInt(ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, ICDIFormat.NATURAL);
- defaultPreferences.putInt(ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, ICDIFormat.NATURAL);
- defaultPreferences.putInt(ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, ICDIFormat.NATURAL);
defaultPreferences.put(ICDebugConstants.PREF_DEBUG_CHARSET, Charset.defaultCharset().name());
if (Platform.getOS().equals(Platform.OS_WIN32)) {
defaultPreferences.put(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET, "UTF-16"); //$NON-NLS-1$
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDisassemblyContextProvider.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDisassemblyContextProvider.java
deleted file mode 100644
index 469781e5fc0..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDisassemblyContextProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 ARM Limited and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * ARM Limited - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.internal.core;
-
-import org.eclipse.cdt.debug.core.disassembly.IDisassemblyContextProvider;
-import org.eclipse.cdt.debug.core.model.ICDebugElement;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.debug.core.model.IDebugTarget;
-
-/**
- * org.eclipse.cdt.debug.internal.core.CDisassemblyContextProvider:
- * //TODO Add description.
- */
-public class CDisassemblyContextProvider implements IDisassemblyContextProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.disassembly.IDisassemblyContextProvider#getDisassemblyContext(java.lang.Object)
- */
- @Override
- public Object getDisassemblyContext( Object element ) {
- if ( element instanceof ICDebugElement ) {
- IDebugTarget target = ((ICDebugElement)element).getDebugTarget();
- return ((CDebugTarget)target).getDisassemblyRetrieval();
- }
- return null;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CGlobalVariableManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CGlobalVariableManager.java
deleted file mode 100644
index 24bc5b35688..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CGlobalVariableManager.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2013 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Gaetano Santoro (gaetano.santoro@st.com): patch for
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=274499
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.ICGlobalVariableManager;
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.CVariable;
-import org.eclipse.cdt.debug.internal.core.model.CVariableFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Manages all global variables registered with a debug target.
- */
-public class CGlobalVariableManager implements ICGlobalVariableManager {
-
- private static final String GLOBAL_VARIABLE_LIST = "globalVariableList"; //$NON-NLS-1$
- private static final String GLOBAL_VARIABLE = "globalVariable"; //$NON-NLS-1$
- private static final String ATTR_GLOBAL_VARIABLE_PATH = "path"; //$NON-NLS-1$
- private static final String ATTR_GLOBAL_VARIABLE_NAME = "name"; //$NON-NLS-1$
-
- private CDebugTarget fDebugTarget;
-
- private IGlobalVariableDescriptor[] fInitialDescriptors = new IGlobalVariableDescriptor[0];
-
- private List fGlobals;
-
- /**
- * Constructor for CGlobalVariableManager.
- */
- public CGlobalVariableManager( CDebugTarget target ) {
- super();
- setDebugTarget( target );
- initialize();
- }
-
- protected CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- private void setDebugTarget( CDebugTarget debugTarget ) {
- fDebugTarget = debugTarget;
- }
-
- public ICGlobalVariable[] getGlobals() {
- if ( fGlobals == null ) {
- try {
- addGlobals( getInitialDescriptors() );
- }
- catch( DebugException e ) {
- DebugPlugin.log( e );
- }
- }
- return fGlobals.toArray( new ICGlobalVariable[fGlobals.size()] );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICGlobalVariableManager#addGlobals(IGlobalVariableDescriptor[])
- */
- @Override
- public void addGlobals( IGlobalVariableDescriptor[] descriptors ) throws DebugException {
- fGlobals = new ArrayList( 10 );
- MultiStatus ms = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(), 0, "", null ); //$NON-NLS-1$
- List globals = new ArrayList( descriptors.length );
- for ( int i = 0; i < descriptors.length; ++i ) {
- try {
- globals.add( getDebugTarget().createGlobalVariable( descriptors[i] ) );
- }
- catch( DebugException e ) {
- ms.add( e.getStatus() );
- }
- }
- if ( globals.size() > 0 ) {
- synchronized( fGlobals ) {
- fGlobals.addAll( globals );
- }
- }
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- if ( !ms.isOK() ) {
- throw new DebugException( ms );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICGlobalVariableManager#removeGlobals(ICGlobalVariable[])
- */
- @Override
- public void removeGlobals( ICGlobalVariable[] globals ) {
- synchronized( fGlobals ) {
- fGlobals.removeAll( Arrays.asList( globals ) );
- }
- for ( int i = 0; i < globals.length; ++i ) {
- if ( globals[i] instanceof CVariable )
- ((CVariable)globals[i]).dispose();
- }
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICGlobalVariableManager#removeAllGlobals()
- */
- @Override
- public void removeAllGlobals() {
- if (fGlobals == null ) {
- return;
- }
-
- ICGlobalVariable[] globals;
- synchronized( fGlobals ) {
- globals = fGlobals.toArray( new ICGlobalVariable[fGlobals.size()] );
- fGlobals.clear();
- }
- for ( int i = 0; i < globals.length; ++i ) {
- if ( globals[i] instanceof CVariable )
- ((CVariable)globals[i]).dispose();
- }
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
-
- public void dispose() {
- if ( fGlobals != null ) {
- for (ICGlobalVariable global : fGlobals) {
- ((CVariable)global).dispose();
- }
- fGlobals.clear();
- fGlobals = null;
- }
- }
-
- public String getMemento() {
- Document document = null;
- try {
- document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- Element node = document.createElement( GLOBAL_VARIABLE_LIST );
- document.appendChild( node );
- ICGlobalVariable[] globals = getGlobals();
- for (ICGlobalVariable global : globals) {
- IGlobalVariableDescriptor descriptor = global.getDescriptor();
- // children of globals don't have a descriptor, though getGlobals() shouldn't return only top level globals
- if (descriptor != null) {
- Element child = document.createElement( GLOBAL_VARIABLE );
- child.setAttribute( ATTR_GLOBAL_VARIABLE_NAME, descriptor.getName() );
- child.setAttribute( ATTR_GLOBAL_VARIABLE_PATH, descriptor.getPath().toOSString() );
- node.appendChild( child );
- }
- }
- return CDebugUtils.serializeDocument( document );
- }
- catch( ParserConfigurationException e ) {
- DebugPlugin.log( e );
- }
- catch( IOException e ) {
- DebugPlugin.log( e );
- }
- catch( TransformerException e ) {
- DebugPlugin.log( e );
- }
- return null;
- }
-
- private void initializeFromMemento( String memento ) throws CoreException {
- Exception ex = null;
- try {
- Element root = null;
- DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- StringReader reader = new StringReader( memento );
- InputSource source = new InputSource( reader );
- root = parser.parse( source ).getDocumentElement();
- if ( root.getNodeName().equalsIgnoreCase( GLOBAL_VARIABLE_LIST ) ) {
- List descriptors = new ArrayList();
- NodeList list = root.getChildNodes();
- int length = list.getLength();
- for( int i = 0; i < length; ++i ) {
- Node node = list.item( i );
- short type = node.getNodeType();
- if ( type == Node.ELEMENT_NODE ) {
- Element entry = (Element)node;
- if ( entry.getNodeName().equalsIgnoreCase( GLOBAL_VARIABLE ) ) {
- String name = entry.getAttribute( ATTR_GLOBAL_VARIABLE_NAME );
- String pathString = entry.getAttribute( ATTR_GLOBAL_VARIABLE_PATH );
- IPath path = new Path( pathString );
- if ( path.isValidPath( pathString ) ) {
- descriptors.add( CVariableFactory.createGlobalVariableDescriptor( name, path ) );
- }
- }
- }
- }
- fInitialDescriptors = descriptors.toArray( new IGlobalVariableDescriptor[descriptors.size()] );
- return;
- }
- }
- catch( ParserConfigurationException e ) {
- ex = e;
- }
- catch( SAXException e ) {
- ex = e;
- }
- catch( IOException e ) {
- ex = e;
- }
- abort(InternalDebugCoreMessages.CGlobalVariableManager_0, ex);
- }
-
- private void initialize() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- String memento = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_GLOBAL_VARIABLES, "" ); //$NON-NLS-1$
- if ( memento != null && memento.trim().length() != 0 )
- initializeFromMemento( memento );
- }
- catch( CoreException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /**
- * Throws an internal error exception
- */
- private void abort( String message, Throwable e ) throws CoreException {
- IStatus s = new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), CDebugCorePlugin.INTERNAL_ERROR, message, e );
- throw new CoreException( s );
- }
-
- private IGlobalVariableDescriptor[] getInitialDescriptors() {
- return fInitialDescriptors;
- }
-
- public void save() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_GLOBAL_VARIABLES, getMemento() );
- wc.doSave();
- }
- catch( CoreException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICGlobalVariableManager#getDescriptors()
- */
- @Override
- public IGlobalVariableDescriptor[] getDescriptors() {
- if ( fGlobals == null )
- return getInitialDescriptors();
- List descrs = new ArrayList();
- for (ICGlobalVariable global : fGlobals) {
- IGlobalVariableDescriptor descr = global.getDescriptor();
- if (descr != null) { // children of globals don't have a descriptor, though 'fGlobals' should contain only top level globals
- descrs.add(descr);
- }
- }
- return descrs.toArray(new IGlobalVariableDescriptor[descrs.size()]);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
deleted file mode 100644
index bdb16e2bb53..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2013 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.core.IAddressFactory2;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemorySpaceEncoder;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemorySpaceManagement;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlock;
-import org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.CExpression;
-import org.eclipse.cdt.debug.internal.core.model.CMemoryBlockExtension;
-import org.eclipse.cdt.debug.internal.core.model.CStackFrame;
-import org.eclipse.cdt.debug.internal.core.model.CThread;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IMemoryBlockExtension;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IValue;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Implements the memory retrieval features based on the CDI model.
- */
-public class CMemoryBlockRetrievalExtension extends PlatformObject implements IMemorySpaceAwareMemoryBlockRetrieval {
-
- private static final String MEMORY_BLOCK_EXPRESSION_LIST = "memoryBlockExpressionList"; //$NON-NLS-1$
- private static final String MEMORY_BLOCK_EXPRESSION_ITEM = "memoryBlockExpressionItem"; //$NON-NLS-1$
- private static final String MEMORY_BLOCK_EXPRESSION = "expression"; //$NON-NLS-1$
- private static final String MEMORY_BLOCK_MEMSPACEID = "memorySpaceID"; //$NON-NLS-1$
- private static final String ATTR_MEMORY_BLOCK_MEMSPACEID_TEXT = "text"; //$NON-NLS-1$
- private static final String ATTR_MEMORY_BLOCK_EXPRESSION_TEXT = "text"; //$NON-NLS-1$
-
- CDebugTarget fDebugTarget;
-
- /**
- * Constructor for CMemoryBlockRetrievalExtension.
- */
- public CMemoryBlockRetrievalExtension( CDebugTarget debugTarget ) {
- fDebugTarget = debugTarget;
- }
-
- protected CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- public void initialize() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- String memento = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_MEMORY_BLOCKS, "" ); //$NON-NLS-1$
- if ( memento != null && memento.trim().length() != 0 )
- initializeFromMemento( memento );
- }
- catch( CoreException e ) {
- CDebugCorePlugin.log( e );
- }
- }
-
- private void parseMementoExprItem(Element element, List expressions, List memorySpaceIDs) {
- NodeList list = element.getChildNodes();
- int length = list.getLength();
- String exp = null;
- String memorySpaceID = null;
- for( int i = 0; i < length; ++i ) {
- Node node = list.item( i );
- if ( node.getNodeType() == Node.ELEMENT_NODE ) {
- Element entry = (Element)node;
- if ( entry.getNodeName().equalsIgnoreCase( MEMORY_BLOCK_EXPRESSION ) ) {
- exp = entry.getAttribute( ATTR_MEMORY_BLOCK_EXPRESSION_TEXT );
- } else if ( entry.getNodeName().equalsIgnoreCase( MEMORY_BLOCK_MEMSPACEID ) ) {
- memorySpaceID = entry.getAttribute( ATTR_MEMORY_BLOCK_MEMSPACEID_TEXT );
- }
- }
- }
- if (exp != null) {
- expressions.add( exp );
- memorySpaceIDs.add( memorySpaceID );
- }
- }
-
-
- private void initializeFromMemento( String memento ) throws CoreException {
- Element root = DebugPlugin.parseDocument( memento );
- if ( root.getNodeName().equalsIgnoreCase( MEMORY_BLOCK_EXPRESSION_LIST ) ) {
- List expressions = new ArrayList();
- List memorySpaceIDs = new ArrayList();
- NodeList list = root.getChildNodes();
- int length = list.getLength();
- for( int i = 0; i < length; ++i ) {
- Node node = list.item( i );
- if ( node.getNodeType() == Node.ELEMENT_NODE ) {
- Element entry = (Element)node;
- if ( entry.getNodeName().equalsIgnoreCase( MEMORY_BLOCK_EXPRESSION_ITEM ) ) {
- parseMementoExprItem(entry, expressions, memorySpaceIDs);
- }
- }
- }
- createMemoryBlocks( expressions.toArray( new String[expressions.size()]) ,
- memorySpaceIDs.toArray( new String[memorySpaceIDs.size()]));
-
- return;
- }
- abort(InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_3, null);
- }
-
- /**
- * Convert a simple literal address (e.g., "0x1000") to a BigInteger value
- * using the debug target's address factory.
- *
- * We throw a NumberFormatException if the string is not a valid literal
- * address. If the backend implements the new&improved factory interface,
- * we'll throw a NumberFormatException if the string is a literal address
- * but is outside of the valid range. Old address factories will simply
- * truncate the value.
- *
- * @param expression
- * @return
- * @throws DebugException if target not available
- */
- private BigInteger evaluateLiteralAddress(String addr) throws DebugException {
- CDebugTarget target = getDebugTarget();
- if (target == null) {
- throw new DebugException(new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED,
- InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_CDebugTarget_not_available, null));
- }
- IAddressFactory addrFactory = target.getAddressFactory();
- if (addrFactory instanceof IAddressFactory2) {
- return ((IAddressFactory2)addrFactory).createAddress(addr, false).getValue();
- }
- else {
- return addrFactory.createAddress(addr).getValue();
- }
- }
-
- private void createMemoryBlocks( String[] expressions, String[] memorySpaceIDs ) {
- List list = new ArrayList( expressions.length );
- for ( int i = 0; i < expressions.length; ++i ) {
- try {
- IAddress address = getDebugTarget().getAddressFactory().createAddress( expressions[i] );
- if ( address != null ) {
- if (memorySpaceIDs[i] == null) {
- list.add( new CMemoryBlockExtension( getDebugTarget(), address.toHexAddressString(), address.getValue() ) );
- } else {
- list.add( new CMemoryBlockExtension( getDebugTarget(), expressions[i], address.getValue(), memorySpaceIDs[i] ) );
- }
- }
- } catch (NumberFormatException exc) {
- CDebugCorePlugin.log(exc);
- }
- }
- DebugPlugin.getDefault().getMemoryBlockManager().addMemoryBlocks( list.toArray( new IMemoryBlock[list.size()] ) );
- }
-
- public String getMemento() throws CoreException {
- IMemoryBlock[] blocks = DebugPlugin.getDefault().getMemoryBlockManager().getMemoryBlocks( getDebugTarget() );
- Document document = DebugPlugin.newDocument();
- Element exprList = document.createElement( MEMORY_BLOCK_EXPRESSION_LIST );
- for ( int i = 0; i < blocks.length; ++i ) {
- if ( blocks[i] instanceof IMemoryBlockExtension ) {
- IMemoryBlockExtension memBlockExt = (IMemoryBlockExtension)blocks[i];
- Element exprItem = document.createElement( MEMORY_BLOCK_EXPRESSION_ITEM );
- exprList.appendChild(exprItem);
-
- String memorySpaceID = null;
- if (memBlockExt instanceof IMemorySpaceAwareMemoryBlock) {
- memorySpaceID = ((IMemorySpaceAwareMemoryBlock)memBlockExt).getMemorySpaceID();
- }
- BigInteger addrBigInt = memBlockExt.getBigBaseAddress();
-
- Element child = document.createElement( MEMORY_BLOCK_EXPRESSION );
- child.setAttribute( ATTR_MEMORY_BLOCK_EXPRESSION_TEXT, "0x" + addrBigInt.toString(16) ); //$NON-NLS-1$
- exprItem.appendChild( child );
-
- if (memorySpaceID != null) {
- child = document.createElement( MEMORY_BLOCK_MEMSPACEID );
- child.setAttribute( ATTR_MEMORY_BLOCK_MEMSPACEID_TEXT, memorySpaceID);
- exprItem.appendChild( child );
- }
- }
- }
- document.appendChild( exprList );
- return DebugPlugin.serializeDocument( document );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtensionRetrieval#getExtendedMemoryBlock(java.lang.String, org.eclipse.debug.core.model.IDebugElement)
- */
- @Override
- public IMemoryBlockExtension getExtendedMemoryBlock( String expression, Object selected ) throws DebugException {
- return getMemoryBlock(expression, selected, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#getExtendedMemoryBlock(java.lang.String, java.lang.Object, java.lang.String)
- */
- @Override
- public IMemorySpaceAwareMemoryBlock getMemoryBlock( String expression, Object selected, String memorySpaceID ) throws DebugException {
- String address = null;
- CExpression exp = null;
- String msg = null;
- try {
- if (selected instanceof IDebugElement) {
- IDebugElement debugElement = (IDebugElement)selected;
- IDebugTarget target = debugElement.getDebugTarget();
- if (!(target instanceof CDebugTarget)) {
- throw new DebugException( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, msg, null ) );
- }
-
- // See if the expression is a simple numeric value; if it is, we can avoid some costly
- // processing (calling the backend to resolve the expression)
- try {
- return new CMemoryBlockExtension((CDebugTarget)target, expression, evaluateLiteralAddress(expression), memorySpaceID);
- } catch (NumberFormatException nfexc) {}
-
- // OK, expression is not a simple literal address; keep trucking and try to resolve as expression
- CStackFrame frame = getStackFrame( debugElement );
- if ( frame != null ) {
- // Get the address of the expression
- ICDIExpression cdiExpression = frame.getCDITarget().createExpression( expression );
- exp = new CExpression( frame, cdiExpression, null );
- IValue value = exp.getValue();
- if ( value instanceof ICValue ) {
- ICType type = ((ICValue)value).getType();
- if ( type != null ) {
- // get the address for the expression, allow all types
- String rawExpr = exp.getExpressionString();
- String voidExpr = "(void *)(" + rawExpr + ')'; //$NON-NLS-1$
- String attempts[] = { rawExpr, voidExpr };
- for (int i = 0; i < attempts.length; i++) {
- String expr = attempts[i];
- address = frame.evaluateExpressionToString(expr);
- if (address != null) {
- try {
- BigInteger a = (address.startsWith("0x")) ? new BigInteger(address.substring(2), 16) : new BigInteger(address); //$NON-NLS-1$
- return new CMemoryBlockExtension((CDebugTarget) target, expression, a, memorySpaceID);
- } catch (NumberFormatException e) {
- // not pointer? lets cast it to void*
- if (i == 0)
- continue;
- throw e;
- }
- }
- }
-
- }
- else {
- msg = MessageFormat.format(InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_1, expression);
- }
- }
- else {
- msg = MessageFormat.format(InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_2, expression);
- }
- }
- }
- }
- catch( CDIException e ) {
- msg = e.getMessage();
- }
- catch( NumberFormatException e ) {
- msg = MessageFormat.format(InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_0, expression);
- }
- finally {
- if (exp != null) {
- exp.dispose();
- }
- }
-
- throw new DebugException( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, msg, null ) );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval()
- */
- @Override
- public boolean supportsStorageRetrieval() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
- */
- @Override
- public IMemoryBlock getMemoryBlock( long startAddress, long length ) throws DebugException {
- String expression = Long.toHexString(startAddress);
- BigInteger address = new BigInteger(expression, 16);
- expression = "0x" + expression; //$NON-NLS-1$
- return new CMemoryBlockExtension( getDebugTarget(), expression, address );
- }
-
- private CStackFrame getStackFrame( IDebugElement selected ) throws DebugException {
- if ( selected instanceof CStackFrame ) {
- return (CStackFrame)selected;
- }
- if ( selected instanceof CThread ) {
- IStackFrame frame = ((CThread)selected).getTopStackFrame();
- if ( frame instanceof CStackFrame )
- return (CStackFrame)frame;
- }
- return null;
- }
-
- public void save() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_MEMORY_BLOCKS, getMemento() );
- wc.doSave();
- }
- catch( CoreException e ) {
- CDebugCorePlugin.log( e.getStatus() );
- }
- }
-
- /**
- * Throws an internal error exception
- */
- private void abort( String message, Throwable e ) throws CoreException {
- IStatus s = new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), CDebugCorePlugin.INTERNAL_ERROR, message, e );
- throw new CoreException( s );
- }
-
- public void dispose() {
- // Fire a terminate event so our hosts can clean up. See 255120 and 283586
- DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[]{new DebugEvent( this, DebugEvent.TERMINATE )});
-
- // Minimize leaks in case we are ourselves are leaked
- fDebugTarget = null;
- }
-
- /**
- * Checks the CDI backend to see is memory spaces are supported and actually
- * available for the target process.
- *
- * @return true if the backend supports memory spaces
- */
- public boolean hasMemorySpaces() {
- return getMemorySpaces().length > 0;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#getMemorySpaces(java.lang.Object, org.eclipse.cdt.debug.internal.core.model.provisional.IRequestListener)
- */
- @Override
- public void getMemorySpaces(final Object context, GetMemorySpacesRequest request) {
- // We're not very asynchronous in CDI. DSF is another story. Also, note
- // that we ignore the context. That's because we know that there's only
- // one instance of this object per process object, and all elements of
- // the project object (process, threads, frames) will have the same
- // memory spaces
- request.setMemorySpaces(getMemorySpaces());
- request.done();
- }
-
- /**
- * This variant is called by code that is CDI-specific. This method and its
- * uses predate the introduction of the DSF/CDI-agnostic
- * IMemorySpaceAwareMemoryBlockRetrieval
- *
- * @return the memory spaces available in this debug session
- */
- public String [] getMemorySpaces(){
- if (fDebugTarget != null) {
- ICDITarget cdiTarget = fDebugTarget.getCDITarget();
- if (cdiTarget instanceof ICDIMemorySpaceManagement)
- return ((ICDIMemorySpaceManagement)cdiTarget).getMemorySpaces();
- }
-
- return new String[0];
- }
-
- /**
- * The default encoding of an {expression, memory space ID} pair into a
- * string. A CDI client can provide custom decoding by implementing
- * ICDIMemorySpaceEncoder
- */
- public static String encodeAddressDefault(String expression, String memorySpaceID) {
- return memorySpaceID + ':' + expression;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#encodeAddress(java.math.BigInteger, java.lang.String)
- */
- @Override
- public String encodeAddress(final String expression, final String memorySpaceID) {
- // See if the CDI client provides customized encoding/decoding
- if (fDebugTarget != null) {
- ICDITarget cdiTarget = fDebugTarget.getCDITarget();
- if (cdiTarget instanceof ICDIMemorySpaceEncoder) {
- return ((ICDIMemorySpaceEncoder)cdiTarget).encodeAddress(expression, memorySpaceID);
- }
- }
-
- // Nope; use default encoding
- return encodeAddressDefault(expression, memorySpaceID);
- }
-
- /*
- * The default decoding of a string into an {expression, memory space ID}
- * pair. A CDI client can provide custom decoding by implementing ICDIMemorySpaceEncoder
- */
- public static DecodeResult decodeAddressDefault(String str) throws CoreException {
- int index = str.lastIndexOf(':');
-
- // minimum is ":"
- if ((index == -1) || (index == str.length()-1)) {
- IStatus s = new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(),
- CDebugCorePlugin.INTERNAL_ERROR,
- InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_invalid_encoded_address, null);
- throw new CoreException( s );
- }
-
- final String memorySpaceID = str.substring(0, index);
- final String expression = str.substring(index+1);
-
- return new DecodeResult() {
- @Override
- public String getMemorySpaceId() { return memorySpaceID; }
- @Override
- public String getExpression() { return expression; }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#decodeAddress(java.lang.String, java.lang.StringBuffer)
- */
- @Override
- public DecodeResult decodeAddress(final String str) throws CoreException {
-
- // See if the CDI client provides customized encoding/decoding
- if (fDebugTarget != null) {
- ICDITarget cdiTarget = fDebugTarget.getCDITarget();
- if (cdiTarget instanceof ICDIMemorySpaceEncoder) {
- try {
- final ICDIMemorySpaceEncoder.DecodeResult result = ((ICDIMemorySpaceEncoder)cdiTarget).decodeAddress(str);
- return new DecodeResult() {
- @Override
- public String getMemorySpaceId() { return result.getMemorySpaceId(); }
- @Override
- public String getExpression() { return result.getExpression(); }
- };
- }
- catch (CDIException exc) {
- IStatus s = new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), CDebugCorePlugin.INTERNAL_ERROR, InternalDebugCoreMessages.CMemoryBlockRetrievalExtension_invalid_encoded_address, exc);
- throw new CoreException(s);
-
- }
- }
- }
-
- // Nope; use default decoding
- return decodeAddressDefault(str);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#creatingBlockRequiresMemorySpaceID()
- */
- @Override
- public boolean creatingBlockRequiresMemorySpaceID() {
- // A behavioral control we're not extending to CDI clients, but is being
- // extended to DSF ones.
- return false;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java
deleted file mode 100644
index cc1d7ced85f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup;
-import org.eclipse.cdt.debug.core.model.IRegisterDescriptor;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.CRegisterDescriptor;
-import org.eclipse.cdt.debug.internal.core.model.CRegisterGroup;
-import org.eclipse.cdt.debug.internal.core.model.CStackFrame;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Manages all register groups in a debug target.
- */
-public class CRegisterManager {
-
- private static final String ELEMENT_REGISTER_GROUP_LIST = "registerGroups"; //$NON-NLS-1$
- private static final String ELEMENT_REGISTER_GROUP = "group"; //$NON-NLS-1$
- private static final String ATTR_REGISTER_GROUP_MEMENTO = "memento"; //$NON-NLS-1$
-
- /**
- * The debug target associated with this manager.
- */
- private CDebugTarget fDebugTarget;
-
- /**
- * Collection of register groups added to this target. Values are of type CRegisterGroup.
- */
- protected List fRegisterGroups;
-
- /**
- * The list of all register descriptors.
- */
- private IRegisterDescriptor[] fRegisterDescriptors;
-
- private boolean fUseDefaultRegisterGroups = true;
-
- private CStackFrame fCurrentFrame;
-
- private ReentrantLock fInitializationLock = new ReentrantLock();
-
- private boolean fInitialized = false;
-
- /**
- * Constructor for CRegisterManager.
- */
- public CRegisterManager( CDebugTarget target ) {
- fDebugTarget = target;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter( Class adapter ) {
- if ( CRegisterManager.class.equals( adapter ) )
- return this;
- return null;
- }
-
- public void dispose() {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- synchronized( fRegisterGroups ) {
- Iterator it = fRegisterGroups.iterator();
- while( it.hasNext() ) {
- ((CRegisterGroup)it.next()).dispose();
- }
- fRegisterGroups.clear();
- }
- }
- } );
- }
-
- public IRegisterDescriptor[] getAllRegisterDescriptors() throws DebugException {
- return fRegisterDescriptors;
- }
-
- public IRegisterGroup[] getRegisterGroups() {
- return (IRegisterGroup[])fRegisterGroups.toArray( new IRegisterGroup[fRegisterGroups.size()] );
- }
-
- public IRegisterGroup[] getRegisterGroups( CStackFrame frame ) throws DebugException {
- setCurrentFrame( frame );
- return getRegisterGroups();
- }
-
- public void setCurrentFrame( ICStackFrame frame ) throws DebugException {
- if ( frame != null && !frame.equals( getCurrentFrame() ) ) {
- for ( IRegisterGroup group : getRegisterGroups() ) {
- ((CRegisterGroup)group).resetRegisterValues();
- }
- setCurrentFrame0( (CStackFrame)frame );
- }
- }
-
- public void initialize() {
- if ( !fInitialized ) {
- synchronized( fInitializationLock ) {
- if ( !fInitialized ) {
- boolean failed = false;
- ICDIRegisterGroup[] groups = new ICDIRegisterGroup[0];
- try {
- groups = getDebugTarget().getCDITarget().getRegisterGroups();
- }
- catch( CDIException e ) {
- CDebugCorePlugin.log( e );
- failed = true;
- }
- List list = new ArrayList();
- for( int i = 0; i < groups.length; ++i ) {
- try {
- ICDIRegisterDescriptor[] cdiDescriptors = groups[i].getRegisterDescriptors();
- for ( int j = 0; j < cdiDescriptors.length; ++j ) {
- list.add( new CRegisterDescriptor( groups[i], cdiDescriptors[j] ) );
- }
- }
- catch( CDIException e ) {
- CDebugCorePlugin.log( e );
- failed = true;
- }
- }
- fRegisterDescriptors = list.toArray( new IRegisterDescriptor[list.size()] );
- fInitialized = !failed;
- if ( failed )
- fRegisterGroups = Collections.emptyList();
- else
- createRegisterGroups();
- }
- }
- }
- }
-
- public void addRegisterGroup( final String name, final IRegisterDescriptor[] descriptors ) {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- fRegisterGroups.add( new CRegisterGroup( getDebugTarget(), name, descriptors ) );
- setUseDefaultRegisterGroups( false );
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
- } );
- }
-
- public void removeAllRegisterGroups() {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- synchronized( fRegisterGroups ) {
- Iterator it = fRegisterGroups.iterator();
- while( it.hasNext() ) {
- ((CRegisterGroup)it.next()).dispose();
- }
- fRegisterGroups.clear();
- }
- setUseDefaultRegisterGroups( false );
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
- } );
- }
-
- public void removeRegisterGroups( final IRegisterGroup[] groups ) {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- for ( int i = 0; i < groups.length; ++i ) {
- ((CRegisterGroup)groups[i]).dispose();
- }
- fRegisterGroups.removeAll( Arrays.asList( groups ) );
- setUseDefaultRegisterGroups( false );
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
- } );
- }
-
- public void restoreDefaults() {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- synchronized( fRegisterGroups ) {
- Iterator it = fRegisterGroups.iterator();
- while( it.hasNext() ) {
- ((CRegisterGroup)it.next()).dispose();
- }
- fRegisterGroups.clear();
- initializeDefaults();
- }
- getDebugTarget().fireChangeEvent( DebugEvent.CONTENT );
- }
- } );
- }
-
- private void createRegisterGroups() {
- fRegisterGroups = Collections.synchronizedList( new ArrayList( 20 ) );
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- String memento = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_REGISTER_GROUPS, "" ); //$NON-NLS-1$
- if ( memento != null && memento.length() > 0 ) {
- initializeFromMemento( memento );
- return;
- }
- }
- catch( CoreException e ) {
- }
- initializeDefaults();
- }
-
- public void targetSuspended() {
- Iterator it = fRegisterGroups.iterator();
- while( it.hasNext() ) {
- ((CRegisterGroup)it.next()).targetSuspended();
- }
- }
-
- public CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- private void initializeFromMemento( String memento ) throws CoreException {
- Node node = DebugPlugin.parseDocument( memento );
- if ( node.getNodeType() != Node.ELEMENT_NODE ) {
- abort(InternalDebugCoreMessages.CRegisterManager_0, null);
- }
- Element element = (Element)node;
- if ( !ELEMENT_REGISTER_GROUP_LIST.equals( element.getNodeName() ) ) {
- abort(InternalDebugCoreMessages.CRegisterManager_1, null);
- }
- Node childNode = element.getFirstChild();
- while( childNode != null ) {
- if ( childNode.getNodeType() == Node.ELEMENT_NODE ) {
- Element child = (Element)childNode;
- if ( ELEMENT_REGISTER_GROUP.equals( child.getNodeName() ) ) {
- String groupMemento = child.getAttribute( ATTR_REGISTER_GROUP_MEMENTO );
- CRegisterGroup group = new CRegisterGroup( getDebugTarget() );
- try {
- group.initializeFromMemento( groupMemento );
- doAddRegisterGroup( group );
- }
- catch( CoreException e ) {
- // skip this group
- }
- }
- }
- childNode = childNode.getNextSibling();
- }
- setUseDefaultRegisterGroups( false );
- }
-
- protected void initializeDefaults() {
- setUseDefaultRegisterGroups( true );
- String current = null;
- int startIndex = 0;
- for ( int i = 0; i < fRegisterDescriptors.length; ++i ) {
- CRegisterDescriptor d = (CRegisterDescriptor)fRegisterDescriptors[i];
- if ( current != null && d.getGroupName().compareTo( current ) != 0 ) {
- IRegisterDescriptor[] descriptors = new IRegisterDescriptor[i - startIndex];
- System.arraycopy( fRegisterDescriptors, startIndex, descriptors, 0, descriptors.length );
- fRegisterGroups.add( new CRegisterGroup( getDebugTarget(), current, descriptors ) );
- startIndex = i;
- }
- current = d.getGroupName();
- }
- if ( startIndex < fRegisterDescriptors.length ) {
- IRegisterDescriptor[] descriptors = new IRegisterDescriptor[fRegisterDescriptors.length - startIndex];
- System.arraycopy( fRegisterDescriptors, startIndex, descriptors, 0, descriptors.length );
- fRegisterGroups.add( new CRegisterGroup( getDebugTarget(), current, descriptors ) );
- }
- }
-
- protected synchronized void doAddRegisterGroup( IRegisterGroup group ) {
- fRegisterGroups.add( group );
- }
-
- public void save() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_REGISTER_GROUPS, getMemento() );
- wc.doSave();
- }
- catch( CoreException e ) {
- CDebugCorePlugin.log( e );
- }
- }
-
- private String getMemento() throws CoreException {
- if ( useDefaultRegisterGroups() || fRegisterGroups == null )
- return ""; //$NON-NLS-1$
- Document document = DebugPlugin.newDocument();
- Element element = document.createElement( ELEMENT_REGISTER_GROUP_LIST );
- Iterator it = fRegisterGroups.iterator();
- while( it.hasNext() ) {
- CRegisterGroup group = (CRegisterGroup)it.next();
- Element child = document.createElement( ELEMENT_REGISTER_GROUP );
- child.setAttribute( ATTR_REGISTER_GROUP_MEMENTO, group.getMemento() );
- element.appendChild( child );
- }
- document.appendChild( element );
- return DebugPlugin.serializeDocument( document );
- }
-
- private void abort( String message, Throwable exception ) throws CoreException {
- IStatus status = new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), CDebugCorePlugin.INTERNAL_ERROR, message, exception );
- throw new CoreException( status );
- }
-
- public IRegisterDescriptor findDescriptor( String groupName, String name ) {
- for ( int i = 0; i < fRegisterDescriptors.length; ++i ) {
- IRegisterDescriptor d = fRegisterDescriptors[i];
- if ( groupName.equals( d.getGroupName() ) && name.equals( d.getName() ) )
- return d;
- }
- return null;
- }
-
- public void modifyRegisterGroup( final IPersistableRegisterGroup group, final IRegisterDescriptor[] descriptors ) {
- DebugPlugin.getDefault().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- group.setRegisterDescriptors( descriptors );
- ((CRegisterGroup)group).fireChangeEvent( DebugEvent.CONTENT );
- }
- } );
-
- }
-
- protected boolean useDefaultRegisterGroups() {
- return fUseDefaultRegisterGroups;
- }
-
- protected void setUseDefaultRegisterGroups( boolean useDefaultRegisterGroups ) {
- fUseDefaultRegisterGroups = useDefaultRegisterGroups;
- }
-
- public CStackFrame getCurrentFrame() {
- return fCurrentFrame;
- }
-
- private void setCurrentFrame0( CStackFrame currentFrame ) {
- fCurrentFrame = currentFrame;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSettingsManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSettingsManager.java
deleted file mode 100644
index c833a098d21..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSettingsManager.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Settings manager
- *
- * The settings manager stores a set of settings,
- * (key/value) pairs in the launch configuration so they exist across debug sessions.
- *
- * All active settings are stored together in a single configuration entry
- * (ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_FORMAT).
- *
- * Every setting is identified by a string identifier. That string identifier can be used to
- * store an additional setting, to remove an exiting one or to retrieve a previously stored setting.
- *
- * The setting value consists of a String.
- *
- * Settings fade out automatically so clients do not necessarily need to delete old settings. This makes it
- * possible to build the string identifiers with names out of the user application, like function names or
- * variable names, without the danger of a constantly growing launch configuration.
- * However it also causes that the settings manager must only be used for configurations and customizations for which
- * always reasonable defaults exist.
- *
- * As cleanup policy the settings manager only keeps a certain number of settings and drops the
- * least recently used one when more settings are added. The least recently used order is maintained
- * across debug sessions.
- *
- */
-
-public class CSettingsManager {
-
- /**
- * the name of the XML node for the list
- */
- private static final String CONTENT_LIST = "contentList"; //$NON-NLS-1$
-
- /**
- * the name of the XML node for every format entry
- */
- private static final String CONTENT = "content"; //$NON-NLS-1$
-
- /**
- * the attribute name used to identify the object to store the content for.
- */
- private static final String ATTR_CONTENT_ID = "id"; //$NON-NLS-1$
-
- /**
- * the attribute name of the actual content
- */
- private static final String ATTR_CONTENT_VALUE = "val"; //$NON-NLS-1$
-
- /**
- * Number defining how many settings are stored.
- * Whenever an additional setting is added when there are already MAX_USED_COUNT settings, the
- * least recently used setting is dropped.
- *
- * The actual value is chosen to be high enough for normal use cases, but still low enough to avoid that the launch configuration
- * gets arbitrarily large
- */
- private static int MAX_ELEMENT_COUNT = 100;
-
- /**
- * the map used to actually store the format information
- * as key String are used, values are of type String too.
- *
- * The map automatically is limited to MAX_ELEMENT_COUNT
- * elements, dropping the least recently used one
- * when more elements are added.
- */
- private Map fContentMap = new LinkedHashMap(MAX_ELEMENT_COUNT, 0.75f, true) {
- private static final long serialVersionUID = 1;
- @Override
- protected boolean removeEldestEntry(Map.Entry eldest) {
- return size() > MAX_ELEMENT_COUNT;
- }
- };
-
- /**
- * the debug target we store the values for
- */
- private CDebugTarget fDebugTarget;
-
- /**
- * Store the value for the given id.
- * @param id used to identify the information. Different objects/topics should use different identifiers.
- * @param value content to be stored
- */
- public synchronized void putValue( String id, String value ) {
- fContentMap.put(id, value);
- }
- /**
- * remove the stored format for the given id.
- * @param id used to identify the formatting information. Different objects/topics should use different identifiers.
- */
- public synchronized void removeValue( String id ) {
- fContentMap.remove( id );
- }
-
- /** Retrieve the value for the given id.
- * @param id used to identify the formatting information. Different objects/topics should use different identifiers.
- * @return returns the entry information for the given id, or null if no such information is available.
- */
- public synchronized String getValue( String id ) {
- String entry= (String) fContentMap.get( id );
- return entry;
- }
-
- /** constructor.
- * @param debugTarget
- */
- public CSettingsManager( CDebugTarget debugTarget ) {
- fDebugTarget = debugTarget;
- initialize();
- }
-
- /** get the string format of the current content.
- * Only stores entries which have been used in the last MAX_USED_COUNT debug sessions.
- * @return
- */
- private String getMemento() {
- Document document = null;
- try {
- document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- Element node = document.createElement( CONTENT_LIST );
- document.appendChild( node );
- Set entrySet = fContentMap.entrySet();
- Iterator it = entrySet.iterator();
- while ( it.hasNext() ) {
- Map.Entry entry= (Map.Entry) it.next();
- String id= (String)entry.getKey();
- String value= (String)entry.getValue();
- Element child = document.createElement( CONTENT );
- child.setAttribute( ATTR_CONTENT_ID, id );
- child.setAttribute( ATTR_CONTENT_VALUE, value );
- node.appendChild( child );
- }
- return CDebugUtils.serializeDocument( document, false );
- }
- catch( ParserConfigurationException e ) {
- DebugPlugin.log( e );
- }
- catch( IOException e ) {
- DebugPlugin.log( e );
- }
- catch( TransformerException e ) {
- DebugPlugin.log( e );
- }
- return null;
- }
-
- /** set the current state to the one given by the memento.
- * @param memento a string representation of the state to be loaded.
- * @throws CoreException
- */
- private void initializeFromMemento( String memento ) throws CoreException {
- try {
- fContentMap.clear();
- DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- StringReader reader = new StringReader( memento );
- InputSource source = new InputSource( reader );
- Element root = parser.parse( source ).getDocumentElement();
- if ( root.getNodeName().equalsIgnoreCase( CONTENT_LIST ) ) {
- NodeList list = root.getChildNodes();
- int i = list.getLength() - 1; // backwards to keep least recent access order.
- for( ; i >= 0; i-- ) {
- Node node = list.item( i );
- short type = node.getNodeType();
- if ( type == Node.ELEMENT_NODE ) {
- Element elem = (Element)node;
- if ( elem.getNodeName().equalsIgnoreCase( CONTENT ) ) {
- String id = elem.getAttribute( ATTR_CONTENT_ID );
- String value= elem.getAttribute( ATTR_CONTENT_VALUE );
- if ( id == null || id.length() == 0 ) {
- DebugPlugin.logMessage( "unexpected entry in CSettingsManager.initializeFromMemento", null ); //$NON-NLS-1$
- continue;
- }
- putValue( id, value );
- }
- }
- }
- return;
- }
- DebugPlugin.logMessage( "unexpected content", null ); //$NON-NLS-1$
- }
- catch( ParserConfigurationException e ) {
- DebugPlugin.log( e );
- }
- catch( SAXException e ) {
- DebugPlugin.log( e );
- }
- catch( IOException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /**
- * read the stored format from the launch configuration
- */
- private void initialize() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- String memento = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_FORMAT, "" ); //$NON-NLS-1$
- if ( memento != null && memento.trim().length() != 0 )
- initializeFromMemento( memento );
- }
- catch( CoreException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /**
- * store the current content in the launch configuration.
- */
- public synchronized void save() {
- ILaunchConfiguration config = getDebugTarget().getLaunch().getLaunchConfiguration();
- try {
- ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_FORMAT, getMemento() );
- wc.doSave();
- }
- catch( CoreException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /**
- * accessor to the debug target
- */
- IDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java
deleted file mode 100644
index 1326eefebd6..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.util.ArrayList;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.model.ICSignal;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.CSignal;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Manages the collection of signals on a debug target.
- */
-public class CSignalManager implements IAdaptable {
-
- /**
- * The debug target associated with this manager.
- */
- private CDebugTarget fDebugTarget;
-
- /**
- * The list of signals.
- */
- private ICSignal[] fSignals = null;
-
- /**
- * The dispose flag.
- */
- private boolean fIsDisposed = false;
-
- /**
- * Constructor for CSignalManager.
- */
- public CSignalManager( CDebugTarget target ) {
- fDebugTarget = target;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICSignalManager#getSignals()
- */
- public ICSignal[] getSignals() throws DebugException {
- if ( !isDisposed() && fSignals == null ) {
- try {
- ICDISignal[] cdiSignals = getDebugTarget().getCDITarget().getSignals();
- ArrayList list = new ArrayList( cdiSignals.length );
- for( int i = 0; i < cdiSignals.length; ++i ) {
- list.add( new CSignal( getDebugTarget(), cdiSignals[i] ) );
- }
- fSignals = (ICSignal[])list.toArray( new ICSignal[list.size()] );
- }
- catch( CDIException e ) {
- throwDebugException( e.getMessage(), DebugException.TARGET_REQUEST_FAILED, e );
- }
- }
- return (fSignals != null) ? fSignals : new ICSignal[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.CUpdateManager#dispose()
- */
- public void dispose() {
- if ( fSignals != null )
- for( int i = 0; i < fSignals.length; ++i ) {
- ((CSignal)fSignals[i]).dispose();
- }
- fSignals = null;
- fIsDisposed = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter.equals( CSignalManager.class ) ) {
- return this;
- }
- if ( adapter.equals( CDebugTarget.class ) ) {
- return getDebugTarget();
- }
- return null;
- }
-
- public void signalChanged( ICDISignal cdiSignal ) {
- CSignal signal = find( cdiSignal );
- if ( signal != null ) {
- signal.fireChangeEvent( DebugEvent.STATE );
- }
- }
-
- private CSignal find( ICDISignal cdiSignal ) {
- try {
- ICSignal[] signals = getSignals();
- for( int i = 0; i < signals.length; ++i )
- if ( signals[i].getName().equals( cdiSignal.getName() ) )
- return (CSignal)signals[i];
- }
- catch( DebugException e ) {
- }
- return null;
- }
-
- protected boolean isDisposed() {
- return fIsDisposed;
- }
-
- /**
- * Throws a debug exception with the given message, error code, and underlying exception.
- */
- protected void throwDebugException( String message, int code, Throwable exception ) throws DebugException {
- throw new DebugException( new Status( IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), code, message, exception ) );
- }
-
- protected CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
deleted file mode 100644
index 321256d94da..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDIDebugger;
-import org.eclipse.cdt.debug.core.ICDebugConfiguration;
-import org.eclipse.cdt.debug.core.ICDebugger;
-import org.eclipse.cdt.utils.Platform;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-
-
-public class DebugConfiguration implements ICDebugConfiguration {
- /**
- * The configuration element of the extension.
- */
- private IConfigurationElement fElement;
- private HashSet fModes;
- private HashSet fCPUs;
- private String[] fCoreExt;
-
- public DebugConfiguration(IConfigurationElement element) {
- fElement = element;
- }
-
- private IConfigurationElement getConfigurationElement() {
- return fElement;
- }
-
- @Override
- public ICDebugger getDebugger() throws CoreException {
- Object debugger = getConfigurationElement().createExecutableExtension("class"); //$NON-NLS-1$
- if (debugger instanceof ICDebugger) {
- return (ICDebugger)debugger;
- }
- throw new CoreException(new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), -1,
- InternalDebugCoreMessages.DebugConfiguration_0, null));
- }
-
- @Override
- public ICDIDebugger createDebugger() throws CoreException {
- Object debugger = getConfigurationElement().createExecutableExtension("class"); //$NON-NLS-1$
- if (debugger instanceof ICDIDebugger) {
- return (ICDIDebugger)debugger;
- }
- return new CDebugAdapter((ICDebugger)debugger);
- }
-
- @Override
- public String getName() {
- String name = getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
- return name != null ? name : ""; //$NON-NLS-1$
- }
-
- @Override
- public String getID() {
- return getConfigurationElement().getAttribute("id"); //$NON-NLS-1$
- }
-
- @Override
- public String getPlatform() {
- String platform = getConfigurationElement().getAttribute("platform"); //$NON-NLS-1$
- if (platform == null) {
- return "*"; //$NON-NLS-1$
- }
- return platform;
- }
-
- @Override
- public String[] getCPUList() {
- return (String[]) getCPUs().toArray(new String[0]);
- }
-
- @Override
- public String[] getModeList() {
- return (String[]) getModes().toArray(new String[0]);
- }
-
- @Override
- public boolean supportsMode(String mode) {
- return getModes().contains(mode);
- }
-
- @Override
- public boolean supportsCPU(String cpu) {
- String nativeCPU = Platform.getOSArch();
- boolean ret = false;
- if (nativeCPU.startsWith(cpu)
- || nativeCPU.equalsIgnoreCase("powerpc") //$NON-NLS-1$
- && (cpu.equalsIgnoreCase("ppc") //$NON-NLS-1$
- || cpu.equalsIgnoreCase("xcoff32") || cpu //$NON-NLS-1$
- .equalsIgnoreCase("xcoff64"))) { //$NON-NLS-1$
- ret = getCPUs().contains(CPU_NATIVE);
- }
- return ret || getCPUs().contains(cpu) || getCPUs().contains("*"); //$NON-NLS-1$
- }
- /**
- * Returns the set of modes specified in the configuration data.
- *
- * @return the set of modes specified in the configuration data
- */
- protected Set getModes() {
- if (fModes == null) {
- String modes = getConfigurationElement().getAttribute("modes"); //$NON-NLS-1$
- if (modes == null) {
- return new HashSet(0);
- }
- StringTokenizer tokenizer = new StringTokenizer(modes, ","); //$NON-NLS-1$
- fModes = new HashSet(tokenizer.countTokens());
- while (tokenizer.hasMoreTokens()) {
- fModes.add(tokenizer.nextToken().trim());
- }
- }
- return fModes;
- }
-
- protected Set getCPUs() {
- if (fCPUs == null) {
- String cpus = getConfigurationElement().getAttribute("cpu"); //$NON-NLS-1$
- if (cpus == null) {
- fCPUs = new HashSet(1);
- fCPUs.add(CPU_NATIVE);
- }
- else {
- String nativeCPU = Platform.getOSArch();
- StringTokenizer tokenizer = new StringTokenizer(cpus, ","); //$NON-NLS-1$
- fCPUs = new HashSet(tokenizer.countTokens());
- while (tokenizer.hasMoreTokens()) {
- String cpu = tokenizer.nextToken().trim();
- fCPUs.add(cpu);
- if (nativeCPU.startsWith(cpu)) { // os arch be cpu{le/be}
- fCPUs.add(CPU_NATIVE);
- }
- }
- }
- }
- return fCPUs;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.ICDebugConfiguration#getCoreFileExtensions()
- */
- @Override
- public String[] getCoreFileExtensions() {
- if (fCoreExt == null) {
- List exts = new ArrayList();
- String cexts = getConfigurationElement().getAttribute("coreFileFilter"); //$NON-NLS-1$
- if (cexts != null) {
- StringTokenizer tokenizer = new StringTokenizer(cexts, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String ext = tokenizer.nextToken().trim();
- exts.add(ext);
- }
- }
- exts.add("*"); //$NON-NLS-1$
- fCoreExt = (String[])exts.toArray(new String[exts.size()]);
- }
- return fCoreExt;
- }
-
- @Override
- public String[] getSupportedBuildConfigPatterns() {
- IConfigurationElement[] patternElems = fElement.getChildren("buildIdPattern"); //$NON-NLS-1$
- String[] patterns = new String[patternElems.length];
- for (int i = 0; i < patternElems.length; ++i) {
- patterns[i] = patternElems[i].getAttribute("pattern"); //$NON-NLS-1$
- }
- return patterns;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
deleted file mode 100644
index df341b2f776..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugTarget;
-
-/**
- * Default implementation of the session manager. Terminates the session when the last target is terminated;
- */
-public class SessionManager implements IDebugEventSetListener {
-
- public SessionManager() {
- DebugPlugin.getDefault().addDebugEventListener( this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter( Class adapter ) {
- if ( SessionManager.class.equals( adapter ) )
- return this;
- return null;
- }
-
- public void dispose() {
- DebugPlugin.getDefault().removeDebugEventListener( this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
- */
- @Override
- public void handleDebugEvents( DebugEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- DebugEvent event = events[i];
- if ( event.getKind() == DebugEvent.TERMINATE ) {
- Object element = event.getSource();
- if ( element instanceof IDebugTarget && ((IDebugTarget)element).getAdapter( ICDITarget.class ) != null ) {
- handleTerminateEvent( ((IDebugTarget)element).getLaunch(), ((IDebugTarget)element).getAdapter( ICDITarget.class ).getSession() );
- }
- }
- }
- }
-
- private void handleTerminateEvent( ILaunch launch, ICDISession session ) {
- IDebugTarget[] targets = launch.getDebugTargets();
- boolean terminate = true;
- for( int i = 0; i < targets.length; ++i ) {
- if ( targets[i].getAdapter( ICDITarget.class ) != null && session.equals( targets[i].getAdapter( ICDITarget.class ).getSession() ) && !targets[i].isTerminated() && !targets[i].isDisconnected() )
- terminate = false;
- }
- if ( terminate ) {
- try {
- session.terminate();
- }
- catch( CDIException e ) {
- CDebugCorePlugin.log( e );
- }
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpointFilterExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpointFilterExtension.java
deleted file mode 100644
index 608ba1bbfbe..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpointFilterExtension.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.breakpoints;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.cdt.debug.core.model.ICBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointFilterExtension;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.ICThread;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IDebugTarget;
-
-/**
- *
- */
-public class CBreakpointFilterExtension implements ICBreakpointFilterExtension {
-
- @Override
- public void initialize(ICBreakpoint breakpoint) {
- }
-
- private Map fFilteredThreadsByTarget = new HashMap( 10 );
-
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getTargetFilters()
- */
- @Override
- public ICDebugTarget[] getTargetFilters() throws CoreException {
- Set set = fFilteredThreadsByTarget.keySet();
- return (ICDebugTarget[])set.toArray( new ICDebugTarget[set.size()] );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getThreadFilters(org.eclipse.cdt.debug.core.model.ICDebugTarget)
- */
- @Override
- public ICThread[] getThreadFilters( ICDebugTarget target ) throws CoreException {
- Set set = (Set)fFilteredThreadsByTarget.get( target );
- return ( set != null ) ? (ICThread[])set.toArray( new ICThread[set.size()] ) : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
- */
- @Override
- public void removeTargetFilter( ICDebugTarget target ) throws CoreException {
- if ( fFilteredThreadsByTarget.containsKey( target ) ) {
- fFilteredThreadsByTarget.remove( target );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
- */
- @Override
- public void removeThreadFilters( ICThread[] threads ) throws CoreException {
- if ( threads != null && threads.length > 0 ) {
- IDebugTarget target = threads[0].getDebugTarget();
- if ( fFilteredThreadsByTarget.containsKey( target ) ) {
- Set set = (Set)fFilteredThreadsByTarget.get( target );
- if ( set != null ) {
- set.removeAll( Arrays.asList( threads ) );
- if ( set.isEmpty() ) {
- fFilteredThreadsByTarget.remove( target );
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
- */
- @Override
- public void setTargetFilter( ICDebugTarget target ) throws CoreException {
- fFilteredThreadsByTarget.put( target, null );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
- */
- @Override
- public void setThreadFilters( ICThread[] threads ) throws CoreException {
- if ( threads != null && threads.length > 0 ) {
- fFilteredThreadsByTarget.put( threads[0].getDebugTarget(), new HashSet( Arrays.asList( threads ) ) );
- }
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCValue.java
deleted file mode 100644
index 1147e964ece..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCValue.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * The abstract super class for the C/C++ value types.
- */
-public abstract class AbstractCValue extends CDebugElement implements ICValue {
-
- /**
- * Parent variable.
- */
- private AbstractCVariable fParent = null;
-
- /**
- * Constructor for AbstractCValue.
- */
- public AbstractCValue( AbstractCVariable parent ) {
- super( (CDebugTarget)parent.getDebugTarget() );
- fParent = parent;
- }
-
- public AbstractCVariable getParentVariable() {
- return fParent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICValue#evaluateAsExpression(org.eclipse.cdt.debug.core.model.ICStackFrame)
- */
- @Override
- public String evaluateAsExpression( ICStackFrame frame ) {
- String valueString = ""; //$NON-NLS-1$
- AbstractCVariable parent = getParentVariable();
- if ( parent != null ) {
- if ( frame != null && frame.canEvaluate() ) {
- try {
- valueString = frame.evaluateExpressionToString( parent.getExpressionString() );
- }
- catch( DebugException e ) {
- valueString = e.getMessage();
- }
- }
- }
- return valueString;
- }
-
- abstract protected void setChanged( boolean changed );
-
- abstract public void dispose();
-
- abstract protected void reset();
-
- abstract protected void preserve();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCVariable.java
deleted file mode 100644
index b68d61fb821..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AbstractCVariable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICVariable;
-import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
-
-/**
- * The super class for all variable types.
- */
-public abstract class AbstractCVariable extends CDebugElement implements ICVariable {
-
- /**
- * The parent object this variable is contained in.
- */
- private CDebugElement fParent;
-
- /**
- * Constructor for AbstractCVariable.
- */
- public AbstractCVariable( CDebugElement parent ) {
- super( (CDebugTarget)parent.getDebugTarget() );
- setParent( parent );
- }
-
- protected CDebugElement getParent() {
- return fParent;
- }
-
- private void setParent( CDebugElement parent ) {
- fParent = parent;
- }
-
- protected ICStackFrame getStackFrame() {
- CDebugElement parent = getParent();
- if ( parent instanceof AbstractCValue ) {
- AbstractCVariable pv = ((AbstractCValue)parent).getParentVariable();
- if ( pv != null )
- return pv.getStackFrame();
- }
- if ( parent instanceof CStackFrame )
- return (CStackFrame)parent;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( IEnableDisableTarget.class.equals( adapter ) )
- return this;
- return super.getAdapter( adapter );
- }
-
- public abstract void dispose();
-
- protected abstract void resetValue();
-
- protected abstract void setChanged( boolean changed );
-
- protected abstract void preserve();
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmInstruction.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmInstruction.java
deleted file mode 100644
index c2a386120dd..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmInstruction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmInstruction;
-
-/**
- * Adapter for ICDIInstruction.
- */
-public class AsmInstruction implements IAsmInstruction {
-
- private ICDIInstruction fCDIInstruction;
-
- private IAddress fAddress;
-
- /**
- * Constructor for AsmInstruction.
- */
- public AsmInstruction( IAddressFactory factory, ICDIInstruction cdiInstruction ) {
- fCDIInstruction = cdiInstruction;
- fAddress = factory.createAddress( cdiInstruction.getAdress() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getAdress()
- */
- @Override
- public IAddress getAdress() {
- return fAddress;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getFunctionName()
- */
- @Override
- public String getFunctionName() {
- return fCDIInstruction.getFuntionName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getInstructionText()
- */
- @Override
- public String getInstructionText() {
- return fCDIInstruction.getInstruction();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getOpcode()
- */
- @Override
- public String getOpcode() {
- return fCDIInstruction.getOpcode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getArguments()
- */
- @Override
- public String getArguments() {
- return fCDIInstruction.getArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getOffset()
- */
- @Override
- public long getOffset() {
- return fCDIInstruction.getOffset();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmSourceLine.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmSourceLine.java
deleted file mode 100644
index 0065605b923..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/AsmSourceLine.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmSourceLine;
-
-/**
- * Adapter for ICDIMixedInstruction.
- */
-public class AsmSourceLine implements IAsmSourceLine {
-
- private String fText;
-
- private IAsmInstruction[] fInstructions = null;
-
- private int fLineNumber;
-
- /**
- * Constructor for AsmSourceLine.
- */
- public AsmSourceLine( IAddressFactory factory, String text, ICDIInstruction[] cdiInstructions ) {
- this( factory, text, -1, cdiInstructions );
- }
-
- /**
- * Constructor for AsmSourceLine.
- */
- public AsmSourceLine( IAddressFactory factory, String text, int lineNumber, ICDIInstruction[] cdiInstructions ) {
- fText = text;
- fLineNumber = lineNumber;
- fInstructions = new IAsmInstruction[cdiInstructions.length];
- for ( int i = 0; i < fInstructions.length; ++i ) {
- fInstructions[i] = new AsmInstruction( factory, cdiInstructions[i] );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmSourceLine#getLineNumber()
- */
- @Override
- public int getLineNumber() {
- return fLineNumber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmSourceLine#getInstructions()
- */
- @Override
- public IAsmInstruction[] getInstructions() {
- return fInstructions;
- }
-
- @Override
- public String toString() {
- return fText;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CCoreFileDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CCoreFileDebugTarget.java
deleted file mode 100644
index 6dc83cfe94b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CCoreFileDebugTarget.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IProcess;
-
-/**
- * A debug target for the postmortem debugging.
- * @deprecated
- */
-@Deprecated
-public class CCoreFileDebugTarget extends CDebugTarget {
-
-
- /**
- * @param launch
- * @param project
- * @param cdiTarget
- * @param name
- * @param debuggeeProcess
- * @param file
- * @param allowsTerminate
- * @param allowsDisconnect
- */
- public CCoreFileDebugTarget(ILaunch launch, IProject project, ICDITarget cdiTarget, String name, IProcess debuggeeProcess, IBinaryExecutable file) {
- super(launch, project, cdiTarget, name, debuggeeProcess, file, false, false);
- setState(CDebugElementState.TERMINATED);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#isPostMortem()
- */
- @Override
- public boolean isPostMortem() {
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
deleted file mode 100644
index 0b8c684dbaa..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Ling Wang, Nokia - Bug 179425
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import com.ibm.icu.text.MessageFormat;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
-import org.eclipse.cdt.debug.core.model.ICDebugElement;
-import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
-import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-
-/**
- * The super class of all C/C++ debug model elements.
- */
-abstract public class CDebugElement extends PlatformObject implements ICDebugElement, ICDebugElementStatus {
-
- /**
- * Debug target associated with this element
- */
- private CDebugTarget fDebugTarget;
-
- /**
- * The severity code of this element's status
- */
- private int fSeverity = ICDebugElementStatus.OK;
-
- /**
- * The message of this element's status
- */
- private String fMessage = null;
-
- /**
- * The current state of this element.
- */
- private CDebugElementState fState = CDebugElementState.UNDEFINED;
-
- /**
- * The previous state of this element.
- */
- private CDebugElementState fOldState = CDebugElementState.UNDEFINED;
-
- /**
- * The current state info.
- */
- private Object fCurrentStateInfo = null;
-
- /**
- * Constructor for CDebugElement.
- */
- public CDebugElement( CDebugTarget target ) {
- setDebugTarget( target );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
- */
- @Override
- public String getModelIdentifier() {
- return CDIDebugModel.getPluginIdentifier();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
- @Override
- public IDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
- @Override
- public ILaunch getLaunch() {
- return getDebugTarget().getLaunch();
- }
-
- protected void setDebugTarget( CDebugTarget target ) {
- fDebugTarget = target;
- }
-
- /**
- * Convenience method to log errors
- */
- protected void logError( Exception e ) {
- DebugPlugin.log( e );
- }
-
- /**
- * Convenience method to log errors
- *
- */
- protected void logError( String message ) {
- DebugPlugin.logMessage( message, null );
- }
-
- /**
- * Fires a debug event
- *
- * @param event The debug event to be fired to the listeners
- * @see org.eclipse.debug.core.DebugEvent
- */
- protected void fireEvent( DebugEvent event ) {
- DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[]{ event } );
- }
-
- protected void fireEventSet( DebugEvent[] events ) {
- DebugPlugin.getDefault().fireDebugEventSet( events );
- }
-
- /**
- * Fires a debug event marking the creation of this element.
- */
- public void fireCreationEvent() {
- fireEvent( new DebugEvent( this, DebugEvent.CREATE ) );
- }
-
- public DebugEvent createCreateEvent() {
- return new DebugEvent( this, DebugEvent.CREATE );
- }
-
- /**
- * Fires a debug event marking the RESUME of this element with the associated detail.
- *
- * @param detail The int detail of the event
- * @see org.eclipse.debug.core.DebugEvent
- */
- public void fireResumeEvent( int detail ) {
- fireEvent( new DebugEvent( this, DebugEvent.RESUME, detail ) );
- }
-
- public DebugEvent createResumeEvent( int detail ) {
- return new DebugEvent( this, DebugEvent.RESUME, detail );
- }
-
- /**
- * Fires a debug event marking the SUSPEND of this element with the associated detail.
- *
- * @param detail The int detail of the event
- * @see org.eclipse.debug.core.DebugEvent
- */
- public void fireSuspendEvent( int detail ) {
- fireEvent( new DebugEvent( this, DebugEvent.SUSPEND, detail ) );
- }
-
- public DebugEvent createSuspendEvent( int detail ) {
- return new DebugEvent( this, DebugEvent.SUSPEND, detail );
- }
-
- /**
- * Fires a debug event marking the termination of this element.
- */
- public void fireTerminateEvent() {
- fireEvent( new DebugEvent( this, DebugEvent.TERMINATE ) );
- }
-
- public DebugEvent createTerminateEvent() {
- return new DebugEvent( this, DebugEvent.TERMINATE );
- }
-
- /**
- * Fires a debug event marking the CHANGE of this element with the specifed detail code.
- *
- * @param detail
- * one of STATE or CONTENT
- */
- public void fireChangeEvent( int detail ) {
- fireEvent( new DebugEvent( this, DebugEvent.CHANGE, detail ) );
- }
-
- public DebugEvent createChangeEvent( int detail ) {
- return new DebugEvent( this, DebugEvent.CHANGE, detail );
- }
-
- /**
- * Returns the CDI session associated with this element.
- *
- * @return the CDI session
- */
- public ICDISession getCDISession() {
- final ICDITarget cdiTarget = getCDITarget();
- return cdiTarget != null ? cdiTarget.getSession() : null;
- }
-
- /**
- * Returns the underlying CDI target associated with this element.
- *
- * @return the underlying CDI target
- */
- public ICDITarget getCDITarget() {
- return getDebugTarget().getAdapter( ICDITarget.class );
- }
-
- /**
- * Throws a new debug exception with a status code of REQUEST_FAILED.
- *
- * @param message Failure message
- * @param e Exception that has occurred (can be null)
- * @throws DebugException The exception with a status code of REQUEST_FAILED
- */
- public static void requestFailed( String message, Exception e ) throws DebugException {
- requestFailed( message, e, DebugException.REQUEST_FAILED );
- }
-
- /**
- * Throws a new debug exception with a status code of TARGET_REQUEST_FAILED with the given underlying exception.
- *
- * @param message Failure message
- * @param e underlying exception that has occurred
- * @throws DebugException The exception with a status code of TARGET_REQUEST_FAILED
- */
- public static void targetRequestFailed( String message, CDIException e ) throws DebugException {
- String format = "Target request failed: {0}"; //$NON-NLS-1$
- // Append a period only when incoming message does not end with one.
- if ( !message.endsWith( "." ) ) //$NON-NLS-1$
- format += "."; //$NON-NLS-1$
-
- requestFailed( MessageFormat.format( format, new String[] { message } ), e, DebugException.TARGET_REQUEST_FAILED );
- }
-
- /**
- * Throws a new debug exception with the given status code.
- *
- * @param message Failure message
- * @param e Exception that has occurred (can be null)
- * @param code status code
- * @throws DebugException a new exception with given status code
- */
- public static void requestFailed( String message, Throwable e, int code ) throws DebugException {
- throwDebugException( message, code, e );
- }
-
- /**
- * Throws a new debug exception with a status code of TARGET_REQUEST_FAILED.
- *
- * @param message Failure message
- * @param e Throwable that has occurred
- * @throws DebugException The exception with a status code of TARGET_REQUEST_FAILED
- */
- public static void targetRequestFailed( String message, Throwable e ) throws DebugException {
- String format = "Target request failed: {0}"; //$NON-NLS-1$
- // Append a period only when incoming message does not end with one.
- if ( !message.endsWith( "." ) ) //$NON-NLS-1$
- format += "."; //$NON-NLS-1$
-
- throwDebugException( MessageFormat.format( format, new String[]{ message } ), DebugException.TARGET_REQUEST_FAILED, e );
- }
-
- /**
- * Throws a new debug exception with a status code of NOT_SUPPORTED.
- *
- * @param message Failure message
- * @throws DebugException The exception with a status code of NOT_SUPPORTED.
- */
- public static void notSupported( String message ) throws DebugException {
- throwDebugException( message, DebugException.NOT_SUPPORTED, null );
- }
-
- /**
- * Throws a debug exception with the given message, error code, and underlying exception.
- */
- protected static void throwDebugException( String message, int code, Throwable exception ) throws DebugException {
- throw new DebugException( new Status( IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), code, message, exception ) );
- }
-
- protected void infoMessage( Throwable e ) {
- IStatus newStatus = new Status( IStatus.INFO, CDebugCorePlugin.getUniqueIdentifier(), ICDebugInternalConstants.STATUS_CODE_INFO, e.getMessage(), null );
- CDebugUtils.info( newStatus, getDebugTarget() );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter.equals( IDebugElement.class ) )
- return this;
- if ( adapter.equals( ICDebugElement.class ) )
- return this;
- if ( adapter.equals( CDebugElement.class ) )
- return this;
- if ( adapter.equals( ICDebugElementStatus.class ) )
- return this;
- if ( adapter.equals( ICDISession.class ) )
- return getCDISession();
- if ( adapter.equals( ICDebugTarget.class ) )
- return getDebugTarget();
- if ( adapter.equals( IDebugTarget.class ) )
- return getDebugTarget();
- // See bug #100261
- if ( adapter.equals( IMemoryBlockRetrieval.class ) )
- return getDebugTarget().getAdapter( adapter );
- if ( adapter.equals( IModuleRetrieval.class ) )
- return getDebugTarget().getAdapter( adapter );
- if ( adapter.equals( ILaunch.class ) )
- return getDebugTarget().getLaunch();
- return super.getAdapter( adapter );
- }
-
- protected void setStatus( int severity, String message ) {
- fSeverity = severity;
- fMessage = message;
- if ( fMessage != null )
- fMessage = fMessage.trim();
- }
-
- protected void resetStatus() {
- fSeverity = ICDebugElementStatus.OK;
- fMessage = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugElementStatus#isOK()
- */
- @Override
- public boolean isOK() {
- return (fSeverity == ICDebugElementStatus.OK);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugElementStatus#getSeverity()
- */
- @Override
- public int getSeverity() {
- return fSeverity;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugElementStatus#getMessage()
- */
- @Override
- public String getMessage() {
- return fMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugElement#getState()
- */
- @Override
- public CDebugElementState getState() {
- return fState;
- }
-
- protected synchronized void setState( CDebugElementState state ) throws IllegalArgumentException {
- fOldState = fState;
- fState = state;
- }
-
- protected synchronized void restoreState() {
- fState = fOldState;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugElement#getCurrentStateInfo()
- */
- @Override
- public Object getCurrentStateInfo() {
- return fCurrentStateInfo;
- }
-
- protected void setCurrentStateInfo( Object currentStateInfo ) {
- fCurrentStateInfo = currentStateInfo;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
deleted file mode 100644
index d8ef4fbf3ef..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
+++ /dev/null
@@ -1,2065 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Ken Ryall (Nokia) - bugs 118894, 170027, 91771
- * Wind River Systems - adapted to work with platform Modules view (bug 210558)
- * Marc-Andre Laperle - Bug 382462
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.IBinaryParser.ISymbol;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.ICGlobalVariableManager;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
-import org.eclipse.cdt.debug.core.cdi.ICDIErrorInfo;
-import org.eclipse.cdt.debug.core.cdi.ICDIEventBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionConfiguration;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryEvent;
-import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
-import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointScope;
-import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDICreatedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDisconnectedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIExitedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIRestartedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressFactoryManagement;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIDisposable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
-import org.eclipse.cdt.debug.core.model.ICBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.core.model.ICDebugElement;
-import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
-import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICModule;
-import org.eclipse.cdt.debug.core.model.ICSignal;
-import org.eclipse.cdt.debug.core.model.IDebuggerProcessSupport;
-import org.eclipse.cdt.debug.core.model.IDisassembly;
-import org.eclipse.cdt.debug.core.model.IExecFileInfo;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
-import org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup;
-import org.eclipse.cdt.debug.core.model.IRegisterDescriptor;
-import org.eclipse.cdt.debug.core.sourcelookup.CProjectSourceContainer;
-import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
-import org.eclipse.cdt.debug.core.sourcelookup.ISourceLookupChangeListener;
-import org.eclipse.cdt.debug.internal.core.CBreakpointManager;
-import org.eclipse.cdt.debug.internal.core.CGlobalVariableManager;
-import org.eclipse.cdt.debug.internal.core.CMemoryBlockRetrievalExtension;
-import org.eclipse.cdt.debug.internal.core.CRegisterManager;
-import org.eclipse.cdt.debug.internal.core.CSettingsManager;
-import org.eclipse.cdt.debug.internal.core.CSignalManager;
-import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
-import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupParticipant;
-import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
-import org.eclipse.cdt.utils.Addr64Factory;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionListener;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
-import org.eclipse.debug.core.sourcelookup.containers.DirectorySourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.FolderSourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Debug target for C/C++ debug model.
- */
-public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEventListener, ILaunchListener, IExpressionListener, ISourceLookupChangeListener {
-
- /**
- * Threads contained in this debug target.
- * When a thread starts it is added to the list.
- * When a thread ends it is removed from the list.
- */
- private ArrayList fThreads;
-
- /**
- * Associated inferior process, or null if not available.
- */
- private IProcess fDebuggeeProcess = null;
-
- /**
- * The underlying CDI target.
- */
- private ICDITarget fCDITarget;
-
- /**
- * The name of this target.
- */
- private String fName;
-
- /**
- * The launch this target is contained in
- */
- private ILaunch fLaunch;
-
- /**
- * The debug configuration of this session
- */
- private ICDITargetConfiguration fConfig;
-
- /**
- * The disassembly manager for this target.
- */
- private Disassembly fDisassembly;
-
- /**
- * The new disassembly manager for this target.
- */
- private DisassemblyRetrieval fDisassemblyRetrieval;
-
- /**
- * The module manager for this target.
- */
- private CModuleManager fModuleManager;
-
- /**
- * The signal manager for this target.
- */
- private CSignalManager fSignalManager;
-
- /**
- * The register manager for this target.
- */
- private CRegisterManager fRegisterManager;
-
- /**
- * A breakpoint manager for this target.
- */
- private CBreakpointManager fBreakpointManager;
-
- /**
- * The global variable manager for this target.
- */
- private CGlobalVariableManager fGlobalVariableManager;
-
- /**
- * container for Default format information
- */
- private CSettingsManager fFormatManager;
-
- /**
- * The executable binary file associated with this target.
- */
- private IBinaryObject fBinaryFile;
-
- /**
- * The project associated with this target.
- */
- private IProject fProject;
-
- /**
- * Whether the target is little endian.
- */
- private Boolean fIsLittleEndian = null;
-
- /**
- * The target's preference set.
- */
- private Preferences fPreferences = null;
-
- /**
- * The address factory of this target.
- */
- private IAddressFactory fAddressFactory;
-
- /**
- * Support for the memory retrieval on this target.
- */
- private CMemoryBlockRetrievalExtension fMemoryBlockRetrieval;
-
- /**
- * Internal ID that uniquely identifies this CDebugTarget.
- */
- private String internalD = Integer.toString(lastInternalID++);
-
- private static int lastInternalID = 1;
-
- /**
- * Constructor for CDebugTarget.
- */
- public CDebugTarget(ILaunch launch, IProject project, ICDITarget cdiTarget, String name, IProcess debuggeeProcess, IBinaryObject file, boolean allowsTerminate, boolean allowsDisconnect) {
- super(null);
- setLaunch(launch);
- setDebugTarget(this);
- setName(name);
- setProcess(debuggeeProcess);
- setProject(project);
- setExecFile(file);
- setCDITarget(cdiTarget);
- setState(CDebugElementState.SUSPENDED);
- initializePreferences();
- setConfiguration(cdiTarget.getConfiguration());
- setThreadList(new ArrayList(5));
- createDisassembly();
- setModuleManager(new CModuleManager(this));
- setSignalManager(new CSignalManager(this));
- setRegisterManager(new CRegisterManager(this));
- setBreakpointManager(new CBreakpointManager(this));
- setGlobalVariableManager(new CGlobalVariableManager(this));
- setFormatManager(new CSettingsManager(this));
- setMemoryBlockRetrieval(new CMemoryBlockRetrievalExtension(this));
- initialize();
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- DebugPlugin.getDefault().getExpressionManager().addExpressionListener(this);
- getCDISession().getEventManager().addEventListener(this);
- }
-
- protected void initialize() {
- initializeSourceLookupPath();
- ArrayList debugEvents = new ArrayList(1);
- debugEvents.add(createCreateEvent());
- initializeThreads(debugEvents);
- initializeBreakpoints();
- initializeRegisters();
- initializeSourceManager();
- initializeModuleManager();
- initializeMemoryBlocks();
- getLaunch().addDebugTarget(this);
- fireEventSet(debugEvents.toArray(new DebugEvent[debugEvents.size()]));
- }
-
- private void initializeBreakpoints() {
- getBreakpointManager().initialize();
- }
-
- public void start(String stopSymbol, boolean resume) throws DebugException {
- ICDITargetConfiguration config = getConfiguration();
- if (config.supportsBreakpoints()) {
- getBreakpointManager().setInitialBreakpoints();
-
- if (stopSymbol != null && stopSymbol.length() != 0) {
- // See if the expression is a numeric address
- try {
- IAddress address = getAddressFactory().createAddress(stopSymbol);
- stopAtAddress(address);
- } catch (NumberFormatException nfexc) {
- // OK, expression is not a simple, absolute numeric value; keep trucking and try to resolve as expression
- stopAtSymbol(stopSymbol);
- }
- }
- }
- if (config.supportsResume() && resume) {
- resume();
- }
- }
-
- /**
- * Adds all of the pre-existing threads to this debug target.
- */
- protected void initializeThreads(List debugEvents) {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget == null) {
- return;
- }
-
- ICDIThread[] cdiThreads = new ICDIThread[0];
- try {
- cdiThreads = cdiTarget.getThreads();
- } catch (CDIException e) {
- // ignore
- }
- DebugEvent suspendEvent = null;
- for (int i = 0; i < cdiThreads.length; ++i) {
- CThread thread = createThread(cdiThreads[i]);
- debugEvents.add(thread.createCreateEvent());
- try {
- if (cdiThreads[i].equals(cdiTarget.getCurrentThread()) && thread.isSuspended()) {
- // Use BREAKPOINT as a detail to force perspective switch
- suspendEvent = thread.createSuspendEvent(DebugEvent.BREAKPOINT);
- }
- } catch (CDIException e) {
- // ignore
- }
- }
- if (suspendEvent != null) {
- debugEvents.add(suspendEvent);
- }
- }
-
- protected void initializeRegisters() {
- getRegisterManager().initialize();
- }
-
- protected void initializeSourceManager() {
- ISourceLocator locator = getLaunch().getSourceLocator();
- if (locator instanceof IAdaptable) {
- ICSourceLocator clocator = ((IAdaptable)locator).getAdapter(ICSourceLocator.class);
- if (clocator instanceof IAdaptable) {
- CSourceManager sm = ((IAdaptable)clocator).getAdapter(CSourceManager.class);
- if (sm != null)
- sm.setDebugTarget(this);
- }
- IResourceChangeListener listener = ((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
- if (listener != null)
- CCorePlugin.getWorkspace().addResourceChangeListener(listener);
- }
- }
-
- protected void initializeSourceLookupPath() {
- ISourceLocator locator = getLaunch().getSourceLocator();
- if (locator instanceof ISourceLookupDirector) {
- ISourceLookupParticipant[] participants = ((ISourceLookupDirector)locator).getParticipants();
- for (int i = 0; i < participants.length; ++i) {
- if (participants[i] instanceof CSourceLookupParticipant) {
- ((CSourceLookupParticipant)participants[i]).addSourceLookupChangeListener(this);
- }
- }
- setSourceLookupPath(((ISourceLookupDirector)locator).getSourceContainers());
- }
- }
-
- protected void initializeModuleManager() {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget == null) {
- return;
- }
-
- ICDISharedLibrary[] slibs = new ICDISharedLibrary[0];
- try {
- slibs = cdiTarget.getSharedLibraries();
- } catch (CDIException e) {
- DebugPlugin.log(e);
- }
- ICModule[] modules = null;
- if (getExecFile() != null) {
- modules = new ICModule[slibs.length + 1];
- modules[0] = CModule.createExecutable(this, getExecFile().getPath());
- } else {
- modules = new ICModule[slibs.length];
- }
- for (int i = 0; i < slibs.length; ++i) {
- modules[i + 1] = CModule.createSharedLibrary(this, slibs[i]);
- }
- getModuleManager().addModules(modules);
- }
-
- protected void initializeMemoryBlocks() {
- getMemoryBlockRetrieval().initialize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#getProcess()
- */
- @Override
- public IProcess getProcess() {
- return fDebuggeeProcess;
- }
-
- /**
- * Sets the process associated with this debug target, possibly null. Set on creation.
- *
- * @param process the system process associated with the underlying CDI target,
- * or null if no process is associated with this debug target
- * (for a core dump debugging).
- */
- protected void setProcess(IProcess debuggeeProcess) {
- fDebuggeeProcess = debuggeeProcess;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugTarget#getThreads()
- */
- @Override
- public IThread[] getThreads() {
- List threads = getThreadList();
- return threads.toArray(new IThread[threads.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugTarget#hasThreads()
- */
- @Override
- public boolean hasThreads() throws DebugException {
- return getThreadList().size() > 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IDebugTarget#getName()
- */
- @Override
- public String getName() throws DebugException {
- return fName;
- }
-
- /**
- * Sets the name of this debug target.
- *
- * @param name the name of this debug target
- */
- public void setName(String name) {
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)
- */
- @Override
- public boolean supportsBreakpoint(IBreakpoint breakpoint) {
- if (!getConfiguration().supportsBreakpoints())
- return false;
- return (breakpoint instanceof ICBreakpoint && getBreakpointManager().supportsBreakpoint((ICBreakpoint)breakpoint));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchListener#launchRemoved(org.eclipse.debug.core.ILaunch)
- */
- @Override
- public void launchRemoved(ILaunch launch) {
- if (!isAvailable()) {
- return;
- }
- if (launch.equals(getLaunch())) {
- // This target has been deregistered, but it hasn't been successfully terminated.
- // Update internal state to reflect that it is disconnected
- disconnected();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchListener#launchAdded(org.eclipse.debug.core.ILaunch)
- */
- @Override
- public void launchAdded(ILaunch launch) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch)
- */
- @Override
- public void launchChanged(ILaunch launch) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- @Override
- public boolean canTerminate() {
- return supportsTerminate() && isAvailable();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- @Override
- public boolean isTerminated() {
- return (getState().equals(CDebugElementState.TERMINATED));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- @Override
- public void terminate() throws DebugException {
- if (!canTerminate()) {
- return;
- }
- final CDebugElementState newState = CDebugElementState.TERMINATING;
- changeState(newState);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.terminate();
- }
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- @Override
- public boolean canResume() {
- return getConfiguration().supportsResume() && isSuspended();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- @Override
- public boolean canSuspend() {
- if (!getConfiguration().supportsSuspend())
- return false;
- if (getState().equals(CDebugElementState.RESUMED)) {
- // only allow suspend if no threads are currently suspended
- IThread[] threads = getThreads();
- for (int i = 0; i < threads.length; i++) {
- if (threads[i].isSuspended()) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return (getState().equals(CDebugElementState.SUSPENDED));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- @Override
- public void resume() throws DebugException {
- if (!canResume())
- return;
- final CDebugElementState newState = CDebugElementState.RESUMING;
- changeState(newState);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.resume(false);
- }
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- @Override
- public void suspend() throws DebugException {
- if (!canSuspend())
- return;
- final CDebugElementState newState = CDebugElementState.SUSPENDING;
- changeState(newState);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.suspend();
- }
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), null);
- }
- }
-
- protected boolean isSuspending() {
- return (getState().equals(CDebugElementState.SUSPENDING));
- }
-
- /**
- * Notifies threads that the target has been suspended.
- */
- protected void suspendThreads(ICDISuspendedEvent event) {
- Iterator it = getThreadList().iterator();
- while (it.hasNext()) {
- CThread thread = it.next();
- ICDIThread suspensionThread = null;
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- suspensionThread = cdiTarget.getCurrentThread();
- }
- } catch (CDIException e) {
- // ignore
- }
- thread.suspendByTarget(event.getReason(), suspensionThread);
- }
- }
-
- /**
- * Refreshes the thread list.
- */
- protected synchronized List refreshThreads() {
- ArrayList newThreads = new ArrayList(5);
- ArrayList list = new ArrayList(5);
- ArrayList debugEvents = new ArrayList(5);
- List oldList = (List)getThreadList().clone();
- ICDIThread[] cdiThreads = new ICDIThread[0];
- ICDIThread currentCDIThread = null;
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiThreads = cdiTarget.getThreads();
- currentCDIThread = cdiTarget.getCurrentThread();
- }
- } catch (CDIException e) {
- }
- for (int i = 0; i < cdiThreads.length; ++i) {
- CThread thread = findThread(oldList, cdiThreads[i]);
- if (thread == null) {
- thread = new CThread(this, cdiThreads[i]);
- newThreads.add(thread);
- }
- else {
- oldList.remove(thread);
- }
- thread.setCurrent(cdiThreads[i].equals(currentCDIThread));
- list.add(thread);
- }
- Iterator it = oldList.iterator();
- while (it.hasNext()) {
- CThread thread = it.next();
- thread.terminated();
- debugEvents.add(thread.createTerminateEvent());
- }
- setThreadList(list);
- it = newThreads.iterator();
- while (it.hasNext()) {
- debugEvents.add(it.next().createCreateEvent());
- }
- if (debugEvents.size() > 0)
- fireEventSet(debugEvents.toArray(new DebugEvent[debugEvents.size()]));
- return newThreads;
- }
-
- /**
- * Notifies threads that the target has been resumed.
- */
- protected synchronized void resumeThreads(List debugEvents, int detail) {
- Iterator it = getThreadList().iterator();
- while (it.hasNext()) {
- it.next().resumedByTarget(detail, debugEvents);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
- */
- @Override
- public void breakpointAdded(IBreakpoint breakpoint) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
- @Override
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
- @Override
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
-
- /**
- * Returns whether this debug target supports disconnecting.
- *
- * @return whether this debug target supports disconnecting
- */
- protected boolean supportsDisconnect() {
- return getConfiguration().supportsDisconnect();
- }
-
- /**
- * Returns whether this debug target supports termination.
- *
- * @return whether this debug target supports termination
- */
- protected boolean supportsTerminate() {
- return getConfiguration().supportsTerminate();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#canDisconnect()
- */
- @Override
- public boolean canDisconnect() {
- return supportsDisconnect() && isAvailable();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#disconnect()
- */
- @Override
- public void disconnect() throws DebugException {
- if (isDisconnecting()) {
- return;
- }
- final CDebugElementState newState = CDebugElementState.DISCONNECTING;
- changeState(newState);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.disconnect();
- }
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#isDisconnected()
- */
- @Override
- public boolean isDisconnected() {
- return (getState().equals(CDebugElementState.DISCONNECTED));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval()
- */
- @Override
- public boolean supportsStorageRetrieval() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
- */
- @Override
- public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
- @Override
- public ILaunch getLaunch() {
- return fLaunch;
- }
-
- /**
- * Sets the launch this target is contained in
- *
- * @param launch the launch this target is contained in
- */
- private void setLaunch(ILaunch launch) {
- fLaunch = launch;
- }
-
- /**
- * Returns the list of threads contained in this debug target.
- *
- * @return list of threads
- */
- protected ArrayList getThreadList() {
- return fThreads;
- }
-
- /**
- * Sets the list of threads contained in this debug target. Set to an empty collection on creation. Threads are added and removed as they start and end. On
- * termination this collection is set to the immutable singleton empty list.
- *
- * @param threads empty list
- */
- private void setThreadList(ArrayList threads) {
- fThreads = threads;
- }
-
- private void setCDITarget(ICDITarget cdiTarget) {
- fCDITarget = cdiTarget;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (adapter.equals(ICDebugElement.class))
- return this;
- if (adapter.equals(CDebugElement.class))
- return this;
- if (adapter.equals(IDebugTarget.class))
- return this;
- if (adapter.equals(ICDebugTarget.class))
- return this;
- if (adapter.equals(CDebugTarget.class))
- return this;
- if (adapter.equals(ICDITarget.class))
- return fCDITarget;
- if (adapter.equals(IDebuggerProcessSupport.class))
- return this;
- if (adapter.equals(IExecFileInfo.class))
- return this;
- if (adapter.equals(CBreakpointManager.class))
- return getBreakpointManager();
- if (adapter.equals(CSignalManager.class))
- return getSignalManager();
- if (adapter.equals(CRegisterManager.class))
- return getRegisterManager();
- if (adapter.equals(ICGlobalVariableManager.class))
- return getGlobalVariableManager();
- if (adapter.equals(ICDISession.class))
- return getCDISession();
- if (adapter.equals(IMemoryBlockRetrievalExtension.class))
- return getMemoryBlockRetrieval();
- if (adapter.equals(IMemoryBlockRetrieval.class))
- return getMemoryBlockRetrieval();
- if (adapter.equals(IModuleRetrieval.class))
- return getModuleManager();
-
- // Force adapters to be loaded. Otherwise the adapter manager may not find
- // the model proxy adapter for CDT debug elements.
- Platform.getAdapterManager().loadAdapter(this, adapter.getName());
-
- return super.getAdapter(adapter);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents(ICDIEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- final ICDITarget cdiTarget = getCDITarget();
- if (source == null && event instanceof ICDIDestroyedEvent) {
- handleTerminatedEvent((ICDIDestroyedEvent)event);
- }
- else if (source != null && cdiTarget != null && source.getTarget().equals(cdiTarget)) {
- if (event instanceof ICDICreatedEvent) {
- if (source instanceof ICDIThread) {
- handleThreadCreatedEvent((ICDICreatedEvent)event);
- }
- if (source instanceof ICDISharedLibrary) {
- getModuleManager().sharedLibraryLoaded((ICDISharedLibrary)source);
- }
- }
- else if (event instanceof ICDISuspendedEvent) {
- if (source instanceof ICDITarget) {
- handleSuspendedEvent((ICDISuspendedEvent)event);
- }
- }
- else if (event instanceof ICDIResumedEvent) {
- if (source instanceof ICDITarget) {
- handleResumedEvent((ICDIResumedEvent)event);
- }
- }
- else if (event instanceof ICDIExitedEvent) {
- if (source instanceof ICDITarget) {
- handleExitedEvent((ICDIExitedEvent)event);
- }
- }
- else if (event instanceof ICDIDestroyedEvent) {
- if (source instanceof ICDIThread) {
- handleThreadTerminatedEvent((ICDIDestroyedEvent)event);
- }
- if (source instanceof ICDISharedLibrary) {
- getModuleManager().sharedLibraryUnloaded((ICDISharedLibrary)source);
- }
- }
- else if (event instanceof ICDIDisconnectedEvent) {
- if (source instanceof ICDITarget) {
- handleDisconnectedEvent((ICDIDisconnectedEvent)event);
- }
- }
- else if (event instanceof ICDIChangedEvent) {
- if (source instanceof ICDITarget) {
- handleChangedEvent((ICDIChangedEvent)event);
- }
- if (source instanceof ICDISharedLibrary) {
- handleSymbolsLoaded((ICDISharedLibrary)source);
- }
- if (source instanceof ICDISignal) {
- getSignalManager().signalChanged((ICDISignal)source);
- }
- }
- else if (event instanceof ICDIRestartedEvent) {
- if (source instanceof ICDITarget) {
- handleRestartedEvent((ICDIRestartedEvent)event);
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#canRestart()
- */
- @Override
- public boolean canRestart() {
- return getConfiguration().supportsRestart() && isSuspended();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#restart()
- */
- @Override
- public void restart() throws DebugException {
- if (!canRestart()) {
- return;
- }
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget == null) {
- return;
- }
-
- try {
- ILaunchConfiguration launchConfig = getLaunch().getLaunchConfiguration();
- if (launchConfig.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT)) {
- String mainSymbol = launchConfig.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
- ICDILocation location = null;
- // See if the expression is a numeric address
- try {
- IAddress address = getAddressFactory().createAddress(mainSymbol);
- location = cdiTarget.createAddressLocation(address.getValue());
- } catch (NumberFormatException nfexc) {
- // OK, expression is not a simple, absolute numeric value; keep trucking and try to resolve as expression
- location = cdiTarget.createFunctionLocation("", mainSymbol); //$NON-NLS-1$
- }
-
- setInternalTemporaryBreakpoint(location);
- }
- } catch (CoreException e) {
- requestFailed(e.getMessage(), e);
- }
-
- final CDebugElementState newState = CDebugElementState.RESTARTING;
- changeState(newState);
- try {
- cdiTarget.restart();
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), e);
- }
- }
-
- /**
- * Returns whether this target is available to handle client requests.
- *
- * @return whether this target is available to handle client requests
- */
- public boolean isAvailable() {
- return !(isTerminated() || isTerminating() || isDisconnected() || isDisconnecting());
- }
-
- /**
- * Returns whether this target is in the process of terminating.
- *
- * @return whether this target is terminating
- */
- protected boolean isTerminating() {
- return (getState().equals(CDebugElementState.TERMINATING));
- }
-
- /**
- * Updates the state of this target to be terminated, if not already terminated.
- */
- protected void terminated() {
- if (!isTerminated()) {
- if (!isDisconnected()) {
- setState(CDebugElementState.TERMINATED);
- }
- cleanup();
- fireTerminateEvent();
- }
- }
-
- /**
- * Returns whether this target is in the process of terminating.
- *
- * @return whether this target is terminating
- */
- protected boolean isDisconnecting() {
- return (getState().equals(CDebugElementState.DISCONNECTING));
- }
-
- /**
- * Updates the state of this target for disconnection.
- */
- protected void disconnected() {
- if (!isDisconnected()) {
- setState(CDebugElementState.DISCONNECTED);
- cleanup();
- fireTerminateEvent();
- }
- }
-
- /**
- * Cleans up the internal state of this debug target as a result of a session ending.
- */
- protected void cleanup() {
- resetStatus();
- removeAllThreads();
- getCDISession().getEventManager().removeEventListener(this);
- DebugPlugin.getDefault().getExpressionManager().removeExpressionListener(this);
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- saveFormats();
- saveGlobalVariables();
- disposeGlobalVariableManager();
- disposeModuleManager();
- disposeSignalManager();
- saveRegisterGroups();
- disposeRegisterManager();
- saveMemoryBlocks();
- disposeMemoryBlockRetrieval();
- disposeDisassembly();
- disposeSourceManager();
- disposeSourceLookupPath();
- disposeBreakpointManager();
- removeAllExpressions();
- disposePreferences();
-
- ICDITarget cdiTarget = getCDITarget();
- // TODO: apparently we're not really done with the ICDITarget. The
- // arrival of a terminate event from gdb requires access to this (see
- // SessionManager.handleDebugEvent()). Reported by Mikhail. Need to
- // revisit this.
- // setCDITarget(null);
- if (cdiTarget instanceof ICDIDisposable) {
- ((ICDIDisposable)cdiTarget).dispose();
- }
- }
-
- /**
- * Removes all threads from this target's collection of threads, firing a terminate event for each.
- */
- protected void removeAllThreads() {
- List threads = getThreadList();
- setThreadList(new ArrayList(0));
- ArrayList debugEvents = new ArrayList(threads.size());
- Iterator it = threads.iterator();
- while (it.hasNext()) {
- CThread thread = it.next();
- thread.terminated();
- debugEvents.add(thread.createTerminateEvent());
- }
- fireEventSet(debugEvents.toArray(new DebugEvent[debugEvents.size()]));
- }
-
- /**
- * Removes all expressions from this target.
- */
- protected void removeAllExpressions() {
- IExpressionManager em = DebugPlugin.getDefault().getExpressionManager();
- IExpression[] expressions = em.getExpressions();
- for (int i = 0; i < expressions.length; ++i) {
- if (expressions[i] instanceof CExpression && expressions[i].getDebugTarget().equals(this)) {
- em.removeExpression(expressions[i]);
- }
- }
- }
-
- /**
- * Creates, adds and returns a thread for the given underlying CDI thread. A creation event is fired for the thread. Returns null if during
- * the creation of the thread this target is set to the disconnected state.
- *
- * @param thread the underlying CDI thread
- * @return model thread
- */
- protected CThread createThread(ICDIThread cdiThread) {
- CThread thread = new CThread(this, cdiThread);
- getThreadList().add(thread);
- return thread;
- }
-
- private void handleSuspendedEvent(ICDISuspendedEvent event) {
- setState(CDebugElementState.SUSPENDED);
- ICDISessionObject reason = event.getReason();
- setCurrentStateInfo(reason);
- // Reset the registers that have errors.
- getRegisterManager().targetSuspended();
- getBreakpointManager().skipBreakpoints(false);
- List newThreads = refreshThreads();
- if (event.getSource() instanceof ICDITarget) {
- if (!(this.getConfiguration() instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)this.getConfiguration()).supportsThreadControl())
- suspendThreads(event);
- } else if (event.getSource() instanceof ICDIThread) {
- // We need this for debuggers that don't have notifications
- // for newly created threads.
- CThread thread = findThread((ICDIThread)event.getSource());
- if (thread != null && newThreads.contains(thread)) {
- ICDIEvent[] evts = new ICDIEvent[]{ event };
- thread.handleDebugEvents(evts);
- }
- }
- if (reason instanceof ICDIEndSteppingRange) {
- handleEndSteppingRange((ICDIEndSteppingRange)reason);
- }
- else if (reason instanceof ICDIBreakpointHit) {
- handleBreakpointHit((ICDIBreakpointHit)reason);
- }
- else if (reason instanceof ICDISignalReceived) {
- handleSuspendedBySignal((ICDISignalReceived)reason);
- }
- else if (reason instanceof ICDIWatchpointTrigger) {
- handleWatchpointTrigger((ICDIWatchpointTrigger)reason);
- }
- else if (reason instanceof ICDIWatchpointScope) {
- handleWatchpointScope((ICDIWatchpointScope)reason);
- }
- else if (reason instanceof ICDIErrorInfo) {
- handleErrorInfo((ICDIErrorInfo)reason);
- }
- else if (reason instanceof ICDISharedLibraryEvent) {
- handleSuspendedBySolibEvent((ICDISharedLibraryEvent)reason);
- }
- else if (reason instanceof ICDIEventBreakpointHit) {
- handleEventBreakpointHit((ICDIEventBreakpointHit)reason);
- }
- else { // reason is not specified
- fireSuspendEvent(DebugEvent.UNSPECIFIED);
- }
- }
-
- private void handleResumedEvent(ICDIResumedEvent event) {
- setState(CDebugElementState.RESUMED);
- setCurrentStateInfo(null);
- resetStatus();
- ArrayList debugEvents = new ArrayList(10);
- int detail = DebugEvent.UNSPECIFIED;
- switch(event.getType()) {
- case ICDIResumedEvent.CONTINUE:
- detail = DebugEvent.CLIENT_REQUEST;
- break;
- case ICDIResumedEvent.STEP_INTO:
- case ICDIResumedEvent.STEP_INTO_INSTRUCTION:
- detail = DebugEvent.STEP_INTO;
- break;
- case ICDIResumedEvent.STEP_OVER:
- case ICDIResumedEvent.STEP_OVER_INSTRUCTION:
- detail = DebugEvent.STEP_OVER;
- break;
- case ICDIResumedEvent.STEP_RETURN:
- detail = DebugEvent.STEP_RETURN;
- break;
- }
- debugEvents.add(createResumeEvent(detail));
-
- if (!(this.getConfiguration() instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)this.getConfiguration()).supportsThreadControl())
- resumeThreads(debugEvents, detail);
-
- fireEventSet(debugEvents.toArray(new DebugEvent[debugEvents.size()]));
- }
-
- private void handleEndSteppingRange(ICDIEndSteppingRange endSteppingRange) {
- fireSuspendEvent(DebugEvent.UNSPECIFIED);
- }
-
- private void handleBreakpointHit(ICDIBreakpointHit breakpointHit) {
- fireSuspendEvent(DebugEvent.BREAKPOINT);
- }
-
- private void handleEventBreakpointHit(ICDIEventBreakpointHit breakpointHit) {
- fireSuspendEvent(DebugEvent.BREAKPOINT);
- }
-
- private void handleWatchpointTrigger(ICDIWatchpointTrigger wt) {
- fireSuspendEvent(DebugEvent.BREAKPOINT);
- }
-
- private void handleWatchpointScope(ICDIWatchpointScope ws) {
- getBreakpointManager().watchpointOutOfScope(ws.getWatchpoint());
- fireSuspendEvent(DebugEvent.BREAKPOINT);
- }
-
- private void handleSuspendedBySignal(ICDISignalReceived signal) {
- fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
- }
-
- private void handleErrorInfo(ICDIErrorInfo info) {
- setStatus(ICDebugElementStatus.ERROR, (info != null) ? info.getMessage() : null);
- if (info != null) {
- MultiStatus status = new MultiStatus(CDebugCorePlugin.getUniqueIdentifier(), ICDebugInternalConstants.STATUS_CODE_ERROR, CoreModelMessages.getString("CDebugTarget.1"), //$NON-NLS-1$
- null);
- StringTokenizer st = new StringTokenizer(info.getDetailMessage(), "\n\r"); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- String token = st.nextToken();
- if (token.length() > 200) {
- token = token.substring(0, 200);
- }
- status.add(new Status(IStatus.ERROR, status.getPlugin(), ICDebugInternalConstants.STATUS_CODE_ERROR, token, null));
- }
- CDebugUtils.error(status, this);
- }
- fireSuspendEvent(DebugEvent.UNSPECIFIED);
- }
-
- private void handleSuspendedBySolibEvent(ICDISharedLibraryEvent solibEvent) {
- fireSuspendEvent(DebugEvent.UNSPECIFIED);
- }
-
- private void handleExitedEvent(ICDIExitedEvent event) {
- removeAllThreads();
- setState(CDebugElementState.EXITED);
- setCurrentStateInfo(event.getReason());
- fireChangeEvent(DebugEvent.CONTENT);
- ICDISessionConfiguration sessionConfig = getCDISession().getConfiguration();
- if (sessionConfig != null && sessionConfig.terminateSessionOnExit())
- terminated();
- }
-
- private void handleTerminatedEvent(ICDIDestroyedEvent event) {
- terminated();
- }
-
- private void handleDisconnectedEvent(ICDIDisconnectedEvent event) {
- disconnected();
- }
-
- private void handleChangedEvent(ICDIChangedEvent event) {
- }
-
- private void handleRestartedEvent(ICDIRestartedEvent event) {
- }
-
- private void handleThreadCreatedEvent(ICDICreatedEvent event) {
- ICDIThread cdiThread = (ICDIThread)event.getSource();
- CThread thread = findThread(cdiThread);
- if (thread == null) {
- thread = createThread(cdiThread);
- thread.fireCreationEvent();
- }
- }
-
- private void handleThreadTerminatedEvent(ICDIDestroyedEvent event) {
- ICDIThread cdiThread = (ICDIThread)event.getSource();
- List threads = getThreadList();
- List threadsToRemove = new ArrayList(1);
- for (int i = 0; i < threads.size(); i++) {
- CThread cthread = threads.get(i);
- // It's possible CThread has handled the thread-terminated event
- // before us (by appearing first in the EventManager)
- // and has disassociated itself from the ICDIThread.
- // So handle any disassociated CThreads we find. Chances are
- // there's only one and it's the one we got the terminated event
- // for. See bugzilla 254888.
- ICDIThread cdithread = cthread.getCDIThread();
- if (cdithread == null || cdithread.equals(cdiThread)) {
- threadsToRemove.add(cthread);
- }
- }
- for (CThread cthread : threadsToRemove) {
- threads.remove(cthread);
- cthread.terminated();
- cthread.fireTerminateEvent();
- }
- }
-
- /**
- * Finds and returns the model thread for the associated CDI thread, or null if not found.
- *
- * @param the underlying CDI thread
- * @return the associated model thread
- */
- public CThread findThread(ICDIThread cdiThread) {
- return findThread(getThreadList(), cdiThread);
- }
-
- public CThread findThread(List threads, ICDIThread cdiThread) {
- for (int i = 0; i < threads.size(); i++) {
- CThread t = threads.get(i);
- ICDIThread thisCdiThread = t.getCDIThread();
- if (thisCdiThread != null && thisCdiThread.equals(cdiThread))
- return t;
- }
- return null;
- }
-
- /**
- * Returns the debug configuration of this target.
- *
- * @return the debug configuration of this target
- */
- protected ICDITargetConfiguration getConfiguration() {
- return fConfig;
- }
-
- /**
- * Sets the debug configuration of this target.
- *
- * @param config the debug configuration to set
- */
- private void setConfiguration(ICDITargetConfiguration config) {
- fConfig = config;
- }
-
- protected boolean supportsExpressionEvaluation() {
- return getConfiguration().supportsExpressionEvaluation();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionListener#expressionAdded(org.eclipse.debug.core.model.IExpression)
- */
- @Override
- public void expressionAdded(IExpression expression) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionListener#expressionChanged(org.eclipse.debug.core.model.IExpression)
- */
- @Override
- public void expressionChanged(IExpression expression) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionListener#expressionRemoved(org.eclipse.debug.core.model.IExpression)
- */
- @Override
- public void expressionRemoved(IExpression expression) {
- if (expression instanceof CExpression && expression.getDebugTarget().equals(this)) {
- ((CExpression)expression).dispose();
- }
- }
-
- public void setInternalTemporaryBreakpoint(ICDILocation location) throws DebugException {
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget == null) {
- return;
- }
- if (location instanceof ICDIFunctionLocation) {
- cdiTarget.setFunctionBreakpoint(ICBreakpointType.TEMPORARY, (ICDIFunctionLocation)location, null, false);
- } else if (location instanceof ICDILineLocation) {
- cdiTarget.setLineBreakpoint(ICBreakpointType.TEMPORARY, (ICDILineLocation)location, null, false);
- } else if (location instanceof ICDIAddressLocation) {
- cdiTarget.setAddressBreakpoint(ICBreakpointType.TEMPORARY, (ICDIAddressLocation)location, null, false);
- } else {
- // ???
- targetRequestFailed("not_a_location", null); //$NON-NLS-1$
- }
- } catch (CDIException e) {
- targetRequestFailed(e.getMessage(), null);
- }
- }
-
- protected IThread getCurrentThread() {
- IThread[] threads = getThreads();
- for (int i = 0; i < threads.length; ++i) {
- if (((CThread)threads[i]).isCurrent())
- return threads[i];
- }
- return null;
- }
-
- protected ISourceLocator getSourceLocator() {
- return getLaunch().getSourceLocator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IExecFileInfo#isLittleEndian()
- */
- @Override
- public boolean isLittleEndian() {
- if (fIsLittleEndian == null) {
- fIsLittleEndian = Boolean.TRUE;
- IBinaryObject file;
- file = getBinaryFile();
- if (file != null) {
- fIsLittleEndian = Boolean.valueOf(file.isLittleEndian());
- }
- }
- return fIsLittleEndian.booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IExecFileInfo#getExecFile()
- */
- @Override
- public IBinaryObject getExecFile() {
- return getBinaryFile();
- }
-
- public IBinaryObject getBinaryFile() {
- return fBinaryFile;
- }
-
- private void setExecFile(IBinaryObject file) {
- fBinaryFile = file;
- }
-
- private void setProject(IProject project) {
- fProject = project;
- }
-
- public IProject getProject() {
- return fProject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IExecFileInfo#getGlobals()
- */
- @Override
- public IGlobalVariableDescriptor[] getGlobals() throws DebugException {
- ICDITarget cdiTarget = getCDITarget();
- // If the backend can give us the globals...
- boolean hasCDIGlobals = false;
- ArrayList list = new ArrayList();
- if (cdiTarget instanceof ICDITarget2) {
- ICDIGlobalVariableDescriptor[] cdiGlobals = ((ICDITarget2) cdiTarget).getGlobalVariables();
- hasCDIGlobals = cdiGlobals != null;
- if (hasCDIGlobals) {
- for (int i = 0; i < cdiGlobals.length; i++) {
- list.add(CVariableFactory.createGlobalVariableDescriptor(cdiGlobals[i].getName(), null));
- }
- }
- }
- // otherwise ask the binary
- if (!hasCDIGlobals) {
- IBinaryObject file = getBinaryFile();
- if (file != null) {
- list.addAll(getCFileGlobals(file));
- }
- }
- return list.toArray(new IGlobalVariableDescriptor[list.size()]);
- }
-
- private List getCFileGlobals(IBinaryObject file) {
- ArrayList list = new ArrayList();
- ISymbol[] symbols = file.getSymbols();
- for (int i = 0; i < symbols.length; ++i) {
- if (symbols[i].getType() == ISymbol.VARIABLE) {
- list.add(CVariableFactory.createGlobalVariableDescriptor(symbols[i]));
- }
- }
- return list;
- }
-
- protected void setModuleManager(CModuleManager mm) {
- fModuleManager = mm;
- }
-
- protected CModuleManager getModuleManager() {
- return fModuleManager;
- }
-
- protected void disposeModuleManager() {
- fModuleManager.dispose();
- fModuleManager = null;
- }
-
- protected void setSignalManager(CSignalManager sm) {
- fSignalManager = sm;
- }
-
- protected CSignalManager getSignalManager() {
- return fSignalManager;
- }
-
- protected void disposeSignalManager() {
- fSignalManager.dispose();
- }
-
- protected void saveRegisterGroups() {
- fRegisterManager.save();
- }
-
- protected void disposeRegisterManager() {
- fRegisterManager.dispose();
- }
-
- protected void saveGlobalVariables() {
- fGlobalVariableManager.save();
- }
-
- protected void saveFormats() {
- fFormatManager.save();
- }
-
- protected void disposeGlobalVariableManager() {
- fGlobalVariableManager.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
- */
- @Override
- public boolean canResumeWithoutSignal() {
- // Check if the configuration supports this!!!
- return (canResume() && getCurrentStateInfo() instanceof ICDISignalReceived);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#resumeWithoutSignal()
- */
- @Override
- public void resumeWithoutSignal() throws DebugException {
- if (!canResume())
- return;
- final CDebugElementState newState = CDebugElementState.RESUMING;
- changeState(newState);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.resume(false);
- }
- } catch (CDIException e) {
- if (getState() == newState) {
- restoreOldState();
- }
- targetRequestFailed(e.getMessage(), e);
- }
- }
-
- public CRegisterManager getRegisterManager() {
- // Workaround for bug #309212. gdb 7.0 returns "No registers" error
- // at the beginning of the session.
- fRegisterManager.initialize();
- return fRegisterManager;
- }
-
- protected void setRegisterManager(CRegisterManager registerManager) {
- fRegisterManager = registerManager;
- }
-
- public IRegisterGroup[] getRegisterGroups(CStackFrame frame) throws DebugException {
- return getRegisterManager().getRegisterGroups(frame);
- }
-
- protected void disposeSourceManager() {
- ISourceLocator locator = getSourceLocator();
- if (locator instanceof IAdaptable) {
- IResourceChangeListener listener = ((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
- if (listener != null)
- CCorePlugin.getWorkspace().removeResourceChangeListener(listener);
- }
- }
-
- protected void disposeSourceLookupPath() {
- ISourceLocator locator = getLaunch().getSourceLocator();
- if (locator instanceof ISourceLookupDirector) {
- ISourceLookupParticipant[] participants = ((ISourceLookupDirector)locator).getParticipants();
- for (int i = 0; i < participants.length; ++i) {
- if (participants[i] instanceof CSourceLookupParticipant) {
- ((CSourceLookupParticipant)participants[i]).removeSourceLookupChangeListener(this);
- }
- }
- }
- }
-
- protected void saveMemoryBlocks() {
- getMemoryBlockRetrieval().save();
- }
-
- protected void disposeMemoryBlockRetrieval() {
- getMemoryBlockRetrieval().dispose();
- }
-
- protected CBreakpointManager getBreakpointManager() {
- return fBreakpointManager;
- }
-
- protected void setBreakpointManager(CBreakpointManager manager) {
- fBreakpointManager = manager;
- }
-
- protected void disposeBreakpointManager() {
- if (getBreakpointManager() != null)
- getBreakpointManager().dispose();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- String result = ""; //$NON-NLS-1$
- try {
- result = getName();
- } catch (DebugException e) {
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getDisassembly()
- */
- @Override
- public IDisassembly getDisassembly() throws DebugException {
- return fDisassembly;
- }
-
- public DisassemblyRetrieval getDisassemblyRetrieval() {
- return fDisassemblyRetrieval;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getSignals()
- */
- @Override
- public ICSignal[] getSignals() throws DebugException {
- CSignalManager sm = getSignalManager();
- if (sm != null) {
- return sm.getSignals();
- }
- return new ICSignal[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#hasSignals()
- */
- @Override
- public boolean hasSignals() throws DebugException {
- CSignalManager sm = getSignalManager();
- if (sm != null) {
- return (sm.getSignals().length > 0);
- }
- return false;
- }
-
- private void createDisassembly() {
- this.fDisassembly = new Disassembly(this);
- this.fDisassemblyRetrieval = new DisassemblyRetrieval(this);
- }
-
- private void disposeDisassembly() {
- if (fDisassembly != null)
- fDisassembly.dispose();
- fDisassembly = null;
- if (fDisassemblyRetrieval != null)
- fDisassemblyRetrieval.dispose();
- fDisassemblyRetrieval = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IBreakpointTarget#getBreakpointAddress(org.eclipse.cdt.debug.core.model.ICLineBreakpoint)
- */
- @Override
- public IAddress getBreakpointAddress(ICLineBreakpoint breakpoint) throws DebugException {
- return (getBreakpointManager() != null) ? getBreakpointManager().getBreakpointAddress(breakpoint) : getAddressFactory().getZero();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#enableInstructionStepping(boolean)
- */
- @Override
- public void enableInstructionStepping(boolean enabled) {
- fPreferences.setValue(PREF_INSTRUCTION_STEPPING_MODE, enabled);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
- */
- @Override
- public boolean isInstructionSteppingEnabled() {
- return fPreferences.getBoolean(PREF_INSTRUCTION_STEPPING_MODE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#supportsInstructionStepping()
- */
- @Override
- public boolean supportsInstructionStepping() {
- return getConfiguration().supportsInstructionStepping();
- }
-
- private void initializePreferences() {
- fPreferences = new Preferences();
- fPreferences.setDefault(PREF_INSTRUCTION_STEPPING_MODE, CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean(ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON));
- }
-
- private void disposePreferences() {
- if (fPreferences != null) {
- // persist current instruction stepping mode
- CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON, fPreferences.getBoolean(PREF_INSTRUCTION_STEPPING_MODE));
- CDebugCorePlugin.getDefault().savePluginPreferences();
- }
- fPreferences = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ITargetProperties#addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
- */
- @Override
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fPreferences != null)
- fPreferences.addPropertyChangeListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ITargetProperties#removePropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
- */
- @Override
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fPreferences != null)
- fPreferences.removePropertyChangeListener(listener);
- }
-
- protected CGlobalVariableManager getGlobalVariableManager() {
- return fGlobalVariableManager;
- }
-
- private void setGlobalVariableManager(CGlobalVariableManager globalVariableManager) {
- fGlobalVariableManager = globalVariableManager;
- }
-
- protected CSettingsManager getFormatManager() {
- return fFormatManager;
- }
-
- private void setFormatManager(CSettingsManager formatManager) {
- fFormatManager = formatManager;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#isPostMortem()
- */
- @Override
- public boolean isPostMortem() {
- return false;
- }
-
- public IAddressFactory getAddressFactory() {
- if (fAddressFactory == null) {
- // Ask CDI plug-in for the default AddressFactory.
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget instanceof ICDIAddressFactoryManagement) {
- fAddressFactory = ((ICDIAddressFactoryManagement) cdiTarget).getAddressFactory();
- }
- // And if that doesn't work, use the one from the file.
- if (fAddressFactory == null) {
- if (getExecFile() != null && getProject() != null) {
- IBinaryObject file = getBinaryFile();
- if (file != null) {
- fAddressFactory = file.getAddressFactory();
- }
- }
- }
-
- // As a last resort, fallback to 64 bit address factory
- if (fAddressFactory == null) {
- fAddressFactory = new Addr64Factory();
- }
- }
- return fAddressFactory;
- }
-
- private CMemoryBlockRetrievalExtension getMemoryBlockRetrieval() {
- return fMemoryBlockRetrieval;
- }
-
- private void setMemoryBlockRetrieval(CMemoryBlockRetrievalExtension memoryBlockRetrieval) {
- fMemoryBlockRetrieval = memoryBlockRetrieval;
- }
-
- private void changeState(CDebugElementState state) {
- setState(state);
- Iterator it = getThreadList().iterator();
- while (it.hasNext()) {
- it.next().setState(state);
- }
- }
-
- protected void restoreOldState() {
- restoreState();
- Iterator it = getThreadList().iterator();
- while (it.hasNext()) {
- it.next().restoreState();
- }
- }
-
- private void handleSymbolsLoaded(ICDISharedLibrary library) {
- getModuleManager().symbolsLoaded(library);
- }
-
- public ICGlobalVariable createGlobalVariable(IGlobalVariableDescriptor info) throws DebugException {
- ICDIVariableDescriptor vo = null;
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- vo = cdiTarget.getGlobalVariableDescriptors(info.getPath().lastSegment(), null, info.getName());
- }
- } catch (CDIException e) {
- throw new DebugException(new Status(IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), DebugException.TARGET_REQUEST_FAILED, e.getMessage(), null));
- }
- return CVariableFactory.createGlobalVariable(this, info, vo);
- }
-
- @Override
- public void sourceContainersChanged(ISourceLookupDirector director) {
- setSourceLookupPath(director.getSourceContainers());
- }
-
- private void setSourceLookupPath(ISourceContainer[] containers) {
- // LinkedHashSet allows quick lookup and deterministic ordering. We need
- // the former to efficiently prevent infinite recursion
- LinkedHashSet list = new LinkedHashSet(containers.length);
-
- getSourceLookupPath(list, containers);
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- cdiTarget.setSourcePaths(list.toArray(new String[list.size()]));
- }
- } catch (CDIException e) {
- CDebugCorePlugin.log(e);
- }
- }
-
- private void getSourceLookupPath(LinkedHashSet list, ISourceContainer[] containers) {
- for (ISourceContainer container : containers) {
- String pathToAdd = null;
-
- if (container instanceof CProjectSourceContainer) {
- IProject project = ((CProjectSourceContainer) container).getProject();
- if (project != null && project.exists()) {
- IPath location = project.getLocation();
- if (location != null) {
- pathToAdd = location.toPortableString();
- }
- }
- } else if (container instanceof ProjectSourceContainer) { // For backward compatibility
- IProject project = ((ProjectSourceContainer) container).getProject();
- if (project != null && project.exists()) {
- IPath location = project.getLocation();
- if (location != null) {
- pathToAdd = location.toPortableString();
- }
- }
- } else if (container instanceof FolderSourceContainer) {
- IContainer folderContainer = ((FolderSourceContainer) container).getContainer();
- if (folderContainer != null && folderContainer.exists()) {
- IPath location = folderContainer.getLocation();
- if (location != null) {
- pathToAdd = location.toPortableString();
- }
- }
- } if (container instanceof DirectorySourceContainer) {
- File dir = ((DirectorySourceContainer) container).getDirectory();
- if (dir != null && dir.exists()) {
- IPath path = new Path(dir.getAbsolutePath());
- pathToAdd = path.toPortableString();
- }
- }
-
- if (pathToAdd != null) {
- // 291912. Avoid infinite recursion
- if (list.contains(pathToAdd)) {
- continue;
- }
-
- list.add(pathToAdd);
- }
-
- if (container.isComposite()) {
- try {
- getSourceLookupPath(list, container.getSourceContainers());
- } catch (CoreException e) {
- CDebugCorePlugin.log(e.getStatus());
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getRegisterDescriptors()
- */
- @Override
- public IRegisterDescriptor[] getRegisterDescriptors() throws DebugException {
- return getRegisterManager().getAllRegisterDescriptors();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#addUserDefinedRegisterGroup(java.lang.String, org.eclipse.cdt.debug.core.model.IRegisterDescriptor[])
- */
- @Override
- public void addRegisterGroup(String name, IRegisterDescriptor[] descriptors) {
- getRegisterManager().addRegisterGroup(name, descriptors);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#removeRegisterGroups(org.eclipse.debug.core.model.IRegisterGroup[])
- */
- @Override
- public void removeRegisterGroups(IRegisterGroup[] groups) {
- getRegisterManager().removeRegisterGroups(groups);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#modifyRegisterGroup(org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup, org.eclipse.cdt.debug.core.model.IRegisterDescriptor[])
- */
- @Override
- public void modifyRegisterGroup(IPersistableRegisterGroup group, IRegisterDescriptor[] descriptors) {
- getRegisterManager().modifyRegisterGroup(group, descriptors);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#restoreDefaultRegisterGroups()
- */
- @Override
- public void restoreDefaultRegisterGroups() {
- getRegisterManager().restoreDefaults();
- }
-
- protected void skipBreakpoints(boolean enabled) {
- getBreakpointManager().skipBreakpoints(enabled);
- }
-
- /**
- * 'stopExpression' is used solely for the error message if the request
- * fails. Where to stop is dictated entirely by 'location'
- * @param symbol
- */
- private void stopAtLocation(ICDILocation location, String stopExpression) throws DebugException {
- try {
- setInternalTemporaryBreakpoint(location);
- } catch (CoreException e) {
- final ICDITarget cdiTarget = getCDITarget();
- boolean isTerminated = cdiTarget != null && cdiTarget.isTerminated();
- if (isTerminated) {
- String message = MessageFormat.format(CoreModelMessages.getString("CDebugTarget.0"), new String[]{ stopExpression }); //$NON-NLS-1$
- MultiStatus status = new MultiStatus(CDebugCorePlugin.getUniqueIdentifier(), IStatus.OK, message, null);
- status.add(e.getStatus());
- throw new DebugException(status);
- }
- String message = MessageFormat.format(CoreModelMessages.getString("CDebugTarget.2"), new String[]{ stopExpression, e.getStatus().getMessage() }); //$NON-NLS-1$
- IStatus newStatus = new Status(IStatus.WARNING, e.getStatus().getPlugin(), ICDebugInternalConstants.STATUS_CODE_QUESTION, message, null);
- if (!CDebugUtils.question(newStatus, this)) {
- throw new DebugException(new Status(IStatus.OK, e.getStatus().getPlugin(), e.getStatus().getCode(), e.getStatus().getMessage(), null));
- }
- }
- }
-
- protected void stopAtSymbol(String stopSymbol) throws DebugException {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- ICDILocation location = cdiTarget.createFunctionLocation("", stopSymbol); //$NON-NLS-1$
- stopAtLocation(location, stopSymbol);
- }
- }
-
- protected void stopAtAddress(IAddress address) throws DebugException {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- ICDIAddressLocation location = cdiTarget.createAddressLocation(address.getValue());
- stopAtLocation(location, address.toHexAddressString());
- }
- }
-
- protected void stopInMain() throws DebugException {
- String mainSymbol = ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT;
- try {
- final ICDITarget cdiTarget = getCDITarget();
- if (cdiTarget != null) {
- mainSymbol = getLaunch().getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
- ICDILocation location = cdiTarget.createFunctionLocation("", mainSymbol); //$NON-NLS-1$
- setInternalTemporaryBreakpoint(location);
- }
- } catch (CoreException e) {
- String message = MessageFormat.format(CoreModelMessages.getString("CDebugTarget.2"), new String[]{ mainSymbol, e.getStatus().getMessage() }); //$NON-NLS-1$
- IStatus newStatus = new Status(IStatus.WARNING, e.getStatus().getPlugin(), ICDebugInternalConstants.STATUS_CODE_QUESTION, message, null);
- if (!CDebugUtils.question(newStatus, this)) {
- terminate();
- throw new DebugException(new Status(IStatus.OK, e.getStatus().getPlugin(), e.getStatus().getCode(), e.getStatus().getMessage(), null));
- }
- }
- }
-
- @Override
- public boolean hasModules() throws DebugException {
- CModuleManager mm = getModuleManager();
- if (mm != null)
- return mm.hasModules();
- return false;
- }
-
- @Override
- public ICModule[] getModules() throws DebugException {
- CModuleManager mm = getModuleManager();
- if (mm != null)
- return mm.getModules();
- return new ICModule[0];
- }
-
- @Override
- public void loadSymbolsForAllModules() throws DebugException {
- CModuleManager mm = getModuleManager();
- if (mm != null)
- mm.loadSymbolsForAllModules();
- }
-
- public String getInternalID() {
- return internalD;
- }
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java
deleted file mode 100644
index 02d4c2e4c2f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.model.IDummyStackFrame;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * Implementation of the dummy stack frame.
- */
-public class CDummyStackFrame extends CDebugElement implements IStackFrame, IDummyStackFrame {
-
- /**
- * Containing thread.
- */
- private CThread fThread;
-
- /**
- * Constructor for CDummyStackFrame.
- *
- * @param target
- */
- public CDummyStackFrame( CThread thread ) {
- super( (CDebugTarget)thread.getDebugTarget() );
- setThread( thread );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getThread()
- */
- @Override
- public IThread getThread() {
- return fThread;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
- */
- @Override
- public IVariable[] getVariables() throws DebugException {
- return new IVariable[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
- */
- @Override
- public boolean hasVariables() throws DebugException {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
- */
- @Override
- public int getLineNumber() throws DebugException {
- return 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
- */
- @Override
- public int getCharStart() throws DebugException {
- return 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
- */
- @Override
- public int getCharEnd() throws DebugException {
- return 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getName()
- */
- @Override
- public String getName() throws DebugException {
- return "..."; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
- */
- @Override
- public IRegisterGroup[] getRegisterGroups() throws DebugException {
- return new IRegisterGroup[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
- */
- @Override
- public boolean hasRegisterGroups() throws DebugException {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#canStepInto()
- */
- @Override
- public boolean canStepInto() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#canStepOver()
- */
- @Override
- public boolean canStepOver() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#canStepReturn()
- */
- @Override
- public boolean canStepReturn() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#isStepping()
- */
- @Override
- public boolean isStepping() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#stepInto()
- */
- @Override
- public void stepInto() throws DebugException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#stepOver()
- */
- @Override
- public void stepOver() throws DebugException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IStep#stepReturn()
- */
- @Override
- public void stepReturn() throws DebugException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- @Override
- public boolean canResume() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- @Override
- public boolean canSuspend() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- @Override
- public void resume() throws DebugException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- @Override
- public void suspend() throws DebugException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- @Override
- public boolean canTerminate() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- @Override
- public boolean isTerminated() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- @Override
- public void terminate() throws DebugException {
- }
-
- /**
- * Sets the containing thread.
- *
- * @param thread the containing thread
- */
- protected void setThread( CThread thread ) {
- fThread = thread;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter.equals( IDummyStackFrame.class ) )
- return this;
- if ( adapter.equals( IStackFrame.class ) )
- return this;
- return super.getAdapter( adapter );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
deleted file mode 100644
index 0caca05201e..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Ling Wang (Nokia) - 126262
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.model.CVariableFormat;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IValue;
-
-/**
- * Represents an expression in the CDI model.
- */
-public class CExpression extends CLocalVariable implements IExpression {
-
- private String fText;
-
- private ICDIExpression fCDIExpression;
-
- private CStackFrame fStackFrame;
-
- private IValue fValue = CValueFactory.NULL_VALUE;
-
- private ICType fType;
-
- /**
- * Constructor for CExpression.
- */
- public CExpression( CStackFrame frame, ICDIExpression cdiExpression, ICDIVariableDescriptor varObject ) {
- super( frame, varObject );
- setFormat( CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
- fText = cdiExpression.getExpressionText();
- fCDIExpression = cdiExpression;
- fStackFrame = frame;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IExpression#getExpressionText()
- */
- @Override
- public String getExpressionText() {
- return fText;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
-
- if ( event instanceof ICDIResumedEvent ) {
- if ( source != null ) {
- ICDITarget cdiTarget = source.getTarget();
- if ( getCDITarget().equals( cdiTarget ) ) {
- setChanged( false );
- resetValue();
- }
- }
- }
-
- if ( event instanceof ICDIChangedEvent ) {
- // If a variable is changed (by user or program),
- // we should re-evaluate expressions.
- // Though it's better we check if the changed variable
- // is part of the expression, the effort required is not
- // worth the gain.
- // This is partial fix to bug 126262. It makes CDT behavior
- // in line with JDT.
- // The remaining problem (with both CDT & JDT) is:
- // Due to platform bug, the change will not show up in
- // Expression View until the view is redrawn (e.g. after stepping,
- // or when the view is uncovered from background). In other words,
- // if the Expression View is at the front (not covered) when the
- // variable is changed, the change won't be reflected in the view.
- if ( source instanceof ICDIVariable) {
- setChanged( false );
- resetValue();
- }
- }
- }
- super.handleDebugEvents( events );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#canEnableDisable()
- */
- @Override
- public boolean canEnableDisable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.CVariable#isBookkeepingEnabled()
- */
- @Override
- protected boolean isBookkeepingEnabled() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IExpression#getValue()
- */
- @Override
- public IValue getValue() {
- CStackFrame frame = (CStackFrame)getStackFrame();
- try {
- return getValue( frame );
- }
- catch( DebugException e ) {
- }
- return null;
- }
-
- protected synchronized IValue getValue( CStackFrame context ) throws DebugException {
- if ( fValue.equals( CValueFactory.NULL_VALUE ) ) {
- if ( context.isSuspended() ) {
- try {
- ICDIValue value = fCDIExpression.getValue( context.getCDIStackFrame() );
- if ( value != null ) {
- if ( value instanceof ICDIArrayValue ) {
- ICType type = null;
- try {
- type = new CType( value.getType() );
- }
- catch( CDIException e ) {
- // ignore and use default type
- }
- if ( type != null && type.isArray() ) {
- int[] dims = type.getArrayDimensions();
- if ( dims.length > 0 && dims[0] > 0 )
- fValue = CValueFactory.createIndexedValue( this, (ICDIArrayValue)value, 0, dims[0] );
- }
- }
- else {
- fValue = CValueFactory.createValue( this, value );
- }
- }
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
- }
- return fValue;
- }
-
- @Override
- protected ICStackFrame getStackFrame() {
- return fStackFrame;
- }
-
- @Override
- protected void resetValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).reset();
-
- // We can't just reset the value and toss the reference we've been
- // holding. Those things have a dispose() method and that needs to be
- // called when there is no further use for it (so debugger-engine
- // objects tied to the value can be freed). We return the AbstractCValue
- // as an IValue to the platform, which means the platform certainly
- // isn't going to dispose of it (there is no IValue.dispose method).
- // Notice that we call AbstractCValue.dispose in our dispose method
- // above. So, naturally, we need to do the same here. But then what is
- // the purpose of calling AbstractCValue.reset() if we just dispose of
- // the object, anyway? This whole thing seems a bit screwy. We should
- // either be holding on to the AbstractCValue and resetting it, or just
- // discarding it. The reset above doesn't hurt, but it sure seems
- // pointless.
- ((AbstractCValue) fValue).dispose();
- }
- fValue = CValueFactory.NULL_VALUE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#getExpressionString()
- */
- @Override
- public String getExpressionString() throws DebugException {
- return getExpressionText();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
- */
- @Override
- public void dispose() {
- if ( fCDIExpression != null ) {
- try {
- fCDIExpression.dispose();
- fCDIExpression = null;
- }
- catch( CDIException e ) {
- }
- }
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).dispose();
- fValue = CValueFactory.NULL_VALUE;
- }
- internalDispose( true );
- setDisposed( true );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#getType()
- */
- @Override
- public ICType getType() throws DebugException {
- if ( isDisposed() )
- return null;
- if ( fType == null ) {
- synchronized( this ) {
- if ( fType == null ) {
- fType = ((ICValue)fValue).getType();
- }
- }
- }
- return fType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
- */
- @Override
- public String getReferenceTypeName() throws DebugException {
- ICType type = getType();
- return ( type != null ) ? type.getName() : ""; //$NON-NLS-1$
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFloatingPointValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFloatingPointValue.java
deleted file mode 100644
index 83ffacbf0d8..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFloatingPointValue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatValue;
-
-/**
- * Represents a value of a float or double variable type.
- */
-public class CFloatingPointValue extends CValue {
-
- private Number fFloatingPointValue;
-
- /**
- * Constructor for CFloatingPointValue.
- */
- public CFloatingPointValue( CVariable parent, ICDIValue cdiValue ) {
- super( parent, cdiValue );
- }
-
- public Number getFloatingPointValue() throws CDIException {
- if ( fFloatingPointValue == null ) {
- ICDIValue cdiValue = getUnderlyingValue();
- if ( cdiValue instanceof ICDIDoubleValue ) {
- fFloatingPointValue = new Double( ((ICDIDoubleValue)cdiValue).doubleValue() );
- }
- else if ( cdiValue instanceof ICDIFloatValue ) {
- fFloatingPointValue = new Float( ((ICDIFloatValue)cdiValue).floatValue() );
- }
- }
- return fFloatingPointValue;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalValue.java
deleted file mode 100644
index 230c8f0c1fe..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalValue.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.debug.core.DebugException;
-
-public class CGlobalValue extends CValue
-{
- private Boolean fHasChildren = null;
-
-
- /**
- * Constructor for CGlobalValue.
- * @param parent
- * @param cdiValue
- */
- public CGlobalValue( CVariable parent, ICDIValue cdiValue )
- {
- super( parent, cdiValue );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- @Override
- public boolean hasVariables() throws DebugException
- {
- if ( fHasChildren == null )
- {
- fHasChildren = Boolean.valueOf( super.hasVariables() );
- }
- return fHasChildren.booleanValue();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java
deleted file mode 100644
index 9be52411c45..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Represents a global variable.
- */
-public class CGlobalVariable extends CVariable implements ICGlobalVariable {
-
- private class InternalVariable implements IInternalVariable {
-
- /**
- * The enclosing CVariable instance.
- */
- private CVariable fVariable;
-
- /**
- * The CDI variable object this variable is based on.
- */
- private ICDIVariableDescriptor fCDIVariableObject;
-
- /**
- * The underlying CDI variable.
- */
- private ICDIVariable fCDIVariable;
-
- /**
- * The type of this variable.
- */
- private CType fType;
-
- /**
- * The expression used to eveluate the value of this variable.
- */
- private String fQualifiedName;
-
- /**
- * The cache of the current value.
- */
- private ICValue fValue = CValueFactory.NULL_VALUE;
-
- /**
- * The change flag.
- */
- private boolean fChanged = false;
-
- /**
- * Constructor for InternalVariable.
- */
- InternalVariable( CVariable var, ICDIVariableDescriptor varObject ) {
- setVariable( var );
- setCDIVariableObject( varObject );
- setCDIVariable( (varObject instanceof ICDIVariable) ? (ICDIVariable)varObject : null );
- }
-
- @Override
- public IInternalVariable createShadow( int start, int length ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsArray( start, length ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- @Override
- public IInternalVariable createShadow( String type ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsType( type ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- private synchronized ICDIVariable getCDIVariable() throws DebugException {
- if ( fCDIVariable == null ) {
- try {
- fCDIVariable = getCDITarget().createGlobalVariable( (ICDIGlobalVariableDescriptor)getCDIVariableObject() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fCDIVariable;
- }
-
- private void setCDIVariable( ICDIVariable variable ) {
- fCDIVariable = variable;
- }
-
- private ICDIVariableDescriptor getCDIVariableObject() {
- if ( fCDIVariable != null ) {
- return fCDIVariable;
- }
- return fCDIVariableObject;
- }
-
- private void setCDIVariableObject( ICDIVariableDescriptor variableObject ) {
- fCDIVariableObject = variableObject;
- }
-
- @Override
- public String getQualifiedName() throws DebugException {
- if ( fQualifiedName == null ) {
- try {
- fQualifiedName = (fCDIVariableObject != null) ? fCDIVariableObject.getQualifiedName() : null;
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fQualifiedName;
- }
-
- @Override
- public CType getType() throws DebugException {
- if ( fType == null ) {
- ICDIVariableDescriptor varObject = getCDIVariableObject();
- if ( varObject != null ) {
- synchronized( this ) {
- if ( fType == null ) {
- try {
- fType = new CType( varObject.getType() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- }
- }
- }
- return fType;
- }
-
- private synchronized void invalidate( boolean destroy ) {
- try {
- if ( destroy && fCDIVariable != null )
- fCDIVariable.dispose();
- }
- catch( CDIException e ) {
- logError( e.getMessage() );
- }
- invalidateValue();
- setCDIVariable( null );
- if ( fType != null )
- fType.dispose();
- fType = null;
- }
-
- @Override
- public void dispose( boolean destroy ) {
- invalidate( destroy );
- }
-
- @Override
- public boolean isSameVariable( ICDIVariable cdiVar ) {
- return ( fCDIVariable != null ) ? fCDIVariable.equals( cdiVar ) : false;
- }
-
- @Override
- public int sizeof() {
- if ( getCDIVariableObject() != null ) {
- try {
- return getCDIVariableObject().sizeof();
- }
- catch( CDIException e ) {
- }
- }
- return 0;
- }
-
- @Override
- public boolean isArgument() {
- return ( getCDIVariableObject() instanceof ICDIArgumentDescriptor );
- }
-
- @Override
- public void setValue( String expression ) throws DebugException {
- ICDIVariable cdiVariable = null;
- try {
- cdiVariable = getCDIVariable();
- if ( cdiVariable != null )
- cdiVariable.setValue( expression );
- else
- requestFailed( CoreModelMessages.getString( "CModificationVariable.0" ), null ); //$NON-NLS-1$
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- @Override
- public synchronized ICValue getValue() throws DebugException {
- if ( fValue.equals( CValueFactory.NULL_VALUE ) ) {
- ICDIVariable var = getCDIVariable();
- if ( var != null ) {
- try {
- ICDIValue cdiValue = var.getValue();
- if ( cdiValue != null ) {
- ICDIType cdiType = cdiValue.getType();
- if ( cdiValue instanceof ICDIArrayValue && cdiType != null ) {
- ICType type = new CType( cdiType );
- if ( type.isArray() ) {
- int[] dims = type.getArrayDimensions();
- if ( dims.length > 0 && dims[0] > 0 )
- fValue = CValueFactory.createIndexedValue( getVariable(), (ICDIArrayValue)cdiValue, 0, dims[0] );
- }
- }
- else {
- fValue = CValueFactory.createValue( getVariable(), cdiValue );
- }
- }
- if (getCDITarget().getConfiguration() instanceof ICDITargetConfiguration2 &&
- ((ICDITargetConfiguration2)getCDITarget().getConfiguration()).supportsRuntimeTypeIdentification())
- fType = null; // When the debugger supports RTTI getting a new value may also mean a new type.
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), e );
- }
- }
- }
- return fValue;
- }
-
- @Override
- public void invalidateValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).dispose();
- fValue = CValueFactory.NULL_VALUE;
- }
- }
-
- @Override
- public boolean isChanged() {
- return fChanged;
- }
-
- @Override
- public synchronized void setChanged( boolean changed ) {
- if ( changed ) {
- invalidateValue();
- }
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).setChanged( changed );
- }
- fChanged = changed;
- }
-
- @Override
- public synchronized void preserve() {
- setChanged( false );
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).preserve();
- }
- }
-
- CVariable getVariable() {
- return fVariable;
- }
-
- private void setVariable( CVariable variable ) {
- fVariable = variable;
- }
-
- @Override
- public void resetValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).reset();
- }
- }
-
- @Override
- public boolean isEditable() throws DebugException {
- ICDIVariable var = getCDIVariable();
- if ( var != null ) {
- try {
- return var.isEditable();
- }
- catch( CDIException e ) {
- }
- }
- return false;
- }
-
- /**
- * Compares the underlying variable objects.
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( obj instanceof InternalVariable ) {
- return getCDIVariableObject().equals( ((InternalVariable)obj).getCDIVariableObject() );
- }
- return false;
- }
-
- @Override
- public boolean isSameDescriptor( ICDIVariableDescriptor desc ) {
- return getCDIVariableObject().equals( desc );
- }
-
- @Override
- public ICDIObject getCdiObject() {
- return fCDIVariable;
- }
- }
-
- /**
- * Will be null for a child of a global (array member, struct field, etc)
- */
- private IGlobalVariableDescriptor fDescriptor;
-
- /**
- * Constructor for CGlobalVariable.
- */
- protected CGlobalVariable( CDebugElement parent, IGlobalVariableDescriptor descriptor, ICDIVariableDescriptor cdiVariableObject ) {
- super( parent, cdiVariableObject );
- fDescriptor = descriptor;
- }
-
- /**
- * Constructor for CGlobalVariable.
- */
- protected CGlobalVariable( CDebugElement parent, IGlobalVariableDescriptor descriptor, ICDIVariableDescriptor cdiVariableObject, String message ) {
- super( parent, cdiVariableObject, message );
- fDescriptor = descriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#canEnableDisable()
- */
- @Override
- public boolean canEnableDisable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- if ( event instanceof ICDIResumedEvent ) {
- ICDIObject source = event.getSource();
- if ( source != null ) {
- ICDITarget cdiTarget = source.getTarget();
- if ( getCDITarget().equals( cdiTarget ) ) {
- setChanged( false );
- }
- }
- }
- }
- super.handleDebugEvents( events );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICGlobalVariable#getDescriptor()
- */
- @Override
- public IGlobalVariableDescriptor getDescriptor() {
- return fDescriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
- */
- @Override
- public void dispose() {
- internalDispose( true );
- setDisposed( true );
- }
-
- @Override
- protected void createOriginal( ICDIVariableDescriptor vo ) {
- if ( vo != null ) {
- setName( vo.getName() );
- setOriginal( new InternalVariable( this, vo ) );
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CIndexedValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CIndexedValue.java
deleted file mode 100644
index f04ae203fb1..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CIndexedValue.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Mathias Kunter - Support for octal number format (bug 370462)
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.model.CVariableFormat;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.utils.Addr32;
-import org.eclipse.cdt.utils.Addr64;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IIndexedValue;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * A value containing an array of variables.
- */
-public class CIndexedValue extends AbstractCValue implements IIndexedValue {
-
- /**
- * The underlying CDI value.
- */
- private ICDIArrayValue fCDIValue;
-
- /**
- * Child variables. Only the variables from loaded partitions will be held.
- * Use map instead of a java array to scale for large number of children.
- */
- private Map fVariables;
-
- /**
- * The index of the first variable contained in this value.
- */
- private int fOffset;
-
- /**
- * The number of entries in this indexed collection.
- */
- private int fSize;
-
- /**
- * The type of this value.
- */
- private ICType fType;
-
- /**
- * Constructor for CIndexedValue.
- */
- public CIndexedValue( AbstractCVariable parent, ICDIArrayValue cdiValue, int offset, int size ) {
- super( parent );
- fVariables = new HashMap(getPreferredPartitionSize());
- fCDIValue = cdiValue;
- fOffset = offset;
- fSize = size;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#setChanged(boolean)
- */
- @Override
- protected void setChanged( boolean changed ) {
- for (IVariable var : fVariables.values()) {
- ((AbstractCVariable)var).setChanged( changed );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#dispose()
- */
- @Override
- public void dispose() {
- for (IVariable var : fVariables.values()) {
- ((AbstractCVariable)var).dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#reset()
- */
- @Override
- protected void reset() {
- for (IVariable var : fVariables.values()) {
- ((AbstractCVariable)var).resetValue();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#preserve()
- */
- @Override
- protected void preserve() {
- resetStatus();
- for (IVariable var : fVariables.values()) {
- ((AbstractCVariable)var).preserve();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICValue#getType()
- */
- @Override
- public ICType getType() throws DebugException {
- if ( fType == null ) {
- synchronized( this ) {
- if ( fType == null ) {
- try {
- ICDIType cdiType = getCDIValue().getType();
- if ( cdiType != null )
- fType = new CType( cdiType );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
- }
- }
- return fType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
- */
- @Override
- public String getReferenceTypeName() throws DebugException {
- ICType type = getType();
- return ( type != null ) ? type.getName() : ""; //$NON-NLS-1$
- }
-
- /**
- * Please note that this function returns the address of the array, not the
- * contents of the array, as long as the underlying ICDIArrayValue is an
- * instance of ICDIPointerValue. Otherwise, it returns an empty string.
- *
- * @see org.eclipse.debug.core.model.IValue#getValueString()
- */
- @Override
- public String getValueString() throws DebugException {
- if ( fCDIValue instanceof ICDIPointerValue ) {
- try {
- IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
- BigInteger pv = ((ICDIPointerValue)fCDIValue).pointerValue();
- if ( pv == null )
- return ""; //$NON-NLS-1$
- IAddress address = factory.createAddress( pv );
- if ( address == null )
- return ""; //$NON-NLS-1$
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) || CVariableFormat.HEXADECIMAL.equals( format ) )
- return address.toHexAddressString();
- else if ( CVariableFormat.DECIMAL.equals( format ) )
- return address.toString();
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- // Using the instanceof operator here to avoid API change
- // Add IAddress.toOctalAddressString() in a future CDT release
- if (address instanceof Addr32) {
- return ((Addr32)address).toOctalAddressString();
- } else if (address instanceof Addr64) {
- return ((Addr64)address).toOctalAddressString();
- } else {
- // Fall back to hexadecimal address format
- return address.toHexAddressString();
- }
- } else if ( CVariableFormat.BINARY.equals( format ) )
- return address.toBinaryAddressString();
- return null;
- } catch (CDIException e) {
- requestFailed( e.getMessage(), null );
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#isAllocated()
- */
- @Override
- public boolean isAllocated() throws DebugException {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getVariables()
- */
- @Override
- public IVariable[] getVariables() throws DebugException {
- return getVariables0( getInitialOffset(), getSize() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- @Override
- public boolean hasVariables() throws DebugException {
- return getSize() > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IIndexedValue#getVariable(int)
- */
- @Override
- public IVariable getVariable( int offset ) throws DebugException {
- if ( offset >= getSize() ) {
- requestFailed( CoreModelMessages.getString( "CIndexedValue.0" ), null ); //$NON-NLS-1$
- }
- return getVariables0( offset, 1 )[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IIndexedValue#getVariables(int, int)
- */
- @Override
- public IVariable[] getVariables( int offset, int length ) throws DebugException {
- if ( offset >= getSize() ) {
- requestFailed( CoreModelMessages.getString( "CIndexedValue.1" ), null ); //$NON-NLS-1$
- }
- if ( (offset + length - 1) >= getSize() ) {
- requestFailed( CoreModelMessages.getString( "CIndexedValue.2" ), null ); //$NON-NLS-1$
- }
- return getVariables0( offset, length );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IIndexedValue#getSize()
- */
- @Override
- public int getSize() throws DebugException {
- return getSize0();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IIndexedValue#getInitialOffset()
- */
- @Override
- public int getInitialOffset() {
- return fOffset;
- }
-
- protected ICDIArrayValue getCDIValue() {
- return fCDIValue;
- }
-
- private int getPartitionSize( int index ) {
- int psize = getPreferredPartitionSize();
- int size = getSize0();
- int pcount = size/psize + 1;
- if ( pcount - 1 < index )
- return 0;
- return ( pcount - 1 == index ) ? size % psize : psize;
- }
-
- private int getPartitionIndex( int offset ) {
- return offset / getPreferredPartitionSize();
- }
-
- private int getPreferredPartitionSize() {
- return 100;
- }
-
- private IVariable[] getVariables0( int offset, int length ) throws DebugException {
- IVariable[] result = new IVariable[length];
- int firstIndex = getPartitionIndex( offset );
- int lastIndex = getPartitionIndex( offset + Math.max( length - 1, 0 ) );
- for ( int i = firstIndex; i <= lastIndex; ++i ) {
- synchronized( this ) {
- if ( !isPartitionLoaded( i ) ) {
- loadPartition( i );
- }
- }
- }
- for (int i = 0; i < length; i++) {
- result[i] = fVariables.get( offset + i );
- }
- return result;
- }
-
- private boolean isPartitionLoaded( int index ) {
- return fVariables.containsKey(index * getPreferredPartitionSize());
- }
-
- private void loadPartition( int index ) throws DebugException {
- int prefSize = getPreferredPartitionSize();
- int psize = getPartitionSize( index );
- ICDIVariable[] cdiVars = new ICDIVariable[0];
- try {
- cdiVars = getCDIValue().getVariables( index * prefSize, psize );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- for( int i = 0; i < cdiVars.length; ++i )
- fVariables.put(i + index * prefSize, CVariableFactory.createLocalVariable( this, cdiVars[i] ));
- }
-
- private int getSize0() {
- return fSize;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CLocalVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CLocalVariable.java
deleted file mode 100644
index cfb67a2978f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CLocalVariable.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.debug.core.DebugException;
-
-
-public class CLocalVariable extends CVariable {
-
- private class InternalVariable implements IInternalVariable {
-
- /**
- * The enclosing CVariable instance.
- */
- private CVariable fVariable;
-
- /**
- * The CDI variable object this variable is based on.
- */
- private ICDIVariableDescriptor fCDIVariableObject;
-
- /**
- * The underlying CDI variable.
- */
- private ICDIVariable fCDIVariable;
-
- /**
- * The type of this variable.
- */
- private CType fType;
-
- /**
- * The expression used to eveluate the value of this variable.
- */
- private String fQualifiedName;
-
- /**
- * The cache of the current value.
- */
- private ICValue fValue = CValueFactory.NULL_VALUE;
-
- /**
- * The change flag.
- */
- private boolean fChanged = false;
-
- /**
- * Constructor for InternalVariable.
- */
- InternalVariable( CVariable var, ICDIVariableDescriptor varObject ) {
- setVariable( var );
- setCDIVariableObject( varObject );
- setCDIVariable( (varObject instanceof ICDIVariable) ? (ICDIVariable)varObject : null );
- }
-
- @Override
- public IInternalVariable createShadow( int start, int length ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsArray( start, length ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- @Override
- public IInternalVariable createShadow( String type ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsType( type ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- private synchronized ICDIVariable getCDIVariable() throws DebugException {
- if ( fCDIVariable == null ) {
- try {
- fCDIVariable = ((CStackFrame)getStackFrame()).getCDIStackFrame().createLocalVariable( (ICDILocalVariableDescriptor)getCDIVariableObject() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fCDIVariable;
- }
-
- private void setCDIVariable( ICDIVariable variable ) {
- fCDIVariable = variable;
- }
-
- private ICDIVariableDescriptor getCDIVariableObject() {
- if ( fCDIVariable != null ) {
- return fCDIVariable;
- }
- return fCDIVariableObject;
- }
-
- private void setCDIVariableObject( ICDIVariableDescriptor variableObject ) {
- fCDIVariableObject = variableObject;
- }
-
- @Override
- public String getQualifiedName() throws DebugException {
- if ( fQualifiedName == null ) {
- try {
- fQualifiedName = (fCDIVariableObject != null) ? fCDIVariableObject.getQualifiedName() : null;
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fQualifiedName;
- }
-
- @Override
- public CType getType() throws DebugException {
- if ( fType == null ) {
- ICDIVariableDescriptor varObject = getCDIVariableObject();
- if ( varObject != null ) {
- synchronized( this ) {
- if ( fType == null ) {
- try {
- fType = new CType( varObject.getType() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- }
- }
- }
- return fType;
- }
-
- private synchronized void invalidate( boolean destroy ) {
- try {
- if ( destroy && fCDIVariable != null )
- fCDIVariable.dispose();
- }
- catch( CDIException e ) {
- logError( e.getMessage() );
- }
- invalidateValue();
- setCDIVariable( null );
- if ( fType != null )
- fType.dispose();
- fType = null;
- }
-
- @Override
- public void dispose( boolean destroy ) {
- invalidate( destroy );
- }
-
- @Override
- public boolean isSameVariable( ICDIVariable cdiVar ) {
- return ( fCDIVariable != null ) ? fCDIVariable.equals( cdiVar ) : false;
- }
-
- @Override
- public int sizeof() {
- if ( getCDIVariableObject() != null ) {
- try {
- return getCDIVariableObject().sizeof();
- }
- catch( CDIException e ) {
- }
- }
- return 0;
- }
-
- @Override
- public boolean isArgument() {
- return ( getCDIVariableObject() instanceof ICDIArgumentDescriptor );
- }
-
- @Override
- public void setValue( String expression ) throws DebugException {
- ICDIVariable cdiVariable = null;
- try {
- cdiVariable = getCDIVariable();
- if ( cdiVariable != null )
- cdiVariable.setValue( expression );
- else
- requestFailed( CoreModelMessages.getString( "CModificationVariable.0" ), null ); //$NON-NLS-1$
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- @Override
- public synchronized ICValue getValue() throws DebugException {
- if ( fValue.equals( CValueFactory.NULL_VALUE ) ) {
- ICDIVariable var = getCDIVariable();
- if ( var != null ) {
- try {
- ICDIValue cdiValue = var.getValue();
- if ( cdiValue != null ) {
- ICDIType cdiType = cdiValue.getType();
- if ( cdiValue instanceof ICDIArrayValue && cdiType != null ) {
- ICType type = new CType( cdiType );
- if ( type.isArray() ) {
- int[] dims = type.getArrayDimensions();
- if ( dims.length > 0 && dims[0] > 0 )
- fValue = CValueFactory.createIndexedValue( getVariable(), (ICDIArrayValue)cdiValue, 0, dims[0] );
- }
- }
- else {
- fValue = CValueFactory.createValue( getVariable(), cdiValue );
- }
- }
- if (getCDITarget().getConfiguration() instanceof ICDITargetConfiguration2 &&
- ((ICDITargetConfiguration2)getCDITarget().getConfiguration()).supportsRuntimeTypeIdentification())
- fType = null; // When the debugger supports RTTI getting a new value may also mean a new type.
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), e );
- }
- }
- }
- return fValue;
- }
-
- @Override
- public void invalidateValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).dispose();
- fValue = CValueFactory.NULL_VALUE;
- }
- }
-
- @Override
- public boolean isChanged() {
- return fChanged;
- }
-
- @Override
- public synchronized void setChanged( boolean changed ) {
- if ( changed ) {
- invalidateValue();
- }
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).setChanged( changed );
- }
- fChanged = changed;
- }
-
- @Override
- public synchronized void preserve() {
- setChanged( false );
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).preserve();
- }
- }
-
- CVariable getVariable() {
- return fVariable;
- }
-
- private void setVariable( CVariable variable ) {
- fVariable = variable;
- }
-
- @Override
- public void resetValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).reset();
- }
- }
-
- @Override
- public boolean isEditable() throws DebugException {
- ICDIVariable var = getCDIVariable();
- if ( var != null ) {
- try {
- return var.isEditable();
- }
- catch( CDIException e ) {
- }
- }
- return false;
- }
-
- /**
- * Compares the underlying variable objects.
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( obj instanceof InternalVariable ) {
- return getCDIVariableObject().equals( ((InternalVariable)obj).getCDIVariableObject() );
- }
- return false;
- }
-
- @Override
- public boolean isSameDescriptor( ICDIVariableDescriptor desc ) {
- return getCDIVariableObject().equals( desc );
- }
- @Override
- public ICDIObject getCdiObject() {
- return fCDIVariable;
- }
- }
-
- /**
- * Constructor for CLocalVariable.
- */
- public CLocalVariable( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject, String errorMessage ) {
- super( parent, cdiVariableObject, errorMessage );
- }
-
- /**
- * Constructor for CLocalVariable.
- */
- public CLocalVariable( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject ) {
- super( parent, cdiVariableObject );
- }
-
- @Override
- protected void createOriginal( ICDIVariableDescriptor vo ) {
- if ( vo != null ) {
- setName( vo.getName() );
- setOriginal( new InternalVariable( this, vo ) );
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
deleted file mode 100644
index 9f4fb6d0697..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
+++ /dev/null
@@ -1,604 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIRestartedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlockManagement2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemorySpaceEncoder;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemorySpaceManagement;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.IExecFileInfo;
-import org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlock;
-import org.eclipse.cdt.debug.internal.core.CMemoryBlockRetrievalExtension;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.core.model.MemoryByte;
-
-/**
- * Represents a memory block in the CDI model.
- */
-public class CMemoryBlockExtension extends CDebugElement implements IMemorySpaceAwareMemoryBlock, ICDIEventListener {
-
- /**
- * The address expression this memory block is based on.
- */
- private String fExpression;
-
- /**
- * The base address of this memory block.
- */
- private BigInteger fBaseAddress;
-
- /**
- * The memory space identifier; will be null for backends that
- * don't require memory space support
- */
- private String fMemorySpaceID;
-
- /**
- * The underlying CDI memory block.
- */
- private ICDIMemoryBlock fCDIBlock;
-
- /**
- * The memory bytes values.
- */
- private MemoryByte[] fBytes = null;
-
- private Set fChanges = new HashSet();
-
- /**
- * is fWordSize available?
- */
- private boolean fHaveWordSize;
-
- /**
- * The number of bytes per address.
- */
- private int fWordSize;
-
-
- /**
- * Constructor
- */
- public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress ) {
- this(target, expression, baseAddress, null);
- }
-
- /**
- * Constructor that takes a memory space identifier
- */
- @SuppressWarnings("deprecation")
- public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress, String memorySpaceID ) {
- super( target );
-
- fBaseAddress = baseAddress;
- fMemorySpaceID = memorySpaceID;
-
- if (memorySpaceID == null) {
- fExpression = expression;
- }
- else {
- assert memorySpaceID.length() > 0;
- ICDITarget cdiTarget = target.getCDITarget();
- if (cdiTarget instanceof ICDIMemorySpaceEncoder) {
- // new interface
- fExpression = ((ICDIMemorySpaceEncoder)cdiTarget).encodeAddress(expression, memorySpaceID);
- }
- else if (cdiTarget instanceof ICDIMemorySpaceManagement) {
- // old interface
- fExpression = ((ICDIMemorySpaceManagement)target.getCDITarget()).addressToString(baseAddress, memorySpaceID);
- }
-
- if (fExpression == null) {
- // If the backend supports memory spaces, it should implement ICDIMemorySpaceManagement
- // Even if it does, it may choose to use our built-in encoding/decoding
- fExpression = CMemoryBlockRetrievalExtension.encodeAddressDefault(expression, memorySpaceID);
- }
- }
-
- }
-
- /**
- * Constructor that takes the addressable size
- */
- public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress, int wordSize ) {
- this( target, expression, baseAddress, wordSize, null );
- }
-
- /**
- * Constructor that takes the addressable size and a memory space identifier
- */
- public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress, int wordSize, String memorySpaceID ) {
- super( target );
- fExpression = expression;
- fBaseAddress = baseAddress;
- fWordSize= wordSize;
- fHaveWordSize= true;
- fMemorySpaceID = memorySpaceID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getExpression()
- */
- @Override
- public String getExpression() {
- return fExpression;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBigBaseAddress()
- */
- @Override
- public BigInteger getBigBaseAddress() {
- return fBaseAddress;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressSize()
- */
- @Override
- public int getAddressSize() {
- return ((CDebugTarget)getDebugTarget()).getAddressFactory().createAddress( getBigBaseAddress() ).getSize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressableSize()
- */
- @Override
- public int getAddressableSize() throws DebugException {
- if (!fHaveWordSize) {
- synchronized (this) {
- if (!fHaveWordSize) {
- ICDIMemoryBlock block= getCDIBlock();
- if (block == null) {
- try {
- // create a CDI block of an arbitrary size so we can call into
- // the backend to determine the memory's addressable size
- setCDIBlock( block= createCDIBlock( fBaseAddress, 100 ));
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
- if (block != null) {
- fWordSize= block.getWordSize();
- fHaveWordSize= true;
- }
- }
- }
- }
- return fWordSize;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#supportBaseAddressModification()
- */
- @Override
- public boolean supportBaseAddressModification() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#setBaseAddress(java.math.BigInteger)
- */
- @Override
- public void setBaseAddress( BigInteger address ) throws DebugException {
- BigInteger current = fBaseAddress;
- if (current == address || (current != null && current.equals(address))) {
- return; // optimization
- }
- fBaseAddress = address;
- fireChangeEvent(DebugEvent.STATE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset(java.math.BigInteger, long)
- */
- @Override
- public MemoryByte[] getBytesFromOffset( BigInteger unitOffset, long addressableUnits ) throws DebugException {
- return getBytesFromAddress(unitOffset.add(getBigBaseAddress()) , addressableUnits);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromAddress(java.math.BigInteger, long)
- */
- @Override
- public MemoryByte[] getBytesFromAddress( BigInteger address, long length ) throws DebugException {
- ICDIMemoryBlock cdiBlock = getCDIBlock();
- if ( fBytes == null || cdiBlock == null ||
- cdiBlock.getStartAddress().compareTo( address ) > 0 ||
- cdiBlock.getStartAddress().add( BigInteger.valueOf( cdiBlock.getLength()/cdiBlock.getWordSize() ) ).compareTo( address.add( BigInteger.valueOf( length ) ) ) < 0 ) {
- synchronized( this ) {
- byte[] bytes = null;
- try {
- cdiBlock = getCDIBlock();
- if ( cdiBlock == null ||
- cdiBlock.getStartAddress().compareTo( address ) > 0 ||
- cdiBlock.getStartAddress().add( BigInteger.valueOf( cdiBlock.getLength()/cdiBlock.getWordSize() ) ).compareTo( address.add( BigInteger.valueOf( length ) ) ) < 0 ) {
- if ( cdiBlock != null ) {
- disposeCDIBlock();
- fBytes = null;
- }
- setCDIBlock( cdiBlock = createCDIBlock( address, length ) );
- }
- bytes = getCDIBlock().getBytes();
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- if (bytes != null) {
- fBytes = new MemoryByte[bytes.length];
- for ( int i = 0; i < bytes.length; ++i ) {
- fBytes[i] = createMemoryByte( bytes[i], getCDIBlock().getFlags( i ), hasChanged( getRealBlockAddress().add( BigInteger.valueOf( i ) ) ) );
- }
- }
- }
- }
- MemoryByte[] result = new MemoryByte[0];
- if ( fBytes != null && cdiBlock != null ) {
- int offset = address.subtract( getRealBlockAddress() ).intValue();
- int offsetInBytes = offset * cdiBlock.getWordSize();
- long lengthInBytes = length * cdiBlock.getWordSize();
- if ( offset >= 0 ) {
- int size = ( fBytes.length - offsetInBytes >= lengthInBytes ) ? (int)lengthInBytes : fBytes.length - offsetInBytes;
- if ( size > 0 ) {
- result = new MemoryByte[size];
- System.arraycopy( fBytes, offsetInBytes, result, 0, size );
- }
- }
- }
- return result;
- }
-
- private boolean isBigEndian() {
- IExecFileInfo info = getDebugTarget().getAdapter( IExecFileInfo.class );
- if ( info != null ) {
- return !info.isLittleEndian();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockRetrieval()
- */
- @Override
- public IMemoryBlockRetrieval getMemoryBlockRetrieval() {
- return getDebugTarget().getAdapter( IMemoryBlockRetrieval.class );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- if ( source == null )
- continue;
- if ( source.getTarget().equals( getCDITarget() ) ) {
- if ( event instanceof ICDIResumedEvent || event instanceof ICDIRestartedEvent ) {
- resetChanges();
- }
- else if ( event instanceof ICDIMemoryChangedEvent ) {
- if ( source instanceof ICDIMemoryBlock && source.equals( getCDIBlock() ) ) {
- handleChangedEvent( (ICDIMemoryChangedEvent)event );
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getStartAddress()
- */
- @Override
- public long getStartAddress() {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getLength()
- */
- @Override
- public long getLength() {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getBytes()
- */
- @Override
- public byte[] getBytes() throws DebugException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#supportsValueModification()
- */
- @Override
- public boolean supportsValueModification() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#setValue(long, byte[])
- */
- @Override
- public void setValue( long offset, byte[] bytes ) throws DebugException {
- setValue( BigInteger.valueOf( offset ), bytes );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#setValue(java.math.BigInteger, byte[])
- */
- @Override
- public void setValue( BigInteger offset, byte[] bytes ) throws DebugException {
- ICDIMemoryBlock block = getCDIBlock();
- if ( block != null ) {
- BigInteger base = getBigBaseAddress();
- BigInteger real = getRealBlockAddress();
- long realOffset = base.add( offset ).subtract( real ).longValue();
- try {
- block.setValue( realOffset, bytes );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getDetailMessage(), null );
- }
- }
- }
-
- private ICDIMemoryBlock createCDIBlock( BigInteger address, long length) throws CDIException {
- ICDIMemoryBlock block = null;
- CDebugTarget target = (CDebugTarget)getDebugTarget();
- ICDITarget cdiTarget = target.getCDITarget();
- if ((fMemorySpaceID != null) && (cdiTarget instanceof ICDIMemoryBlockManagement2)) {
- block = ((ICDIMemoryBlockManagement2)cdiTarget).createMemoryBlock(address, fMemorySpaceID, (int)length);
- } else {
- // Note that CDI clients should ignore the word size
- // parameter. It has been deprecated in 4.0. We continue to
- // pass in 1 as has always been the case to maintain backwards
- // compatibility.
- block = cdiTarget.createMemoryBlock( address.toString(), (int)length, 1);
- }
- block.setFrozen( false );
- getCDISession().getEventManager().addEventListener( this );
- return block;
- }
-
- private void disposeCDIBlock() {
- ICDIMemoryBlock block = getCDIBlock();
- if ( block != null ) {
- try {
- ((CDebugTarget)getDebugTarget()).getCDITarget().removeBlocks( new ICDIMemoryBlock[]{ block });
- }
- catch( CDIException e ) {
- DebugPlugin.log( e );
- }
- setCDIBlock( null );
- getCDISession().getEventManager().removeEventListener( this );
- }
- }
-
- private ICDIMemoryBlock getCDIBlock() {
- return fCDIBlock;
- }
-
- private void setCDIBlock( ICDIMemoryBlock cdiBlock ) {
- fCDIBlock = cdiBlock;
- }
-
- private BigInteger getRealBlockAddress() {
- ICDIMemoryBlock block = getCDIBlock();
- return ( block != null ) ? block.getStartAddress() : BigInteger.ZERO;
- }
-
- private long getBlockSize() {
- ICDIMemoryBlock block = getCDIBlock();
- return ( block != null ) ? block.getLength() : 0;
- }
-
- private void handleChangedEvent( ICDIMemoryChangedEvent event ) {
- ICDIMemoryBlock block = getCDIBlock();
- if ( block != null && fBytes != null ) {
- MemoryByte[] memBytes = fBytes.clone();
- try {
- BigInteger start = getRealBlockAddress();
- long length = block.getLength();
- byte[] newBytes = block.getBytes();
- BigInteger[] addresses = event.getAddresses();
- saveChanges( addresses );
- for ( int i = 0; i < addresses.length; ++i ) {
- fChanges.add( addresses[i] );
- int addressableSize = fCDIBlock.getWordSize(); // # of bytes per address
- if ( addresses[i].compareTo( start ) >= 0 && addresses[i].compareTo( start.add( BigInteger.valueOf( length / addressableSize ) ) ) < 0 ) {
- int index = addressableSize * addresses[i].subtract( start ).intValue();
- int end = Math.min(Math.min(index + addressableSize, memBytes.length), newBytes.length);
- for (index = Math.max(index, 0) ; index < end; index++ ) {
- memBytes[index].setChanged( true );
- memBytes[index].setValue( newBytes[index] );
- }
- }
- }
- fBytes = memBytes;
- fireChangeEvent( DebugEvent.CONTENT );
- }
- catch( CDIException e ) {
- DebugPlugin.log( e );
- }
- }
- }
-
- private void saveChanges( BigInteger[] addresses ) {
- fChanges.addAll( Arrays.asList( addresses ) );
- }
-
- private boolean hasChanged( BigInteger address ) {
- return fChanges.contains( address );
- }
-
- private void resetChanges() {
- if ( fBytes != null ) {
- BigInteger[] changes = fChanges.toArray( new BigInteger[fChanges.size()] );
- for ( int i = 0; i < changes.length; ++i ) {
- BigInteger real = getRealBlockAddress();
- if ( real.compareTo( changes[i] ) <= 0 && real.add( BigInteger.valueOf( getBlockSize() ) ).compareTo( changes[i] ) > 0 ) {
- int index = changes[i].subtract( real ).intValue();
- if ( index >= 0 && index < fBytes.length ) {
- fBytes[index].setChanged( false );
- }
- }
- }
- }
- fChanges.clear();
- fireChangeEvent( DebugEvent.CONTENT );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#supportsChangeManagement()
- */
- @Override
- public boolean supportsChangeManagement() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#connect(java.lang.Object)
- */
- @Override
- public void connect( Object object ) {
- // TODO Auto-generated method stub
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#disconnect(java.lang.Object)
- */
- @Override
- public void disconnect( Object object ) {
- // TODO Auto-generated method stub
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getConnections()
- */
- @Override
- public Object[] getConnections() {
- // TODO Auto-generated method stub
- return new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#dispose()
- */
- @Override
- public void dispose() {
- fChanges.clear();
- ICDIMemoryBlock cdiBlock = getCDIBlock();
- if ( cdiBlock != null ) {
- try {
- ((CDebugTarget)getDebugTarget()).getCDITarget().removeBlocks( new ICDIMemoryBlock[] {cdiBlock} );
- }
- catch( CDIException e ) {
- CDebugCorePlugin.log( e );
- }
- fCDIBlock = null;
- }
- final ICDISession cdiSession = getCDISession();
- if (cdiSession != null) {
- cdiSession.getEventManager().removeEventListener( this );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter( Class adapter ) {
- if ( IMemoryBlockRetrieval.class.equals( adapter ) )
- return getMemoryBlockRetrieval();
- return super.getAdapter( adapter );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockStartAddress()
- */
- @Override
- public BigInteger getMemoryBlockStartAddress() throws DebugException {
- return null; // return null to mean not bounded ... according to the spec
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockEndAddress()
- */
- @Override
- public BigInteger getMemoryBlockEndAddress() throws DebugException {
- return null;// return null to mean not bounded ... according to the spec
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBigLength()
- */
- @Override
- public BigInteger getBigLength() throws DebugException {
- ICDIMemoryBlock block = getCDIBlock();
- if ( block != null ) {
- BigInteger length = new BigInteger( Long.toHexString( block.getLength() ), 16 );
- return length;
- }
- return BigInteger.ZERO;
- }
-
- private MemoryByte createMemoryByte( byte value, byte cdiFlags, boolean changed ) {
- byte flags = 0;
- if ( (cdiFlags & ICDIMemoryBlock.VALID) != 0 ) {
- flags |= MemoryByte.HISTORY_KNOWN | MemoryByte.ENDIANESS_KNOWN;
- if ( (cdiFlags & ICDIMemoryBlock.READ_ONLY) != 0 ) {
- flags |= MemoryByte.READABLE;
- }
- else {
- flags |= MemoryByte.READABLE | MemoryByte.WRITABLE;
- }
- if ( isBigEndian() ) {
- flags |= MemoryByte.BIG_ENDIAN;
- }
- if ( changed )
- flags |= MemoryByte.CHANGED;
- }
- return new MemoryByte( value, flags );
- }
-
-
- /**
- * @see org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlock#getMemorySpaceID()
- */
- @Override
- public String getMemorySpaceID() {
- return fMemorySpaceID;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModule.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModule.java
deleted file mode 100644
index 8789fe5c727..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModule.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.ISourceRoot;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.model.ICModule;
-import org.eclipse.cdt.internal.core.model.Binary;
-import org.eclipse.cdt.internal.core.model.CModelManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * The CDI based implementation of ICModule.
- *
- * This implementation is experimental and needs to be changed when
- * the CDI level support is available.
- */
-public class CModule extends CDebugElement implements ICModule {
-
- private int fType = 0;
-
- private Binary fBinary;
-
- private ICDIObject fCDIObject;
-
- private IPath fImageName;
-
- private IPath fSymbolsFileName;
-
- public static CModule createExecutable( CDebugTarget target, IPath path ) {
- // TODO Add support for executables to CDI.
- return new CModule( EXECUTABLE, target, path );
- }
-
- public static CModule createSharedLibrary( CDebugTarget target, ICDISharedLibrary lib ) {
- return new CModule( SHARED_LIBRARY, target, lib );
- }
-
- /**
- * Constructor for CModule. Used for the program.
- */
- private CModule( int type, CDebugTarget target, IPath path ) {
- super( target );
- fType = type;
- fBinary = createBinary(path);
- fCDIObject = null;
- fImageName = path;
- fSymbolsFileName = path;
- }
-
- /**
- * Constructor for CModule. Used for shared libraries.
- */
- private CModule( int type, CDebugTarget target, ICDIObject cdiObject ) {
- super( target );
- fType = type;
- if ( cdiObject instanceof ICDISharedLibrary ) {
- ICDISharedLibrary cdiSharedLib = (ICDISharedLibrary)cdiObject;
- fBinary = createBinary(new Path(cdiSharedLib.getFileName()));
- }
- fCDIObject = cdiObject;
- fImageName = ( ( cdiObject instanceof ICDISharedLibrary ) ) ? new Path( ((ICDISharedLibrary)cdiObject).getFileName() ) : new Path( CoreModelMessages.getString( "CModule.0" ) ); //$NON-NLS-1$
- fSymbolsFileName = fImageName;
- }
-
- /**
- * We used to ask the CoreModel to create the Binary (ICElement) for us but
- * it will do so only for binary files that are in a project output
- * directory (for performance reasons). So, we do all the leg work
- * ourselves, duplicating much of the code, unfortunately.
- *
- * THE OLD WAY...
- * fCElement = CoreModel.getDefault().create(path);
- */
- private Binary createBinary(IPath path) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getFileForLocation(path);
- if (file != null && !file.exists()) {
- file = null;
- }
-
- // In case this is an external resource see if we can find
- // a file for it.
- if (file == null) {
- IFile[] files = root.findFilesForLocation(path);
- if (files.length > 0) {
- file = files[0];
- }
- }
-
- if (file != null) {
- ICProject cproject = CoreModel.getDefault().create(file.getProject());
- IPath resourcePath = file.getParent().getFullPath();
-
- try {
- ICElement cfolder = cproject.findElement(resourcePath);
-
- // Check if folder is a source root and use that instead
- ISourceRoot sourceRoot = cproject.findSourceRoot(resourcePath);
- if (sourceRoot != null)
- cfolder = sourceRoot;
-
- IBinaryFile bin = CModelManager.getDefault().createBinaryFile(file);
- if (bin != null) {
- return new Binary(cfolder, file, (IBinaryObject)bin);
- }
- } catch (CModelException e) {
- CDebugCorePlugin.log(e);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getType()
- */
- @Override
- public int getType() {
- return fType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getName()
- */
- @Override
- public String getName() {
- return fImageName.lastSegment().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getImageName()
- */
- @Override
- public IPath getImageName() {
- return fImageName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getSymbolsFileName()
- */
- @Override
- public IPath getSymbolsFileName() {
- return fSymbolsFileName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#setSymbolsFileName(org.eclipse.core.runtime.IPath)
- */
- @Override
- public void setSymbolsFileName( IPath symbolsFile ) throws DebugException {
- loadSymbolsFromFile( symbolsFile );
- fSymbolsFileName = symbolsFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getBaseAddress()
- */
- @Override
- public IAddress getBaseAddress() {
- return ( fCDIObject instanceof ICDISharedLibrary ) ? getAddressFactory().createAddress( ((ICDISharedLibrary)fCDIObject).getStartAddress() ) : getAddressFactory().getZero();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getSize()
- */
- @Override
- public long getSize() {
- long result = 0;
- if ( fCDIObject instanceof ICDISharedLibrary ) {
- BigInteger start = ((ICDISharedLibrary)fCDIObject).getStartAddress();
- BigInteger end = ((ICDISharedLibrary)fCDIObject).getEndAddress();
- if ( end.compareTo( start ) > 0 )
- result = end.subtract( start ).longValue();
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#areSymbolsLoaded()
- */
- @Override
- public boolean areSymbolsLoaded() {
- if (fCDIObject instanceof ICDISharedLibrary)
- return ((ICDISharedLibrary)fCDIObject).areSymbolsLoaded();
-
- if (fBinary != null)
- return fBinary.hasDebug();
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#canLoadSymbols()
- */
- @Override
- public boolean canLoadSymbols() {
- return ( getDebugTarget().isSuspended() && !areSymbolsLoaded() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#loadSymbols()
- */
- @Override
- public void loadSymbols() throws DebugException {
- loadSymbolsFromFile( getSymbolsFileName() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getPlatform()
- */
- @Override
- public String getPlatform() {
- return ( fBinary != null ) ? fBinary.getCPU() : CoreModelMessages.getString( "CModule.1" ); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#isLittleEndian()
- */
- @Override
- public boolean isLittleEndian() {
- return ( fBinary != null ) ? fBinary.isLittleEndian() : ((CDebugTarget)getDebugTarget()).isLittleEndian();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getAddressFactory()
- */
- @Override
- public IAddressFactory getAddressFactory() {
- return ((CDebugTarget)getDebugTarget()).getAddressFactory();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICModule#getCPU()
- */
- @Override
- public String getCPU() {
- return ( fBinary != null ) ? fBinary.getCPU() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( ICElement.class.equals( adapter ) ) {
- return getCElement();
- }
- if ( IBinary.class.equals( adapter ) && getCElement() instanceof IBinary ) {
- return getCElement();
- }
- return super.getAdapter( adapter );
- }
-
- public void dispose() {
-
- }
-
- public boolean equals( ICDIObject cdiObject ) {
- return ( fCDIObject != null ) ? fCDIObject.equals( cdiObject ) : false;
- }
-
- protected ICElement getCElement() {
- return fBinary;
- }
-
- private void loadSymbolsFromFile(IPath path) throws DebugException {
- if (fCDIObject instanceof ICDISharedLibrary) {
- if (path == null || path.isEmpty()) {
- requestFailed(CoreModelMessages.getString("CModule.2"), null); //$NON-NLS-1$
- } else {
- if (path.equals(getSymbolsFileName())) {
- try {
- ((ICDISharedLibrary) fCDIObject).loadSymbols();
- } catch (CDIException e) {
- targetRequestFailed(e.getMessage(), null);
- }
- } else {
- String message = MessageFormat.format( //
- CoreModelMessages.getString("CModule.5"), //$NON-NLS-1$
- new Object[] { path.toString() });
- targetRequestFailed(message, null);
- }
- }
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
deleted file mode 100644
index 5b85e37526c..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.ICModule;
-import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
-import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Manages the modules loaded on this debug target.
- */
-public class CModuleManager extends PlatformObject implements IModuleRetrieval {
-
- /**
- * The debug target associated with this manager.
- */
- private CDebugTarget fDebugTarget;
-
- /**
- * The collection of the shared libraries loaded on this target.
- */
- private ArrayList fModules;
-
- /**
- * Constructor for CModuleManager.
- */
- public CModuleManager( CDebugTarget target ) {
- fDebugTarget = target;
- fModules = new ArrayList( 5 );
- }
-
- @Override
- public boolean hasModules() throws DebugException {
- return !fModules.isEmpty();
- }
-
- @Override
- public ICModule[] getModules() throws DebugException {
- return (ICModule[])fModules.toArray( new ICModule[fModules.size()] );
- }
-
- @Override
- public void loadSymbolsForAllModules() throws DebugException {
- MultiStatus ms = new MultiStatus( CDIDebugModel.getPluginIdentifier(), ICDebugInternalConstants.STATUS_CODE_ERROR, CoreModelMessages.getString( "CModuleManager.0" ), null ); //$NON-NLS-1$
- Iterator it = fModules.iterator();
- while( it.hasNext() ) {
- ICModule module = (ICModule)it.next();
- try {
- module.loadSymbols();
- }
- catch( DebugException e ) {
- ms.add( new Status( IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), ICDebugInternalConstants.STATUS_CODE_ERROR, e.getMessage(), e ) );
- }
- }
- if ( !ms.isOK() ) {
- throw new DebugException( ms );
- }
- }
-
- public void loadSymbols( ICModule[] modules ) throws DebugException {
- MultiStatus ms = new MultiStatus( CDIDebugModel.getPluginIdentifier(), ICDebugInternalConstants.STATUS_CODE_ERROR, CoreModelMessages.getString( "CModuleManager.1" ), null ); //$NON-NLS-1$
- for ( int i = 0; i < modules.length; ++i ) {
- try {
- modules[i].loadSymbols();
- }
- catch( DebugException e ) {
- ms.add( new Status( IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), ICDebugInternalConstants.STATUS_CODE_ERROR, e.getMessage(), e ) );
- }
- }
- if ( !ms.isOK() ) {
- throw new DebugException( ms );
- }
- }
-
- public void dispose() {
- Iterator it = fModules.iterator();
- while( it.hasNext() ) {
- ((CModule)it.next()).dispose();
- }
- fModules.clear();
- }
-
- protected CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- protected void addModules( ICModule[] modules ) {
- fModules.addAll( Arrays.asList( modules ) );
- }
-
- protected void removeModules( ICModule[] modules ) {
- fModules.removeAll( Arrays.asList( modules ) );
- }
-
- public void sharedLibraryLoaded( ICDISharedLibrary cdiLibrary ) {
- CModule library = null;
- synchronized( fModules ) {
- if ( find( cdiLibrary ) == null ) {
- library = CModule.createSharedLibrary( getDebugTarget(), cdiLibrary );
- fModules.add( library );
- }
- }
- if ( library != null )
- library.fireCreationEvent();
- }
-
- public void sharedLibraryUnloaded( ICDISharedLibrary cdiLibrary ) {
- CModule library = null;
- synchronized( fModules ) {
- library = find( cdiLibrary );
- if ( library != null ) {
- fModules.remove( library );
- }
- }
- if ( library != null ) {
- library.dispose();
- library.fireTerminateEvent();
- }
- }
-
- public void symbolsLoaded( ICDIObject cdiObject ) {
- CModule module = find( cdiObject );
- if ( module != null ) {
- module.fireChangeEvent( DebugEvent.STATE );
- }
- }
-
- private CModule find( ICDIObject cdiObject ) {
- Iterator it = fModules.iterator();
- while( it.hasNext() ) {
- CModule module = (CModule)it.next();
- if ( module.equals( cdiObject ) )
- return module;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter.equals( ICDebugTarget.class ) )
- return getDebugTarget();
- return super.getAdapter( adapter );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegister.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegister.java
deleted file mode 100644
index 30da4afef57..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegister.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * ARM Limited - https://bugs.eclipse.org/bugs/show_bug.cgi?id=186981
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration3;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.model.CVariableFormat;
-import org.eclipse.cdt.debug.core.model.ICRegister;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.cdt.debug.core.model.IRegisterDescriptor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IRegisterGroup;
-
-/**
- * Represents a register in the CDI model.
- */
-public class CRegister extends CVariable implements ICRegister {
-
- private class InternalVariable implements IInternalVariable {
-
- /**
- * The enclosing CVariable instance.
- */
- private CVariable fVariable;
-
- /**
- * The CDI variable object this variable is based on.
- */
- private ICDIVariableDescriptor fCDIVariableObject;
-
- /**
- * The underlying CDI register.
- */
- private ICDIRegister fCDIRegister;
-
- /**
- * The type of this variable.
- */
- private CType fType;
-
- /**
- * The expression used to eveluate the value of this variable.
- */
- private String fQualifiedName;
-
- /**
- * The cache of the current value.
- */
- private ICValue fValue = CValueFactory.NULL_VALUE;
-
- /**
- * The change flag.
- */
- private boolean fChanged = false;
-
- /**
- * Constructor for InternalVariable.
- */
- InternalVariable( CVariable var, ICDIVariableDescriptor varObject ) {
- setVariable( var );
- setCDIVariableObject( varObject );
- setCDIRegister( (varObject instanceof ICDIRegister) ? (ICDIRegister)varObject : null );
- }
-
- @Override
- public IInternalVariable createShadow( int start, int length ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsArray( start, length ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- @Override
- public IInternalVariable createShadow( String type ) throws DebugException {
- IInternalVariable iv = null;
- try {
- iv = new InternalVariable( getVariable(), getCDIVariableObject().getVariableDescriptorAsType( type ) );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- return iv;
- }
-
- private synchronized ICDIRegister getCDIRegister() throws DebugException {
- if ( fCDIRegister == null ) {
- try {
- fCDIRegister = getCDITarget().createRegister( (ICDIRegisterDescriptor)getCDIVariableObject() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fCDIRegister;
- }
-
- private void setCDIRegister( ICDIRegister register ) {
- fCDIRegister = register;
- }
-
- private ICDIVariableDescriptor getCDIVariableObject() {
- if ( fCDIRegister != null ) {
- return fCDIRegister;
- }
- return fCDIVariableObject;
- }
-
- private void setCDIVariableObject( ICDIVariableDescriptor variableObject ) {
- fCDIVariableObject = variableObject;
- }
-
- @Override
- public String getQualifiedName() throws DebugException {
- if ( fQualifiedName == null ) {
- try {
- fQualifiedName = (fCDIVariableObject != null) ? fCDIVariableObject.getQualifiedName() : null;
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- return fQualifiedName;
- }
-
- @Override
- public CType getType() throws DebugException {
- if ( fType == null ) {
- ICDIVariableDescriptor varObject = getCDIVariableObject();
- if ( varObject != null ) {
- synchronized( this ) {
- if ( fType == null ) {
- try {
- fType = new CType( varObject.getType() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- }
- }
- }
- return fType;
- }
-
- private synchronized void invalidate( boolean destroy ) {
- try {
- if ( destroy && fCDIRegister != null )
- fCDIRegister.dispose();
- }
- catch( CDIException e ) {
- logError( e.getMessage() );
- }
- invalidateValue();
- setCDIRegister( null );
- if ( fType != null )
- fType.dispose();
- fType = null;
- }
-
- @Override
- public void dispose( boolean destroy ) {
- invalidate( destroy );
- }
-
- @Override
- public boolean isSameVariable( ICDIVariable cdiVar ) {
- return ( fCDIRegister != null ) ? fCDIRegister.equals( cdiVar ) : false;
- }
-
- @Override
- public int sizeof() {
- if ( getCDIVariableObject() != null ) {
- try {
- return getCDIVariableObject().sizeof();
- }
- catch( CDIException e ) {
- }
- }
- return 0;
- }
-
- @Override
- public boolean isArgument() {
- return ( getCDIVariableObject() instanceof ICDIArgumentDescriptor );
- }
-
- @Override
- public void setValue( String expression ) throws DebugException {
- ICDIRegister cdiRegister = null;
- try {
- cdiRegister = getCDIRegister();
- if ( cdiRegister != null )
- cdiRegister.setValue( expression );
- else
- requestFailed( CoreModelMessages.getString( "CModificationVariable.0" ), null ); //$NON-NLS-1$
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- @Override
- public synchronized ICValue getValue() throws DebugException {
- CStackFrame frame = getCurrentStackFrame();
- if ( frame == null || frame.isDisposed() )
- fValue = CValueFactory.NULL_VALUE;
- else if ( fValue.equals( CValueFactory.NULL_VALUE ) ) {
- ICDIRegister reg = getCDIRegister();
- if ( reg != null ) {
- try {
- ICDIValue cdiValue = reg.getValue( getCurrentStackFrame().getCDIStackFrame() );
- if ( cdiValue != null ) {
- ICDIType cdiType = cdiValue.getType();
- if ( cdiValue instanceof ICDIArrayValue && cdiType != null ) {
- ICType type = new CType( cdiType );
- if ( type.isArray() ) {
- int[] dims = type.getArrayDimensions();
- if ( dims.length > 0 && dims[0] > 0 )
- fValue = CValueFactory.createIndexedValue( getVariable(), (ICDIArrayValue)cdiValue, 0, dims[0] );
- }
- }
- else {
- fValue = CValueFactory.createValue( getVariable(), cdiValue );
- }
- }
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), e );
- }
- }
- }
- return fValue;
- }
-
- @Override
- public void invalidateValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).dispose();
- fValue = CValueFactory.NULL_VALUE;
- }
- }
-
- @Override
- public boolean isChanged() {
- return fChanged;
- }
-
- @Override
- public synchronized void setChanged( boolean changed ) {
- if ( changed ) {
- invalidateValue();
- }
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).setChanged( changed );
- }
- fChanged = changed;
- }
-
- @Override
- public synchronized void preserve() {
- setChanged( false );
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).preserve();
- }
- }
-
- CVariable getVariable() {
- return fVariable;
- }
-
- private void setVariable( CVariable variable ) {
- fVariable = variable;
- }
-
- @Override
- public void resetValue() {
- if ( fValue instanceof AbstractCValue ) {
- ((AbstractCValue)fValue).reset();
- }
- }
-
- @Override
- public boolean isEditable() throws DebugException {
- ICDIRegister reg = getCDIRegister();
- if ( reg != null && reg.getTarget().getConfiguration().supportsRegisterModification() ) {
- try {
- return reg.isEditable();
- }
- catch( CDIException e ) {
- }
- }
- return false;
- }
- /**
- * Compares the underlying variable objects.
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( obj instanceof InternalVariable ) {
- return getCDIVariableObject().equals( ((InternalVariable)obj).getCDIVariableObject() );
- }
- return false;
- }
-
- @Override
- public boolean isSameDescriptor( ICDIVariableDescriptor desc ) {
- return getCDIVariableObject().equals( desc );
- }
-
- @Override
- public ICDIObject getCdiObject() {
- return fCDIRegister;
- }
- }
-
- /**
- * Constructor for CRegister.
- */
- protected CRegister( CRegisterGroup parent, IRegisterDescriptor descriptor ) {
- super( parent, ((CRegisterDescriptor)descriptor).getCDIDescriptor() );
- setFormat( CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
- setInitialFormat();
- }
-
- /**
- * Constructor for CRegister.
- */
- protected CRegister( CRegisterGroup parent, IRegisterDescriptor descriptor, String message ) {
- super( parent, ((CRegisterDescriptor)descriptor).getCDIDescriptor(), message );
- setFormat( CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
- setInitialFormat();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IRegister#getRegisterGroup()
- */
- @Override
- public IRegisterGroup getRegisterGroup() throws DebugException {
- return (IRegisterGroup)getParent();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.CVariable#isBookkeepingEnabled()
- */
- @Override
- protected boolean isBookkeepingEnabled() {
- boolean result = false;
- try {
- result = getLaunch().getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false );
- }
- catch( CoreException e ) {
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#canEnableDisable()
- */
- @Override
- public boolean canEnableDisable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- if (source != null) {
- ICDITarget cdiTarget = source.getTarget();
- if ( event instanceof ICDIResumedEvent ) {
- if ( getCDITarget().equals( cdiTarget ) ) {
- setChanged( false );
- }
- }
- else if ( event instanceof ICDIMemoryChangedEvent &&
- cdiTarget.getConfiguration() instanceof ICDITargetConfiguration3 &&
- ((ICDITargetConfiguration3)cdiTarget.getConfiguration()).needsRegistersUpdated(event)) {
- resetValue();
- return; // avoid similar but logic inappropriate for us in CVariable
- }
- }
- }
- super.handleDebugEvents( events );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
- */
- @Override
- public void dispose() {
- internalDispose( true );
- setDisposed( true );
- }
-
- @Override
- protected ICStackFrame getStackFrame() {
- ICStackFrame frame = super.getStackFrame();
- if (frame == null)
- frame = getCurrentStackFrame();
- return frame;
- }
-
- protected CStackFrame getCurrentStackFrame() {
- return ((CDebugTarget)getDebugTarget()).getRegisterManager().getCurrentFrame();
- }
-
- @Override
- protected void createOriginal( ICDIVariableDescriptor vo ) {
- if ( vo != null ) {
- setName( vo.getName() );
- setOriginal( new InternalVariable( this, vo ) );
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterDescriptor.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterDescriptor.java
deleted file mode 100644
index 997ed79cffa..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterDescriptor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.core.model.IRegisterDescriptor;
-
-/**
- * A register descriptor. Temporary, need to change the related CDI interfaces.
- */
-public class CRegisterDescriptor implements IRegisterDescriptor {
-
- private String fName;
- private String fGroupName;
- private ICDIRegisterDescriptor fCDIDescriptor = null;
-
- /**
- * Constructor for CRegisterDescriptor.
- */
- public CRegisterDescriptor( String name, String groupName ) {
- fName = name;
- fGroupName = groupName;
- }
-
- /**
- * Constructor for CRegisterDescriptor.
- */
- public CRegisterDescriptor( ICDIRegisterGroup group, ICDIRegisterDescriptor desc ) {
- fName = desc.getName();
- fGroupName = group.getName();
- fCDIDescriptor = desc;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRegisterDescriptor#getName()
- */
- @Override
- public String getName() {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRegisterDescriptor#getGroupName()
- */
- @Override
- public String getGroupName() {
- return fGroupName;
- }
-
- public ICDIRegisterDescriptor getCDIDescriptor() {
- return fCDIDescriptor;
- }
-
- public void setCDIDescriptor( ICDIRegisterDescriptor descriptor ) {
- fCDIDescriptor = descriptor;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
deleted file mode 100644
index 50a22a1971f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.util.ArrayList;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
-import org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup;
-import org.eclipse.cdt.debug.core.model.IRegisterDescriptor;
-import org.eclipse.cdt.debug.internal.core.CRegisterManager;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IRegister;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Represents a group of registers.
- */
-public class CRegisterGroup extends CDebugElement implements IPersistableRegisterGroup, IEnableDisableTarget {
-
- private static final String ELEMENT_REGISTER_GROUP = "registerGroup"; //$NON-NLS-1$
- private static final String ATTR_REGISTER_GROUP_NAME = "name"; //$NON-NLS-1$
- private static final String ATTR_REGISTER_GROUP_ENABLED = "enabled"; //$NON-NLS-1$
-
- private static final String ELEMENT_REGISTER = "register"; //$NON-NLS-1$
- private static final String ATTR_REGISTER_NAME = "name"; //$NON-NLS-1$
- private static final String ATTR_REGISTER_ORIGINAL_GROUP_NAME = "originalGroupName"; //$NON-NLS-1$
-
- private String fName;
-
- private IRegisterDescriptor[] fRegisterDescriptors;
-
- private IRegister[] fRegisters;
-
- private boolean fIsEnabled = true;
-
- private boolean fDisposed = false;
-
- /**
- * Constructor for CRegisterGroup.
- */
- public CRegisterGroup( CDebugTarget target ) {
- super( target );
- }
-
- /**
- * Constructor for CRegisterGroup.
- */
- public CRegisterGroup( CDebugTarget target, String name, IRegisterDescriptor[] descriptors ) {
- super( target );
- fName = name;
- fRegisterDescriptors = descriptors;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IRegisterGroup#getName()
- */
- @Override
- public String getName() throws DebugException {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IRegisterGroup#getRegisters()
- */
- @Override
- public IRegister[] getRegisters() throws DebugException {
- if ( fDisposed )
- return new IRegister[0];
- if ( fRegisters == null ) {
- synchronized( this ) {
- if ( fRegisters == null ) {
- fRegisters = new IRegister[fRegisterDescriptors.length];
- for( int i = 0; i < fRegisters.length; ++i ) {
- fRegisters[i] = new CRegister( this, fRegisterDescriptors[i] );
- }
- }
- }
- }
- return fRegisters;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IRegisterGroup#hasRegisters()
- */
- @Override
- public boolean hasRegisters() throws DebugException {
- return ( fRegisterDescriptors.length > 0 );
- }
-
- public void dispose() {
- fDisposed = true;
- invalidate();
- }
-
- public void targetSuspended() {
- if ( fRegisters == null ) {
- return;
- }
- for ( int i = 0; i < fRegisters.length; ++i ) {
- if ( fRegisters[i] != null && ((CRegister)fRegisters[i]).hasErrors() ) {
- ((CRegister)fRegisters[i]).resetStatus();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( IEnableDisableTarget.class.equals( adapter ) )
- return this;
- return super.getAdapter( adapter );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IEnableDisableTarget#canEnableDisable()
- */
- @Override
- public boolean canEnableDisable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IEnableDisableTarget#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return fIsEnabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IEnableDisableTarget#setEnabled(boolean)
- */
- @Override
- public void setEnabled( boolean enabled ) throws DebugException {
- if ( fRegisters != null ) {
- synchronized( fRegisters ) {
- if ( fRegisters != null ) {
- for ( int i = 0; i < fRegisters.length; ++i ) {
- if ( fRegisters[i] instanceof CRegister ) {
- ((CRegister)fRegisters[i]).setEnabled( enabled );
- }
- }
- }
- }
- }
- fIsEnabled = enabled;
- fireChangeEvent( DebugEvent.CONTENT );
- }
-
- @Override
- public String getMemento() throws CoreException {
- Document document = DebugPlugin.newDocument();
- Element element = document.createElement( ELEMENT_REGISTER_GROUP );
- element.setAttribute( ATTR_REGISTER_GROUP_NAME, getName() );
- element.setAttribute( ATTR_REGISTER_GROUP_ENABLED, Boolean.valueOf( isEnabled() ).toString() );
- for ( int i = 0; i < fRegisterDescriptors.length; ++i ) {
- Element child = document.createElement( ELEMENT_REGISTER );
- child.setAttribute( ATTR_REGISTER_NAME, fRegisterDescriptors[i].getName() );
- child.setAttribute( ATTR_REGISTER_ORIGINAL_GROUP_NAME, fRegisterDescriptors[i].getGroupName() );
- element.appendChild( child );
- }
- document.appendChild( element );
- return DebugPlugin.serializeDocument( document );
- }
-
- @Override
- public void initializeFromMemento( String memento ) throws CoreException {
- Node node = DebugPlugin.parseDocument( memento );
- if ( node.getNodeType() != Node.ELEMENT_NODE ) {
- abort( CoreModelMessages.getString( "CRegisterGroup.0" ), null ); //$NON-NLS-1$
- }
- Element element = (Element)node;
- if ( !ELEMENT_REGISTER_GROUP.equals( element.getNodeName() ) ) {
- abort( CoreModelMessages.getString( "CRegisterGroup.1" ), null ); //$NON-NLS-1$
- }
- String groupName = element.getAttribute( ATTR_REGISTER_GROUP_NAME );
- if ( groupName == null || groupName.length() == 0 ) {
- abort( CoreModelMessages.getString( "CRegisterGroup.2" ), null ); //$NON-NLS-1$
- }
- String e = element.getAttribute( ATTR_REGISTER_GROUP_ENABLED );
- boolean enabled = Boolean.valueOf( e ).booleanValue();
- CRegisterManager rm = getRegisterManager();
- ArrayList list = new ArrayList();
- Node childNode = element.getFirstChild();
- while( childNode != null ) {
- if ( childNode.getNodeType() == Node.ELEMENT_NODE ) {
- Element child = (Element)childNode;
- if ( ELEMENT_REGISTER.equals( child.getNodeName() ) ) {
- String name = child.getAttribute( ATTR_REGISTER_NAME );
- String originalGroupName = child.getAttribute( ATTR_REGISTER_ORIGINAL_GROUP_NAME );
- if ( name == null || name.length() == 0 || originalGroupName == null || originalGroupName.length() == 0 ) {
- abort( CoreModelMessages.getString( "CRegisterGroup.3" ), null ); //$NON-NLS-1$
- }
- else {
- IRegisterDescriptor d = rm.findDescriptor( originalGroupName, name );
- if ( d != null )
- list.add( d );
- else
- CDebugCorePlugin.log( CoreModelMessages.getString( "CRegisterGroup.4" ) ); //$NON-NLS-1$
- }
- }
- }
- childNode = childNode.getNextSibling();
- }
- setName( groupName );
- fRegisterDescriptors = (IRegisterDescriptor[])list.toArray( new IRegisterDescriptor[list.size()] );
- setEnabled( enabled );
- }
-
- private void abort( String message, Throwable exception ) throws CoreException {
- IStatus status = new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), CDebugCorePlugin.INTERNAL_ERROR, message, exception );
- throw new CoreException( status );
- }
-
- private void setName( String name ) {
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup#setRegisterDescriptors(org.eclipse.cdt.debug.core.model.IRegisterDescriptor[])
- */
- @Override
- public void setRegisterDescriptors( IRegisterDescriptor[] registerDescriptors ) {
- invalidate();
- fRegisterDescriptors = registerDescriptors;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IPersistableRegisterGroup#getRegisterDescriptors()
- */
- @Override
- public IRegisterDescriptor[] getRegisterDescriptors() {
- return fRegisterDescriptors;
- }
-
- private CRegisterManager getRegisterManager() {
- return getDebugTarget().getAdapter( CRegisterManager.class );
- }
-
- private void invalidate() {
- if ( fRegisters == null ) {
- return;
- }
- for ( int i = 0; i < fRegisters.length; ++i ) {
- if ( fRegisters[i] != null ) {
- ((CRegister)fRegisters[i]).dispose();
- }
- }
- fRegisters = null;
- }
-
- public void resetRegisterValues() {
- if ( fRegisters == null ) {
- return;
- }
- for ( int i = 0; i < fRegisters.length; ++i ) {
- if ( fRegisters[i] != null ) {
- ((CRegister)fRegisters[i]).invalidateValue();
- }
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java
deleted file mode 100644
index 8732a75a1d6..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.model.ICSignal;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Enter type comment.
- *
- * @since: Jan 31, 2003
- */
-public class CSignal extends CDebugElement implements ICSignal, ICDIEventListener
-{
- private ICDISignal fCDISignal;
-
- /**
- * Constructor for CSignal.
- * @param target
- */
- public CSignal( CDebugTarget target, ICDISignal cdiSignal )
- {
- super( target );
- fCDISignal = cdiSignal;
- getCDISession().getEventManager().addEventListener( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#getDescription()
- */
- @Override
- public String getDescription() throws DebugException
- {
- return getCDISignal().getDescription();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#getName()
- */
- @Override
- public String getName() throws DebugException
- {
- return getCDISignal().getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#isPassEnabled()
- */
- @Override
- public boolean isPassEnabled() throws DebugException
- {
- return !getCDISignal().isIgnore();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#isStopEnabled()
- */
- @Override
- public boolean isStopEnabled() throws DebugException
- {
- return getCDISignal().isStopSet();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#setPassEnabled(boolean)
- */
- @Override
- public void setPassEnabled( boolean enable ) throws DebugException
- {
- handle( enable, isStopEnabled() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#setStopEnabled(boolean)
- */
- @Override
- public void setStopEnabled( boolean enable ) throws DebugException
- {
- handle( isPassEnabled(), enable );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events )
- {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#dispose()
- */
- public void dispose()
- {
- getCDISession().getEventManager().removeEventListener( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICSignal#signal()
- */
- @Override
- public void signal() throws DebugException
- {
- try
- {
- getCDITarget().resume( getCDISignal() );
- }
- catch( CDIException e )
- {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- protected ICDISignal getCDISignal()
- {
- return fCDISignal;
- }
-
- private void handle( boolean pass, boolean stop ) throws DebugException
- {
- try
- {
- getCDISignal().handle( !pass, stop );
- }
- catch( CDIException e )
- {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- @Override
- public boolean canModify() {
- // TODO add canModify method to ICDISignal
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
deleted file mode 100644
index ea38ed259fa..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
+++ /dev/null
@@ -1,1049 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import com.ibm.icu.text.MessageFormat;
-import com.ibm.icu.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIDisposable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteMoveInstructionPointer;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.IMoveToAddress;
-import org.eclipse.cdt.debug.core.model.IMoveToLine;
-import org.eclipse.cdt.debug.core.model.IRestart;
-import org.eclipse.cdt.debug.core.model.IResumeAtAddress;
-import org.eclipse.cdt.debug.core.model.IResumeAtLine;
-import org.eclipse.cdt.debug.core.model.IResumeWithoutSignal;
-import org.eclipse.cdt.debug.core.model.IRunToAddress;
-import org.eclipse.cdt.debug.core.model.IRunToLine;
-import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
-import org.eclipse.cdt.debug.internal.core.CGlobalVariableManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * Proxy to a stack frame on the target.
- */
-public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart, IResumeWithoutSignal, IMoveToAddress, IMoveToLine, ICDIEventListener {
-
- /**
- * Underlying CDI stack frame.
- */
- private ICDIStackFrame fCDIStackFrame;
-
- /**
- * The last (previous) CDI stack frame.
- */
- private ICDIStackFrame fLastCDIStackFrame;
-
- /**
- * Containing thread.
- */
- private CThread fThread;
-
- /**
- * List of visible variable (includes arguments).
- */
- private List fVariables;
-
- /**
- * Whether the variables need refreshing
- */
- private boolean fRefreshVariables = true;
-
- /**
- * List of watch expressions evaluating in the context of this frame.
- */
- private List fExpressions;
-
- /**
- * Need this flag to prevent evaluations on disposed frames.
- */
- private boolean fIsDisposed = false;
-
- /**
- * Constructor for CStackFrame.
- */
- public CStackFrame( CThread thread, ICDIStackFrame cdiFrame ) {
- super( (CDebugTarget)thread.getDebugTarget() );
- setCDIStackFrame( cdiFrame );
- setThread( thread );
- getCDISession().getEventManager().addEventListener( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getThread()
- */
- @Override
- public IThread getThread() {
- return fThread;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
- */
- @Override
- public IVariable[] getVariables() throws DebugException {
- if ( isDisposed() ) {
- return new IVariable[0];
- }
- ICGlobalVariable[] globals = getGlobals();
- List vars = getVariables0();
- List all = new ArrayList( globals.length + vars.size() );
- all.addAll( Arrays.asList( globals ) );
- all.addAll( vars );
- return (IVariable[])all.toArray( new IVariable[all.size()] );
- }
-
- protected synchronized List getVariables0() throws DebugException {
- if ( isDisposed() ) {
- return Collections.EMPTY_LIST;
- }
- CThread thread = (CThread)getThread();
- if ( thread.isSuspended() ) {
- if ( fVariables == null ) {
- List vars = getAllCDIVariableObjects();
- fVariables = new ArrayList( vars.size() );
- Iterator it = vars.iterator();
- while( it.hasNext() ) {
- fVariables.add( CVariableFactory.createLocalVariable( this, (ICDIVariableDescriptor)it.next() ) );
- }
- }
- else if ( refreshVariables() ) {
- updateVariables();
- }
- setRefreshVariables( false );
- }
- return ( fVariables != null ) ? fVariables : Collections.EMPTY_LIST;
- }
-
- /**
- * Incrementally updates this stack frame's variables.
- */
- protected void updateVariables() throws DebugException {
- List locals = getAllCDIVariableObjects();
- Iterator it = fVariables.iterator();
- while (it.hasNext()) {
- CVariable var = it.next();
- ICDIVariableDescriptor varObject = findVariable(locals, var);
- if (varObject != null && !var.isDisposed())
- locals.remove(varObject);
- else {
- // ensure variable is unregistered from event listener
- var.dispose();
- it.remove();
- }
- }
- // add any new locals
- Iterator newOnes = locals.iterator();
- while( newOnes.hasNext() ) {
- fVariables.add( CVariableFactory.createLocalVariable( this, (ICDIVariableDescriptor)newOnes.next() ) );
- }
- }
-
- /**
- * Sets the containing thread.
- *
- * @param thread the containing thread
- */
- protected void setThread( CThread thread ) {
- fThread = thread;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
- */
- @Override
- public boolean hasVariables() throws DebugException {
- return ( isDisposed() ) ? false : (getVariables0().size() > 0 || getGlobals().length > 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
- */
- @Override
- public int getLineNumber() throws DebugException {
- if ( isSuspended() ) {
- ISourceLocator locator = ((CDebugTarget)getDebugTarget()).getSourceLocator();
- if ( locator != null && locator instanceof IAdaptable && ((IAdaptable)locator).getAdapter( ICSourceLocator.class ) != null )
- return ((IAdaptable)locator).getAdapter( ICSourceLocator.class ).getLineNumber( this );
-
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if ( cdiFrame != null && cdiFrame.getLocator() != null )
- return cdiFrame.getLocator().getLineNumber();
- }
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
- */
- @Override
- public int getCharStart() throws DebugException {
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
- */
- @Override
- public int getCharEnd() throws DebugException {
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getName()
- */
- @Override
- public String getName() throws DebugException {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if (cdiFrame == null) {
- return ""; //$NON-NLS-1$
- }
-
- ICDILocator locator = cdiFrame.getLocator();
- String func = ""; //$NON-NLS-1$
- String file = ""; //$NON-NLS-1$
- String line = ""; //$NON-NLS-1$
- if ( locator.getFunction() != null && locator.getFunction().trim().length() > 0 )
- func += locator.getFunction() + "() "; //$NON-NLS-1$
- if ( locator.getFile() != null && locator.getFile().trim().length() > 0 ) {
- file = locator.getFile();
- if ( locator.getLineNumber() != 0 ) {
- line = NumberFormat.getInstance().format( new Integer( locator.getLineNumber() ) );
- }
- }
- else {
- return func;
- }
- return MessageFormat.format( CoreModelMessages.getString( "CStackFrame.0" ), new String[]{ func, file, line } ); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
- */
- @Override
- public IRegisterGroup[] getRegisterGroups() throws DebugException {
- return ( isDisposed() ) ? new IRegisterGroup[0] : ((CDebugTarget)getDebugTarget()).getRegisterGroups( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
- */
- @Override
- public boolean hasRegisterGroups() throws DebugException {
- return ( isDisposed() ) ? false : ((CDebugTarget)getDebugTarget()).getRegisterGroups( this ).length > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepInto()
- */
- @Override
- public boolean canStepInto() {
- try {
- return exists() /*&& isTopStackFrame()*/ && getThread().canStepInto();
- }
- catch( DebugException e ) {
- logError( e );
- return false;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepOver()
- */
- @Override
- public boolean canStepOver() {
- try {
- return exists() && getThread().canStepOver();
- }
- catch( DebugException e ) {
- logError( e );
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepReturn()
- */
- @Override
- public boolean canStepReturn() {
- try {
- if ( !exists() ) {
- return false;
- }
- List frames = ((CThread)getThread()).computeStackFrames();
- if ( frames != null && !frames.isEmpty() ) {
- boolean bottomFrame = this.equals( frames.get( frames.size() - 1 ) );
- return !bottomFrame && getThread().canStepReturn();
- }
- }
- catch( DebugException e ) {
- logError( e );
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#isStepping()
- */
- @Override
- public boolean isStepping() {
- return getThread().isStepping();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepInto()
- */
- @Override
- public void stepInto() throws DebugException {
- if ( canStepInto() ) {
- getThread().stepInto();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepOver()
- */
- @Override
- public void stepOver() throws DebugException {
- if ( canStepOver() ) {
- getThread().stepOver();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepReturn()
- */
- @Override
- public void stepReturn() throws DebugException {
- if ( canStepReturn() ) {
- getThread().stepReturn();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- @Override
- public boolean canResume() {
- return getThread().canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- @Override
- public boolean canSuspend() {
- return getThread().canSuspend();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return getThread().isSuspended();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- @Override
- public void resume() throws DebugException {
- getThread().resume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- @Override
- public void suspend() throws DebugException {
- getThread().suspend();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- @Override
- public boolean canTerminate() {
- boolean exists = false;
- try {
- exists = exists();
- }
- catch( DebugException e ) {
- logError( e );
- }
- return exists && getThread().canTerminate() || getDebugTarget().canTerminate();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- @Override
- public boolean isTerminated() {
- return getThread().isTerminated();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- @Override
- public void terminate() throws DebugException {
- if ( getThread().canTerminate() ) {
- getThread().terminate();
- }
- else {
- getDebugTarget().terminate();
- }
- }
-
- /**
- * Returns the underlying CDI stack frame that this model object is a proxy to.
- *
- * @return the underlying CDI stack frame
- */
- protected ICDIStackFrame getCDIStackFrame() {
- return fCDIStackFrame;
- }
-
- /**
- * Sets the underlying CDI stack frame. Called by a thread when incrementally updating after a step has completed.
- *
- * @param frame the underlying stack frame
- */
- protected void setCDIStackFrame( ICDIStackFrame frame ) {
- if ( frame != null ) {
- fLastCDIStackFrame = frame;
- }
- else {
- fLastCDIStackFrame = fCDIStackFrame;
- }
- fCDIStackFrame = frame;
- setRefreshVariables( true );
- }
-
- /**
- * The underlying stack frame that existed before the current underlying stack frame. Used only so that equality can be checked on stack frame after the new
- * one has been set.
- */
- protected ICDIStackFrame getLastCDIStackFrame() {
- return fLastCDIStackFrame;
- }
-
- /**
- * Helper method for computeStackFrames(). For the purposes of detecting if an underlying stack frame needs to be disposed, stack frames are equal if the
- * frames are equal and the locations are equal.
- */
- protected static boolean equalFrame( ICDIStackFrame frameOne, ICDIStackFrame frameTwo ) {
- if ( frameOne == null || frameTwo == null )
- return false;
- ICDILocator loc1 = frameOne.getLocator();
- ICDILocator loc2 = frameTwo.getLocator();
- if ( loc1 == null || loc2 == null )
- return false;
- if ( loc1.getFile() != null && loc1.getFile().length() > 0 && loc2.getFile() != null && loc2.getFile().length() > 0 && loc1.getFile().equals( loc2.getFile() ) ) {
- if ( loc1.getFunction() != null && loc1.getFunction().length() > 0 && loc2.getFunction() != null && loc2.getFunction().length() > 0 && loc1.getFunction().equals( loc2.getFunction() ) )
- return true;
- }
- if ( (loc1.getFile() == null || loc1.getFile().length() < 1) && (loc2.getFile() == null || loc2.getFile().length() < 1) ) {
- if ( loc1.getFunction() != null && loc1.getFunction().length() > 0 && loc2.getFunction() != null && loc2.getFunction().length() > 0 && loc1.getFunction().equals( loc2.getFunction() ) )
- return true;
- }
- if ( (loc1.getFile() == null || loc1.getFile().length() < 1) && (loc2.getFile() == null || loc2.getFile().length() < 1) && (loc1.getFunction() == null || loc1.getFunction().length() < 1) && (loc2.getFunction() == null || loc2.getFunction().length() < 1) ) {
- if ( loc1.getAddress() == loc2.getAddress() )
- return true;
- }
- return false;
- }
-
- protected boolean exists() throws DebugException {
- return ((CThread)getThread()).computeStackFrames().indexOf( this ) != -1;
- }
-
- /**
- * @see IAdaptable#getAdapter(Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter == IRunToLine.class ) {
- return this;
- }
- if ( adapter == IRunToAddress.class ) {
- return this;
- }
- if ( adapter == IResumeAtLine.class ) {
- return this;
- }
- if ( adapter == IResumeAtAddress.class ) {
- return this;
- }
- if ( adapter == IMoveToLine.class ) {
- return this;
- }
- if ( adapter == IMoveToAddress.class ) {
- return this;
- }
- if ( adapter == CStackFrame.class ) {
- return this;
- }
- if ( adapter == ICStackFrame.class ) {
- return this;
- }
- if ( adapter == IStackFrame.class ) {
- return this;
- }
- if ( adapter == ICDIStackFrame.class ) {
- return getCDIStackFrame();
- }
- if ( adapter == IMemoryBlockRetrieval.class ) {
- return getDebugTarget().getAdapter( adapter );
- }
- return super.getAdapter( adapter );
- }
-
- protected void dispose() {
- setDisposed( true );
- getCDISession().getEventManager().removeEventListener( this );
- disposeAllVariables();
- disposeExpressions();
-
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- setCDIStackFrame(null);
- if (cdiFrame instanceof ICDIDisposable) {
- ((ICDIDisposable)cdiFrame).dispose();
- }
- }
-
- /**
- * Retrieves local variables in this stack frame. Returns an empty list if there are no local variables.
- *
- */
- protected List getCDILocalVariableObjects() throws DebugException {
- List list = new ArrayList();
- try {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if (cdiFrame != null) {
- list.addAll( Arrays.asList( cdiFrame.getLocalVariableDescriptors( ) ) );
- }
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- return list;
- }
-
- /**
- * Retrieves arguments in this stack frame. Returns an empty list if there are no arguments.
- *
- */
- protected List getCDIArgumentObjects() throws DebugException {
- List list = new ArrayList();
- try {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if (cdiFrame != null) {
- list.addAll( Arrays.asList( cdiFrame.getArgumentDescriptors() ) );
- }
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- return list;
- }
-
- protected List getAllCDIVariableObjects() throws DebugException {
- List list = new ArrayList();
- list.addAll( getCDIArgumentObjects() );
- list.addAll( getCDILocalVariableObjects() );
- return list;
- }
-
- protected boolean isTopStackFrame() throws DebugException {
- IStackFrame tos = getThread().getTopStackFrame();
- return tos != null && tos.equals( this );
- }
-
- protected void disposeAllVariables() {
- if ( fVariables == null )
- return;
- Iterator it = fVariables.iterator();
- while( it.hasNext() ) {
- ((CVariable)it.next()).dispose();
- }
- fVariables.clear();
- fVariables = null;
- }
-
- protected void disposeExpressions() {
- if ( fExpressions != null ) {
- Iterator it = fExpressions.iterator();
- while( it.hasNext() ) {
- ((CExpression)it.next()).dispose();
- }
- fExpressions.clear();
- }
- fExpressions = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#getAddress()
- */
- @Override
- public IAddress getAddress() {
- IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- return cdiFrame != null ? factory.createAddress( cdiFrame.getLocator().getAddress() ) : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#getFile()
- */
- @Override
- public String getFile() {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- return cdiFrame != null ? cdiFrame.getLocator().getFile() : ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#getFunction()
- */
- @Override
- public String getFunction() {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- return cdiFrame != null ? cdiFrame.getLocator().getFunction() : ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#getLevel()
- */
- @Override
- public int getLevel() {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- return cdiFrame != null ? cdiFrame.getLevel() : -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#getFrameLineNumber()
- */
- @Override
- public int getFrameLineNumber() {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- return cdiFrame != null ? cdiFrame.getLocator().getLineNumber() : -1;
- }
-
- protected synchronized void preserve() {
- preserveVariables();
- preserveExpressions();
- }
-
- private void preserveVariables() {
- if ( fVariables == null )
- return;
- Iterator it = fVariables.iterator();
- while( it.hasNext() ) {
- AbstractCVariable av = (AbstractCVariable)it.next();
- av.preserve();
- }
- }
-
- private void preserveExpressions() {
- if ( fExpressions == null )
- return;
- Iterator it = fExpressions.iterator();
- while( it.hasNext() ) {
- CExpression exp = (CExpression)it.next();
- exp.preserve();
- }
- }
-
- protected ICDIVariableDescriptor findVariable( List list, CVariable var ) {
- Iterator it = list.iterator();
- while( it.hasNext() ) {
- ICDIVariableDescriptor newVarObject = (ICDIVariableDescriptor)it.next();
- if ( var.sameVariable( newVarObject ) )
- return newVarObject;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#canRestart()
- */
- @Override
- public boolean canRestart() {
- return getDebugTarget() instanceof IRestart && ((IRestart)getDebugTarget()).canRestart();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#restart()
- */
- @Override
- public void restart() throws DebugException {
- if ( canRestart() ) {
- ((IRestart)getDebugTarget()).restart();
- }
- }
-
- public void setRefreshVariables( boolean refresh ) {
- fRefreshVariables = refresh;
- }
-
- private boolean refreshVariables() {
- return fRefreshVariables;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
- */
- @Override
- public boolean canResumeWithoutSignal() {
- return (getDebugTarget() instanceof IResumeWithoutSignal && ((IResumeWithoutSignal)getDebugTarget()).canResumeWithoutSignal());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#resumeWithoutSignal()
- */
- @Override
- public void resumeWithoutSignal() throws DebugException {
- if ( canResumeWithoutSignal() ) {
- ((IResumeWithoutSignal)getDebugTarget()).resumeWithoutSignal();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#evaluateExpression(java.lang.String)
- */
- @Override
- public IValue evaluateExpression( String expressionText ) throws DebugException {
- if ( !isDisposed() ) {
- CExpression expression = getExpression( expressionText );
- if ( expression != null ) {
- return expression.getValue( this );
- }
- }
- return null;
- }
-
- private ICGlobalVariable[] getGlobals() {
- CGlobalVariableManager gvm = ((CDebugTarget)getDebugTarget()).getGlobalVariableManager();
- if ( gvm != null ) {
- return gvm.getGlobals();
- }
- return new ICGlobalVariable[0];
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- try {
- return getName();
- }
- catch( DebugException e ) {
- return e.getLocalizedMessage();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#evaluateExpressionToString(java.lang.String)
- */
- @Override
- public String evaluateExpressionToString( String expression ) throws DebugException {
- try {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if (cdiFrame != null) {
- return getCDITarget().evaluateExpressionToString( cdiFrame, expression );
- }
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICStackFrame#canEvaluate()
- */
- @Override
- public boolean canEvaluate() {
- CDebugTarget target = ((CDebugTarget)getDebugTarget());
- return target.supportsExpressionEvaluation() && isSuspended();
- }
-
- protected void doStepReturn() throws DebugException {
- try {
- final ICDIStackFrame cdiFrame = getCDIStackFrame();
- if (cdiFrame != null) {
- cdiFrame.stepReturn();
- }
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- private synchronized CExpression getExpression( String expressionText ) throws DebugException {
- if ( isDisposed() ) {
- return null;
- }
- if ( fExpressions == null ) {
- fExpressions = new ArrayList( 5 );
- }
- CExpression expression = null;
- Iterator it = fExpressions.iterator();
- while( it.hasNext() ) {
- expression = (CExpression)it.next();
- if ( expression.getExpressionText().compareTo( expressionText ) == 0 ) {
- return expression;
- }
- }
- try {
- ICDIExpression cdiExpression = ((CDebugTarget)getDebugTarget()).getCDITarget().createExpression( expressionText );
- expression = new CExpression( this, cdiExpression, null );
- fExpressions.add( expression );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- return expression;
- }
-
- protected boolean isDisposed() {
- return fIsDisposed;
- }
-
- private synchronized void setDisposed( boolean isDisposed ) {
- fIsDisposed = isDisposed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#canRunToLine(org.eclipse.core.resources.IFile, int)
- */
- @Override
- public boolean canRunToLine( IFile file, int lineNumber ) {
- return ((CThread)getThread()).canRunToLine( file, lineNumber );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#runToLine(org.eclipse.core.resources.IFile, int, boolean)
- */
- @Override
- public void runToLine( IFile file, int lineNumber, boolean skipBreakpoints ) throws DebugException {
- if ( !canRunToLine( file, lineNumber ) )
- return;
- ((CThread)getThread()).runToLine( file, lineNumber, skipBreakpoints );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#canRunToLine(java.lang.String, int)
- */
- @Override
- public boolean canRunToLine( String fileName, int lineNumber ) {
- return ((CThread)getThread()).canRunToLine( fileName, lineNumber );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#runToLine(java.lang.String, int, boolean)
- */
- @Override
- public void runToLine( String fileName, int lineNumber, boolean skipBreakpoints ) throws DebugException {
- if ( !canRunToLine( fileName, lineNumber ) )
- return;
- ((CThread)getThread()).runToLine( fileName, lineNumber, skipBreakpoints );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToAddress#canRunToAddress(org.eclipse.cdt.core.IAddress)
- */
- @Override
- public boolean canRunToAddress( IAddress address ) {
- return getThread().canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToAddress#runToAddress(org.eclipse.cdt.core.IAddress, boolean)
- */
- @Override
- public void runToAddress( IAddress address, boolean skipBreakpoints ) throws DebugException {
- if ( !canRunToAddress( address ) )
- return;
- if ( skipBreakpoints ) {
- ((CDebugTarget)getDebugTarget()).skipBreakpoints( true );
- }
- ICDILocation location = getCDITarget().createAddressLocation( new BigInteger( address.toString() ) );
- try {
- getCDIThread().stepUntil( location );
- }
- catch( CDIException e ) {
- if ( skipBreakpoints ) {
- ((CDebugTarget)getDebugTarget()).skipBreakpoints( false );
- }
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtLine#canResumeAtLine(org.eclipse.core.resources.IFile, int)
- */
- @Override
- public boolean canResumeAtLine( IFile file, int lineNumber ) {
- return getThread().canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtLine#resumeAtLine(org.eclipse.core.resources.IFile, int)
- */
- @Override
- public void resumeAtLine( IFile file, int lineNumber ) throws DebugException {
- if ( !canResumeAtLine( file, lineNumber ) )
- return;
- resumeAtLine( file.getLocation().lastSegment(), lineNumber );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtLine#canResumeAtLine(java.lang.String, int)
- */
- @Override
- public boolean canResumeAtLine( String fileName, int lineNumber ) {
- return getThread().canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtLine#resumeAtLine(java.lang.String, int)
- */
- @Override
- public void resumeAtLine( String fileName, int lineNumber ) throws DebugException {
- if ( !canResumeAtLine( fileName, lineNumber ) )
- return;
-
- ICDILocation location = getCDITarget().createLineLocation( fileName, lineNumber );
- try {
- ICDIExecuteResume resumer = getCDIThread();
- resumer.resume(location);
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtAddress#canResumeAtAddress(org.eclipse.cdt.core.IAddress)
- */
- @Override
- public boolean canResumeAtAddress( IAddress address ) {
- return getThread().canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeAtAddress#resumeAtAddress(org.eclipse.cdt.core.IAddress)
- */
- @Override
- public void resumeAtAddress( IAddress address ) throws DebugException {
- if ( !canResumeAtAddress( address ) )
- return;
- ICDILocation location = getCDITarget().createAddressLocation( new BigInteger( address.toString() ) );
- try {
- getCDIThread().resume( location );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IMoveToAddress#canMoveToAddress(org.eclipse.cdt.core.IAddress)
- */
- @Override
- public boolean canMoveToAddress(IAddress address) {
- return getThread().isSuspended() && (getCDIThread() instanceof ICDIExecuteMoveInstructionPointer);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IMoveToAddress#moveToAddress(org.eclipse.cdt.core.IAddress)
- */
- @Override
- public void moveToAddress(IAddress address) throws DebugException {
- if ( !canMoveToAddress( address ) )
- return;
- ICDILocation location = getCDITarget().createAddressLocation( new BigInteger( address.toString() ) );
- ICDIExecuteMoveInstructionPointer mover = (ICDIExecuteMoveInstructionPointer)getCDIThread();
- try {
- mover.moveInstructionPointer( location);
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IMoveToLine#canMoveToLine(java.lang.String, int)
- */
- @Override
- public boolean canMoveToLine(String fileName, int lineNumber) {
- return getThread().isSuspended() && (getCDIThread() instanceof ICDIExecuteMoveInstructionPointer);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IMoveToLine#moveToLine(java.lang.String, int)
- */
- @Override
- public void moveToLine(String fileName, int lineNumber) throws DebugException {
- if ( !canMoveToLine( fileName, lineNumber ) )
- return;
- ICDILocation location= getCDITarget().createLineLocation( fileName, lineNumber );
- ICDIExecuteMoveInstructionPointer mover = (ICDIExecuteMoveInstructionPointer)getCDIThread();
- try {
- mover.moveInstructionPointer( location );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- private ICDIThread getCDIThread() {
- return ((CThread)getThread()).getCDIThread();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
deleted file mode 100644
index 726c3bfeddd..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
+++ /dev/null
@@ -1,1101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Stefan Bylund (Enea, steby@enea.se) - patch for bug 155464
- * Ken Ryall (Nokia) - Support for breakpoint actions (bug 118308)
- * Ling Wang (Nokia) - Bug 176077
- * Denis Pilat (ST) - Bug 205017
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import com.ibm.icu.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
-import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDisconnectedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIDisposable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
-import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICThread;
-import org.eclipse.cdt.debug.core.model.IDummyStackFrame;
-import org.eclipse.cdt.debug.core.model.IMoveToAddress;
-import org.eclipse.cdt.debug.core.model.IMoveToLine;
-import org.eclipse.cdt.debug.core.model.IRestart;
-import org.eclipse.cdt.debug.core.model.IResumeAtAddress;
-import org.eclipse.cdt.debug.core.model.IResumeAtLine;
-import org.eclipse.cdt.debug.core.model.IResumeWithoutSignal;
-import org.eclipse.cdt.debug.core.model.IRunToAddress;
-import org.eclipse.cdt.debug.core.model.IRunToLine;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.core.model.IStackFrame;
-
-/**
- * A thread in a C/C++ debug model.
- */
-public class CThread extends CDebugElement implements ICThread, IRestart, IResumeWithoutSignal, ICDIEventListener {
-
- private final static int MAX_STACK_DEPTH = 100;
-
- /**
- * Underlying CDI thread.
- */
- private ICDIThread fCDIThread;
-
- /**
- * Collection of stack frames
- */
- private ArrayList fStackFrames;
-
- /**
- * Whether children need to be refreshed. Set to true when stack frames are re-used on the next suspend.
- */
- private boolean fRefreshChildren = true;
-
- /**
- * The debug configuration of this session.
- */
- private ICDITargetConfiguration fConfig;
-
- /**
- * Whether this thread is current.
- */
- private boolean fIsCurrent = false;
-
- /**
- * The depth of the current stack.
- */
- private int fLastStackDepth = 0;
-
- /**
- * Whether this thread is disposed.
- */
- private boolean fDisposed = false;
-
- /**
- * Constructor for CThread.
- */
- public CThread( CDebugTarget target, ICDIThread cdiThread ) {
- super( target );
- setState( cdiThread.isSuspended() ? CDebugElementState.SUSPENDED : CDebugElementState.RESUMED );
- setCDIThread( cdiThread );
- fConfig = getCDITarget().getConfiguration();
- initialize();
- getCDISession().getEventManager().addEventListener( this );
- }
-
- protected void initialize() {
- fStackFrames = new ArrayList();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getStackFrames()
- */
- @Override
- public IStackFrame[] getStackFrames() throws DebugException {
- List list = Collections.EMPTY_LIST;
- try {
- list = computeStackFrames();
- }
- catch( DebugException e ) {
- setStatus( ICDebugElementStatus.ERROR, e.getStatus().getMessage() );
- throw e;
- }
- return (IStackFrame[])list.toArray( new IStackFrame[list.size()] );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#hasStackFrames()
- */
- @Override
- public boolean hasStackFrames() throws DebugException {
- // Always return true to postpone the stack frames request.
- // But not if the thread is already resumed. This fixes flickering in the Debug View.
- if (getState().equals( CDebugElementState.RESUMED ))
- return false;
-
- return true;
- }
-
- /**
- * @see computeStackFrames()
- *
- * @param refreshChildren whether or not this method should request new stack frames from the target
- */
- protected synchronized List computeStackFrames( boolean refreshChildren ) throws DebugException {
- if ( isSuspended() ) {
- if ( isTerminated() ) {
- fStackFrames = new ArrayList();
- }
- else if ( refreshChildren ) {
- // Remove dummy frame
- if ( fStackFrames.size() > 0 ) {
- Object frame = fStackFrames.get( fStackFrames.size() - 1 );
- if ( frame instanceof IDummyStackFrame ) {
- fStackFrames.remove( frame );
- }
- }
- // Retrieve stack frames from the backend
- int depth = getStackDepth();
- if ( depth >= getMaxStackDepth() )
- depth = getMaxStackDepth() - 1;
- ICDIStackFrame[] frames = ( depth != 0 ) ? getCDIStackFrames( 0, depth - 1 ) : new ICDIStackFrame[0];
-
- // Safety precaution in case getting the stack frames failed to get us as many as it said
- depth = frames.length;
-
- if ( fStackFrames.isEmpty() ) {
- if ( frames.length > 0 ) {
- addStackFrames( frames, 0, frames.length, false );
- }
- }
- else {
- int diff = depth - getLastStackDepth();
- int offset = ( diff > 0 ) ? frames.length - diff : 0;
- int length = ( diff > 0 ) ? diff : -diff;
- if (offset < 0 || !compareStackFrames( frames, fStackFrames, offset, length ) ) {
- // replace all frames
- disposeStackFrames( 0, fStackFrames.size() );
- addStackFrames( frames, 0, frames.length, false );
- }
- if ( diff < 0 ) {
- // stepping out of the last frame
- disposeStackFrames( 0, getLastStackDepth() - depth );
- if ( frames.length > 0 ) {
- updateStackFrames( frames, 0, fStackFrames, fStackFrames.size() );
- if ( fStackFrames.size() < frames.length ) {
- addStackFrames( frames, fStackFrames.size(), frames.length - fStackFrames.size(), true );
- }
- }
- }
- else if ( diff > 0 ) {
- // stepping into a new frame
- disposeStackFrames( frames.length - depth + getLastStackDepth(), depth - getLastStackDepth() );
- addStackFrames( frames, 0, depth - getLastStackDepth(), false );
- updateStackFrames( frames, depth - getLastStackDepth(), fStackFrames, frames.length - depth + getLastStackDepth() );
- }
- else { // diff == 0
- if ( depth != 0 ) {
- // we are in the same frame
- updateStackFrames( frames, 0, fStackFrames, frames.length );
- }
- }
- }
- if ( depth > getMaxStackDepth() ) {
- fStackFrames.add( new CDummyStackFrame( this ) );
- }
- setLastStackDepth( depth );
- setRefreshChildren( false );
- }
- }
- return fStackFrames;
- }
-
- /**
- * Compares the lists of the old and new frames.
- *
- * @param newFrames the array of the new frames
- * @param oldFrames the list of the old frames
- * @param offset the offset in the new frames array
- * @param length the number of frames to compare
- *
- * @return true if all frames are same
- */
- private boolean compareStackFrames( ICDIStackFrame[] newFrames, List oldFrames, int offset, int length ) {
- if (offset<0) return false;
- int index = offset;
- Iterator it = oldFrames.iterator();
- while( it.hasNext() && index < newFrames.length ) {
- CStackFrame frame = (CStackFrame)it.next();
- if ( !frame.getCDIStackFrame().equals( newFrames[index++] ) )
- return false;
- }
- return true;
- }
-
- /**
- * Retrieves and returns all underlying stack frames
- *
- * @return list of StackFrame
- * @exception DebugException if this method fails. Reasons include:
- *
- *
- */
- protected ICDIStackFrame[] getCDIStackFrames() throws DebugException {
- return new ICDIStackFrame[0];
- }
-
- /**
- * Retrieves and returns underlying stack frames between lowFrame
- * and highFrame.
- *
- * @return list of StackFrame
- * @exception DebugException if this method fails. Reasons include:
- *
- *
- */
- protected ICDIStackFrame[] getCDIStackFrames( int lowFrame, int highFrame ) throws DebugException {
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- return cdiThread.getStackFrames( lowFrame, highFrame );
- }
- }
- catch( CDIException e ) {
- setStatus( ICDebugElementStatus.WARNING, MessageFormat.format( CoreModelMessages.getString( "CThread.0" ), new String[]{ e.getMessage() } ) ); //$NON-NLS-1$
- targetRequestFailed( e.getMessage(), null );
- }
- return new ICDIStackFrame[0];
- }
-
- /**
- * Replaces the underlying stack frame objects in the preserved frames list with the current underlying stack frames.
- *
- * @param newFrames list of current underlying ICDIStackFrames. Frames from this list are assigned to the underlying frames in the
- * oldFrames list.
- * @param offset the offset in the lists at which to start replacing the old underlying frames
- * @param oldFrames list of preserved frames, of type CStackFrame
- * @param length the number of frames to replace
- */
- protected void updateStackFrames( ICDIStackFrame[] newFrames, int offset, List oldFrames, int length ) throws DebugException {
- for( int i = 0; i < length; i++ ) {
- CStackFrame frame = (CStackFrame)oldFrames.get( offset );
- frame.setCDIStackFrame( newFrames[offset] );
- offset++;
- }
- }
-
- protected void addStackFrames( ICDIStackFrame[] newFrames, int startIndex, int length, boolean append ) {
- if ( newFrames.length >= startIndex + length ) {
- for( int i = 0; i < length; ++i ) {
- if ( append )
- fStackFrames.add( new CStackFrame( this, newFrames[startIndex + i] ) );
- else
- fStackFrames.add( i, new CStackFrame( this, newFrames[startIndex + i] ) );
- }
- }
- }
-
- /**
- * Returns this thread's current stack frames as a list, computing them if required. Returns an empty collection if this thread is not currently suspended,
- * or this thread is terminated. This method should be used internally to get the current stack frames, instead of calling #getStackFrames(),
- * which makes a copy of the current list.
- *
- * Before a thread is resumed a call must be made to one of:
- *
- *
preserveStackFrames()
- *
disposeStackFrames()
- *
- * If stack frames are disposed before a thread is resumed, stack frames are completely re-computed on the next call to this method. If stack frames are to
- * be preserved, this method will attempt to re-use any stack frame objects which represent the same stack frame as on the previous suspend. Stack frames
- * are cached until a subsequent call to preserve or dispose stack frames.
- *
- *
- * @return list of IStackFrame
- * @exception DebugException if this method fails. Reasons include:
- *
- *
- */
- public synchronized List computeStackFrames() throws DebugException {
- return computeStackFrames( refreshChildren() );
- }
-
- /**
- * @see CThread#computeStackFrames()
- *
- * This method differs from computeStackFrames() in that it always requests new stack frames from the target. As this is an expensive operation, this method
- * should only be used by clients who know for certain that the stack frames on the target have changed.
- */
- public List computeNewStackFrames() throws DebugException {
- return computeStackFrames( true );
- }
-
- /**
- * Helper method for #computeStackFrames() to create all underlying stack frames.
- *
- * @exception DebugException if this method fails. Reasons include:
- *
- *
- */
- protected List createAllStackFrames( int depth, ICDIStackFrame[] frames ) throws DebugException {
- List list = new ArrayList( frames.length );
- for( int i = 0; i < frames.length; ++i ) {
- list.add( new CStackFrame( this, frames[i] ) );
- }
- if ( depth > frames.length ) {
- list.add( new CDummyStackFrame( this ) );
- }
- return list;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getPriority()
- */
- @Override
- public int getPriority() throws DebugException {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getTopStackFrame()
- */
- @Override
- public IStackFrame getTopStackFrame() throws DebugException {
- List c = computeStackFrames();
- return (c.isEmpty()) ? null : (IStackFrame)c.get( 0 );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getName()
- */
- @Override
- public String getName() throws DebugException {
- final ICDIThread cdiThread = getCDIThread();
- return cdiThread != null ? cdiThread.toString() : ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getBreakpoints()
- */
- @Override
- public IBreakpoint[] getBreakpoints() {
- List list = new ArrayList( 1 );
- if ( isSuspended() ) {
- IBreakpoint bkpt = null;
- if ( getCurrentStateInfo() instanceof ICDIBreakpointHit )
- bkpt = ((CDebugTarget)getDebugTarget()).getBreakpointManager().getBreakpoint( ((ICDIBreakpointHit)getCurrentStateInfo()).getBreakpoint() );
- else if ( getCurrentStateInfo() instanceof ICDIWatchpointTrigger )
- bkpt = ((CDebugTarget)getDebugTarget()).getBreakpointManager().getBreakpoint( ((ICDIWatchpointTrigger)getCurrentStateInfo()).getWatchpoint() );
- if ( bkpt != null )
- list.add( bkpt );
- }
- return (IBreakpoint[])list.toArray( new IBreakpoint[list.size()] );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- if ( isDisposed() )
- return;
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- final ICDIThread cdiThread = getCDIThread();
- if ( source instanceof ICDIThread && cdiThread != null && source.equals( cdiThread ) ) {
- if ( event instanceof ICDISuspendedEvent ) {
- handleSuspendedEvent( (ICDISuspendedEvent)event );
- }
- else if ( event instanceof ICDIResumedEvent ) {
- handleResumedEvent( (ICDIResumedEvent)event );
- }
- else if ( event instanceof ICDIDestroyedEvent ) {
- handleTerminatedEvent( (ICDIDestroyedEvent)event );
- }
- else if ( event instanceof ICDIDisconnectedEvent ) {
- handleDisconnectedEvent( (ICDIDisconnectedEvent)event );
- }
- else if ( event instanceof ICDIChangedEvent ) {
- handleChangedEvent( (ICDIChangedEvent)event );
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- @Override
- public boolean canResume() {
- return ( fConfig.supportsResume() && isSuspended() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#canRunToLine(org.eclipse.core.resources.IFile, int)
- */
- @Override
- public boolean canRunToLine( IFile file, int lineNumber ) {
- return canRunToLine( file.getLocation().lastSegment(), lineNumber );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#canRunToLine(java.lang.String, int)
- */
- @Override
- public boolean canRunToLine( String fileName, int lineNumber ) {
- return canResume();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- @Override
- public boolean canSuspend() {
- CDebugElementState state = getState();
- return ( fConfig.supportsSuspend() && (state.equals( CDebugElementState.RESUMED ) || state.equals( CDebugElementState.STEPPED )) );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return getState().equals( CDebugElementState.SUSPENDED );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- @Override
- public void resume() throws DebugException {
- if ( !canResume() )
- return;
- CDebugElementState oldState = getState();
- setState( CDebugElementState.RESUMING );
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- cdiThread.resume( false );
- }
- }
- catch( CDIException e ) {
- setState( oldState );
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#runToLine(org.eclipse.core.resources.IFile, int, boolean)
- */
- @Override
- public void runToLine( IFile file, int lineNumber, boolean skipBreakpoints ) throws DebugException {
- runToLine( file.getLocation().lastSegment(), lineNumber, skipBreakpoints );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRunToLine#runToLine(java.lang.String, int, boolean)
- */
- @Override
- public void runToLine( String fileName, int lineNumber, boolean skipBreakpoints ) throws DebugException {
- if ( !canRunToLine( fileName, lineNumber ) )
- return;
- if ( skipBreakpoints ) {
- ((CDebugTarget)getDebugTarget()).skipBreakpoints( true );
- }
- CDebugElementState oldState = getState();
- setState( CDebugElementState.RESUMING );
- ICDILocation location = getCDITarget().createLineLocation( fileName, lineNumber );
-
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- cdiThread.stepUntil( location );
- }
- }
- catch( CDIException e ) {
- setState( oldState );
- if ( skipBreakpoints ) {
- ((CDebugTarget)getDebugTarget()).skipBreakpoints( false );
- }
- targetRequestFailed( e.getMessage(), e );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- @Override
- public void suspend() throws DebugException {
- if ( !canSuspend() )
- return;
- CDebugElementState oldState = getState();
- setState( CDebugElementState.SUSPENDING );
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- cdiThread.suspend();
- }
- }
- catch( CDIException e ) {
- setState( oldState );
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepInto()
- */
- @Override
- public boolean canStepInto() {
- return canStep();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepOver()
- */
- @Override
- public boolean canStepOver() {
- return canStep();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepReturn()
- */
- @Override
- public boolean canStepReturn() {
- if ( !fConfig.supportsStepping() || !canResume() ) {
- return false;
- }
- return ( fStackFrames.size() > 1 );
- }
-
- /**
- * Returns whether this thread is in a valid state to step.
- *
- * @return whether this thread is in a valid state to step
- */
- protected boolean canStep() {
- if ( !fConfig.supportsStepping() || !isSuspended() ) {
- return false;
- }
- return !fStackFrames.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#isStepping()
- */
- @Override
- public boolean isStepping() {
- return ( getState().equals( CDebugElementState.STEPPING ) ) || ( getState().equals( CDebugElementState.STEPPED ) );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepInto()
- */
- @Override
- public void stepInto() throws DebugException {
- if ( !canStepInto() )
- return;
- CDebugElementState oldState = getState();
- setState( CDebugElementState.STEPPING );
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- if ( !isInstructionsteppingEnabled() ) {
- cdiThread.stepInto( 1 );
- }
- else {
- cdiThread.stepIntoInstruction( 1 );
- }
- }
- }
- catch( CDIException e ) {
- setState( oldState );
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepOver()
- */
- @Override
- public void stepOver() throws DebugException {
- if ( !canStepOver() )
- return;
- CDebugElementState oldState = getState();
- setState( CDebugElementState.STEPPING );
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- if ( !isInstructionsteppingEnabled() ) {
- cdiThread.stepOver( 1 );
- }
- else {
- cdiThread.stepOverInstruction( 1 );
- }
- }
- }
- catch( CDIException e ) {
- setState( oldState );
- targetRequestFailed( e.getMessage(), null );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepReturn()
- */
- @Override
- public void stepReturn() throws DebugException {
- if ( !canStepReturn() )
- return;
- IStackFrame[] frames = getStackFrames();
- if ( frames.length == 0 )
- return;
- CStackFrame f = (CStackFrame)frames[0];
- CDebugElementState oldState = getState();
- setState( CDebugElementState.STEPPING );
- try {
- f.doStepReturn();
- }
- catch( DebugException e ) {
- setState( oldState );
- throw e;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- @Override
- public boolean canTerminate() {
- return getDebugTarget().canTerminate();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- @Override
- public boolean isTerminated() {
- return getDebugTarget().isTerminated();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- @Override
- public void terminate() throws DebugException {
- getDebugTarget().terminate();
- }
-
- /**
- * Sets the underlying CDI thread that this model object is a proxy to.
- *
- * @param thread the underlying CDI thread
- */
- protected void setCDIThread( ICDIThread cdiThread ) {
- fCDIThread = cdiThread;
- }
-
- /**
- * Returns the underlying CDI thread that this model object is a proxy to.
- *
- * @return the underlying CDI thread
- */
- protected ICDIThread getCDIThread() {
- return fCDIThread;
- }
-
- /**
- * Preserves stack frames to be used on the next suspend event. Iterates through all current stack frames, setting their state as invalid. This method
- * should be called before this thread is resumed, when stack frames are to be re-used when it later suspends.
- *
- * @see computeStackFrames()
- */
- protected synchronized void preserveStackFrames() {
- Iterator it = fStackFrames.iterator();
- while( it.hasNext() ) {
- CStackFrame frame = (((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
- if ( frame != null ) {
- frame.preserve();
- }
- }
- setRefreshChildren( true );
- }
-
- /**
- * Disposes stack frames, to be completely re-computed on the next suspend event. This method should be called before this thread is resumed when stack
- * frames are not to be re-used on the next suspend.
- */
- protected synchronized void disposeStackFrames() {
- Iterator it = fStackFrames.iterator();
- while( it.hasNext() ) {
- Object obj = it.next();
- if ( obj instanceof CStackFrame ) {
- ((CStackFrame)obj).dispose();
- }
- }
- fStackFrames.clear();
- setLastStackDepth( 0 );
- resetStatus();
- setRefreshChildren( true );
- }
-
- protected void disposeStackFrames( int index, int length ) {
- List removeList = new ArrayList( length );
- Iterator it = fStackFrames.iterator();
- int counter = 0;
- while( it.hasNext() ) {
- CStackFrame frame = (((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
- if ( frame != null && counter >= index && counter < index + length ) {
- frame.dispose();
- removeList.add( frame );
- }
- ++counter;
- }
- fStackFrames.removeAll( removeList );
- }
-
- /**
- * Notification this thread has terminated - update state and fire a terminate event.
- */
- protected void terminated() {
- setState( CDebugElementState.TERMINATED );
- dispose();
- }
-
- private void handleSuspendedEvent( ICDISuspendedEvent event ) {
- if ( !(getState().equals( CDebugElementState.RESUMED ) ||
- getState().equals( CDebugElementState.STEPPED ) ||
- getState().equals( CDebugElementState.SUSPENDING )) )
- return;
- setState( CDebugElementState.SUSPENDED );
- ICDISessionObject reason = event.getReason();
- setCurrentStateInfo( reason );
- if ( reason instanceof ICDIEndSteppingRange ) {
- handleEndSteppingRange( (ICDIEndSteppingRange)reason );
- }
- else if ( reason instanceof ICDIBreakpointHit ) {
- handleBreakpointHit( (ICDIBreakpointHit)reason );
- }
- else if ( reason instanceof ICDISignalReceived ) {
- handleSuspendedBySignal( (ICDISignalReceived)reason );
- }
- else {
- // fireSuspendEvent( DebugEvent.CLIENT_REQUEST );
- // Temporary fix for bug 56520
- fireSuspendEvent( DebugEvent.BREAKPOINT );
- }
- }
-
- private void handleResumedEvent( ICDIResumedEvent event ) {
- CDebugElementState state = CDebugElementState.RESUMED;
- int detail = DebugEvent.RESUME;
- syncWithBackend();
- if ( isCurrent() && event.getType() != ICDIResumedEvent.CONTINUE ) {
- preserveStackFrames();
- switch( event.getType() ) {
- case ICDIResumedEvent.STEP_INTO:
- case ICDIResumedEvent.STEP_INTO_INSTRUCTION:
- detail = DebugEvent.STEP_INTO;
- break;
- case ICDIResumedEvent.STEP_OVER:
- case ICDIResumedEvent.STEP_OVER_INSTRUCTION:
- detail = DebugEvent.STEP_OVER;
- break;
- case ICDIResumedEvent.STEP_RETURN:
- detail = DebugEvent.STEP_RETURN;
- break;
- }
- state = CDebugElementState.STEPPED;
- }
- else {
- disposeStackFrames();
- fireChangeEvent( DebugEvent.CONTENT );
- }
- setCurrent( false );
- setState( state );
- setCurrentStateInfo( null );
- fireResumeEvent( detail );
- }
-
- private void handleEndSteppingRange( ICDIEndSteppingRange endSteppingRange ) {
- fireSuspendEvent( DebugEvent.STEP_END );
- }
-
- private void handleBreakpointHit( ICDIBreakpointHit breakpointHit ) {
- IBreakpoint platformBreakpoint = ((CDebugTarget)getDebugTarget()).getBreakpointManager().getBreakpoint(breakpointHit.getBreakpoint());
- if (platformBreakpoint != null)
- CDebugCorePlugin.getDefault().getBreakpointActionManager().executeActions(platformBreakpoint, this);
- fireSuspendEvent( DebugEvent.BREAKPOINT );
- }
-
- private void handleWatchpointHit( ICDIWatchpointTrigger watchPointTrigger ) {
- IBreakpoint platformBreakpoint = ((CDebugTarget)getDebugTarget()).getBreakpointManager().getBreakpoint(watchPointTrigger.getWatchpoint());
- if (platformBreakpoint != null)
- CDebugCorePlugin.getDefault().getBreakpointActionManager().executeActions(platformBreakpoint, this);
- fireSuspendEvent( DebugEvent.BREAKPOINT );
- }
-
- private void handleSuspendedBySignal( ICDISignalReceived signal ) {
- fireSuspendEvent( DebugEvent.CLIENT_REQUEST );
- }
-
- private void handleTerminatedEvent( ICDIDestroyedEvent event ) {
- setState( CDebugElementState.TERMINATED );
- setCurrentStateInfo( null );
- terminated();
- }
-
- private void handleDisconnectedEvent( ICDIDisconnectedEvent event ) {
- setState( CDebugElementState.TERMINATED );
- setCurrentStateInfo( null );
- terminated();
- }
-
- private void handleChangedEvent( ICDIChangedEvent event ) {
- }
-
- /**
- * Cleans up the internal state of this thread.
- */
- protected void cleanup() {
- getCDISession().getEventManager().removeEventListener( this );
- disposeStackFrames();
-
- final ICDIThread cdiThread = getCDIThread();
- setCDIThread(null);
- if (cdiThread instanceof ICDIDisposable) {
- ((ICDIDisposable)cdiThread).dispose();
- }
- }
-
- private void setRefreshChildren( boolean refresh ) {
- fRefreshChildren = refresh;
- }
-
- private boolean refreshChildren() {
- return fRefreshChildren;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#canRestart()
- */
- @Override
- public boolean canRestart() {
- return getDebugTarget() instanceof IRestart && ((IRestart)getDebugTarget()).canRestart();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IRestart#restart()
- */
- @Override
- public void restart() throws DebugException {
- if ( canRestart() ) {
- ((IRestart)getDebugTarget()).restart();
- }
- }
-
- protected boolean isCurrent() {
- return fIsCurrent;
- }
-
- protected void setCurrent( boolean current ) {
- boolean c = current;
- if ( !c ) {
- if ( getCDITarget().getConfiguration() instanceof ICDITargetConfiguration2
- && ((ICDITargetConfiguration2)getCDITarget().getConfiguration()).supportsThreadControl() )
- c = true; // When the debugger can control individual
- // threads treat every thread is "current"
- }
- fIsCurrent = c;
- }
-
- protected int getStackDepth() throws DebugException {
- int depth = 0;
- try {
- final ICDIThread cdiThread = getCDIThread();
- if (cdiThread != null) {
- depth = cdiThread.getStackFrameCount();
- }
- }
- catch( CDIException e ) {
- setStatus( ICDebugElementStatus.WARNING, MessageFormat.format( CoreModelMessages.getString( "CThread.1" ), new String[]{ e.getMessage() } ) ); //$NON-NLS-1$
- }
- return depth;
- }
-
- protected int getMaxStackDepth() {
- return MAX_STACK_DEPTH;
- }
-
- private void setLastStackDepth( int depth ) {
- fLastStackDepth = depth;
- }
-
- protected int getLastStackDepth() {
- return fLastStackDepth;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( adapter.equals( IRunToLine.class ) ||
- adapter.equals( IRunToAddress.class ) ||
- adapter.equals( IResumeAtLine.class ) ||
- adapter.equals( IResumeAtAddress.class ) ||
- adapter.equals( IMoveToLine.class ) ||
- adapter.equals( IMoveToAddress.class ) ) {
- try {
- // Alain: Put a proper fix later.
- Object obj = getTopStackFrame();
- if (obj instanceof ICStackFrame) {
- return obj;
- }
- }
- catch( DebugException e ) {
- // do nothing
- }
- }
- if ( adapter.equals( CDebugElementState.class ) )
- return this;
- if ( adapter == ICStackFrame.class ) {
- try {
- // Alain: Put a proper fix later.
- Object obj = getTopStackFrame();
- if (obj instanceof ICStackFrame) {
- return obj;
- }
- }
- catch( DebugException e ) {
- // do nothing
- }
- }
- if ( adapter == IMemoryBlockRetrieval.class ) {
- return getDebugTarget().getAdapter( adapter );
- }
- if ( adapter == ICDIThread.class ) {
- return getCDIThread();
- }
- return super.getAdapter( adapter );
- }
-
- protected void dispose() {
- fDisposed = true;
- cleanup();
- }
-
- protected boolean isDisposed() {
- return fDisposed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
- */
- @Override
- public boolean canResumeWithoutSignal() {
- return (getDebugTarget() instanceof IResumeWithoutSignal && ((IResumeWithoutSignal)getDebugTarget()).canResumeWithoutSignal());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#resumeWithoutSignal()
- */
- @Override
- public void resumeWithoutSignal() throws DebugException {
- if ( canResumeWithoutSignal() ) {
- ((IResumeWithoutSignal)getDebugTarget()).resumeWithoutSignal();
- }
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- String result = ""; //$NON-NLS-1$
- try {
- result = getName();
- }
- catch( DebugException e ) {
- }
- return result;
- }
-
- protected void resumedByTarget( int detail, List events ) {
- syncWithBackend();
- if ( isCurrent() && detail != DebugEvent.CLIENT_REQUEST && detail != DebugEvent.UNSPECIFIED ) {
- setState( CDebugElementState.STEPPED );
- preserveStackFrames();
- events.add( createResumeEvent( detail ) );
- }
- else {
- setState( CDebugElementState.RESUMED );
- disposeStackFrames();
- // events.add( createResumeEvent( DebugEvent.CLIENT_REQUEST ) ); FIX FOR 218260
- }
- setCurrent( false );
- setCurrentStateInfo( null );
- }
-
- protected boolean isInstructionsteppingEnabled() {
- return ((CDebugTarget)getDebugTarget()).isInstructionSteppingEnabled();
- }
-
- protected void suspendByTarget( ICDISessionObject reason, ICDIThread suspensionThread ) {
- setState( CDebugElementState.SUSPENDED );
- setCurrentStateInfo( null );
- final ICDIThread cdiThread = getCDIThread();
- if ( cdiThread != null && cdiThread.equals( suspensionThread ) ) {
- setCurrent( true );
- setCurrentStateInfo( reason );
- if ( reason instanceof ICDIEndSteppingRange ) {
- handleEndSteppingRange( (ICDIEndSteppingRange)reason );
- }
- else if ( reason instanceof ICDIBreakpointHit ) {
- handleBreakpointHit( (ICDIBreakpointHit)reason );
- }
- else if ( reason instanceof ICDIWatchpointTrigger ) {
- handleWatchpointHit( (ICDIWatchpointTrigger)reason );
- }
- else if ( reason instanceof ICDISignalReceived ) {
- handleSuspendedBySignal( (ICDISignalReceived)reason );
- }
- else {
- // fireSuspendEvent( DebugEvent.CLIENT_REQUEST );
- // Temporary fix for bug 56520
- fireSuspendEvent( DebugEvent.BREAKPOINT );
- }
- }
- }
-
- private void syncWithBackend() {
- ICDIThread cdiThread = getCDIThread();
- if (cdiThread == null) {
- return;
- }
-
- ICDIThread currentThread = null;
- try {
- currentThread = cdiThread.getTarget().getCurrentThread();
- }
- catch( CDIException e ) {
- // ignore
- }
- setCurrent( cdiThread.equals( currentThread ) );
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CType.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CType.java
deleted file mode 100644
index d85cbc4ec29..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CType.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntegralType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.model.ICType;
-
-/**
- * The CDI-based implementation of ICType.
- */
-public class CType implements ICType {
-
- /**
- * The underlying CDI type.
- */
- private ICDIType fCDIType;
-
- /**
- * Constructor for CType.
- */
- public CType( ICDIType cdiType ) {
- setCDIType( cdiType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#getName()
- */
- @Override
- public String getName() {
- return ( fCDIType != null ) ? fCDIType.getTypeName() : null;
- }
-
- public void dispose() {
- fCDIType = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#getArrayDimensions()
- */
- @Override
- public int[] getArrayDimensions() {
- int length = 0;
- ICDIType type = getCDIType();
- while( type instanceof ICDIArrayType ) {
- ++length;
- type = ((ICDIDerivedType)type).getComponentType();
- }
- int[] dims = new int[length];
- type = getCDIType();
- for (int i = 0; i < length; i++) {
- dims[i] = ((ICDIArrayType)type).getDimension();
- type = ((ICDIDerivedType)type).getComponentType();
- }
- return dims;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isArray()
- */
- @Override
- public boolean isArray() {
- return ( getCDIType() instanceof ICDIArrayType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isCharacter()
- */
- @Override
- public boolean isCharacter() {
- return ( getCDIType() instanceof ICDICharType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isFloatingPointType()
- */
- @Override
- public boolean isFloatingPointType() {
- return ( getCDIType() instanceof ICDIFloatingPointType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isPointer()
- */
- @Override
- public boolean isPointer() {
- return ( getCDIType() instanceof ICDIPointerType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isReference()
- */
- @Override
- public boolean isReference() {
- return ( getCDIType() instanceof ICDIReferenceType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isStructure()
- */
- @Override
- public boolean isStructure() {
- return ( getCDIType() instanceof ICDIStructType );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isUnsigned()
- */
- @Override
- public boolean isUnsigned() {
- return ( isIntegralType() ) ? ((ICDIIntegralType)getCDIType()).isUnsigned() : false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICType#isIntegralType()
- */
- @Override
- public boolean isIntegralType() {
- return ( getCDIType() instanceof ICDIIntegralType );
- }
-
- protected ICDIType getCDIType() {
- return fCDIType;
- }
-
- protected void setCDIType( ICDIType type ) {
- fCDIType = type;
- }
-
- protected boolean isAggregate() {
- return ( isArray() || isStructure() || isPointer() || isReference() );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
deleted file mode 100644
index ffa02991cec..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
+++ /dev/null
@@ -1,846 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Mark Mitchell, CodeSourcery - Bug 136896: View variables in binary format
- * Warren Paul (Nokia) - 150860, 150864, 150862, 150863, 217493
- * Ken Ryall (Nokia) - 207675
- * Mathias Kunter - Support for octal number format (bug 370462)
-*******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFormat;
-import org.eclipse.cdt.debug.core.cdi.ICDIFormattable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBigIntegerValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharValue;
-import org.eclipse.cdt.debug.core.model.CVariableFormat;
-import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.utils.Addr32;
-import org.eclipse.cdt.utils.Addr64;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * Represents the value of a variable in the CDI model.
- */
-public class CValue extends AbstractCValue {
- /**
- * Cached value.
- */
- private String fValueString = null;
-
- /**
- * Underlying CDI value.
- */
- private ICDIValue fCDIValue;
-
- /**
- * List of child variables.
- */
- private List fVariables = new ArrayList();
-
- private CType fType;
-
- /**
- * Constructor for CValue.
- */
- protected CValue( CVariable parent, ICDIValue cdiValue ) {
- super( parent );
- fCDIValue = cdiValue;
- }
-
- /**
- * Constructor for CValue.
- */
- protected CValue( CVariable parent, String message ) {
- super( parent );
- setStatus( ICDebugElementStatus.ERROR, message );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
- */
- @Override
- public String getReferenceTypeName() throws DebugException {
- return ( getParentVariable() != null ) ? getParentVariable().getReferenceTypeName() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getValueString()
- */
- @Override
- public String getValueString() throws DebugException {
- if ( fValueString == null && getUnderlyingValue() != null ) {
- resetStatus();
- ICStackFrame cframe = getParentVariable().getStackFrame();
- boolean isSuspended = (cframe == null) ? getCDITarget().isSuspended() : cframe.isSuspended();
- if ( isSuspended ) {
- try {
- fValueString = processUnderlyingValue( getUnderlyingValue() );
- }
- catch( CDIException e ) {
- setStatus( ICDebugElementStatus.ERROR, e.getMessage() );
- fValueString = e.getLocalizedMessage();
- }
- }
- }
- return fValueString;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#isAllocated()
- */
- @Override
- public boolean isAllocated() throws DebugException {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getVariables()
- */
- @Override
- public IVariable[] getVariables() throws DebugException {
- List list = getVariables0();
- return list.toArray( new IVariable[list.size()] );
- }
-
- protected synchronized List getVariables0() throws DebugException {
- if ( !isAllocated() || !hasVariables() )
- return new ArrayList();
- if ( fVariables.size() == 0 ) {
- try {
- List vars = getCDIVariables();
- for (ICDIVariable var : vars) {
- if (getParentVariable() instanceof CGlobalVariable) {
- fVariables.add(CVariableFactory.createGlobalVariable(
- this,
- null,
- var));
- }
- else {
- fVariables.add(CVariableFactory.createLocalVariable(this, var));
- }
- }
- resetStatus();
- }
- catch( DebugException e ) {
- setStatus( ICDebugElementStatus.ERROR, e.getMessage() );
- }
- }
- return fVariables;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- @Override
- public boolean hasVariables() throws DebugException {
- try {
- ICDIValue value = getUnderlyingValue();
- if ( value != null )
- return value.getChildrenNumber() > 0;
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), null );
- }
- return false;
- }
-
- public ICDIValue getUnderlyingValue() {
- return fCDIValue;
- }
-
- protected List getCDIVariables() throws DebugException {
- ICDIVariable[] vars = null;
- try {
- ICDIValue value = getUnderlyingValue();
- if ( value != null ) {
- vars = value.getVariables();
- }
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), e );
- }
-
- // getVariables should return an empty array instead of null.
- if ( vars == null ) {
- vars = new ICDIVariable[0];
- }
-
- return Arrays.asList( vars );
- }
-
- @Override
- protected synchronized void setChanged( boolean changed ) {
- if ( changed ) {
- fValueString = null;
- resetStatus();
- }
- else {
- if (getCDITarget().getConfiguration() instanceof ICDITargetConfiguration2 &&
- ((ICDITargetConfiguration2)getCDITarget().getConfiguration()).supportsPassiveVariableUpdate())
- fValueString = null;
- }
-
- for (AbstractCVariable var : fVariables) {
- var.setChanged( changed );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#dispose()
- */
- @Override
- public void dispose() {
- for (AbstractCVariable var : fVariables) {
- var.dispose();
- }
- }
-
- private String processUnderlyingValue( ICDIValue cdiValue ) throws CDIException {
- if ( cdiValue != null ) {
- if ( cdiValue instanceof ICDIBoolValue )
- return getBoolValueString( (ICDIBoolValue)cdiValue );
- if ( cdiValue instanceof ICDICharValue )
- return getCharValueString( (ICDICharValue)cdiValue );
- else if ( cdiValue instanceof ICDIShortValue )
- return getShortValueString( (ICDIShortValue)cdiValue );
- else if ( cdiValue instanceof ICDIIntValue )
- return getIntValueString( (ICDIIntValue)cdiValue );
- else if ( cdiValue instanceof ICDILongValue )
- return getLongValueString( (ICDILongValue)cdiValue );
- else if ( cdiValue instanceof ICDILongLongValue )
- return getLongLongValueString( (ICDILongLongValue)cdiValue );
- else if ( cdiValue instanceof ICDIBigIntegerValue )
- return getBigIntegerValueString( (ICDIBigIntegerValue)cdiValue );
- else if ( cdiValue instanceof ICDIFloatValue )
- return getFloatValueString( (ICDIFloatValue)cdiValue );
- else if ( cdiValue instanceof ICDIDoubleValue )
- return getDoubleValueString( (ICDIDoubleValue)cdiValue );
- else if ( cdiValue instanceof ICDIPointerValue )
- return getPointerValueString( (ICDIPointerValue)cdiValue );
- else if ( cdiValue instanceof ICDIReferenceValue )
- return processUnderlyingValue(((ICDIReferenceValue)cdiValue).referenceValue());
- else if ( cdiValue instanceof ICDIWCharValue )
- return getWCharValueString( (ICDIWCharValue)cdiValue );
- else
- return getGenericValueString(cdiValue.getValueString());
- }
- return null;
- }
-
- private String getBoolValueString( ICDIBoolValue value ) throws CDIException {
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- short byteValue = value.shortValue();
- if (byteValue == 0)
- return "false";//$NON-NLS-1$
- else if (byteValue == 1)
- return "true";//$NON-NLS-1$
- else
- return Integer.toString( value.shortValue() );
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return Integer.toString( value.shortValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toHexString( value.shortValue() ) : Integer.toHexString( (byte)value.byteValue() );
- sb.append( (stringValue.length() > 2) ? stringValue.substring( stringValue.length() - 2 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toOctalString( value.shortValue() ) : Integer.toOctalString( (byte)value.byteValue() );
- stringValue = (stringValue.length() > 3) ? stringValue.substring( stringValue.length() - 3 ) : stringValue;
- sb.append( (stringValue.length() == 3 && stringValue.charAt( 0 ) >= '4') ? (char)(stringValue.charAt( 0 ) - 4) + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toBinaryString( value.shortValue() ) : Integer.toBinaryString( (byte)value.byteValue() );
- sb.append( (stringValue.length() > 8) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getCharValueString( ICDICharValue value ) throws CDIException {
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- byte byteValue = (byte)value.byteValue();
- switch (byteValue) {
- case '\b':
- return "'\\b'"; //$NON-NLS-1$
- case '\t':
- return "'\\t'"; //$NON-NLS-1$
- case '\n':
- return "'\\n'"; //$NON-NLS-1$
- case '\f':
- return "'\\f'"; //$NON-NLS-1$
- case '\r':
- return "'\\r'"; //$NON-NLS-1$
- }
-
- if (Character.isISOControl(byteValue))
- return Byte.toString(byteValue);
- else if (byteValue < 0)
- return isUnsigned() ? Short.toString(value.shortValue()) : Byte.toString(byteValue);
-
- return new String( new byte[]{ '\'', byteValue, '\'' } );
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return (isUnsigned()) ? Integer.toString( value.shortValue() ) : Integer.toString( (byte)value.byteValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toHexString( value.shortValue() ) : Integer.toHexString( (byte)value.byteValue() );
- sb.append( (stringValue.length() > 2) ? stringValue.substring( stringValue.length() - 2 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toOctalString( value.shortValue() ) : Integer.toOctalString( (byte)value.byteValue() );
- stringValue = (stringValue.length() > 3) ? stringValue.substring( stringValue.length() - 3 ) : stringValue;
- sb.append( (stringValue.length() == 3 && stringValue.charAt( 0 ) >= '4') ? (char)(stringValue.charAt( 0 ) - 4) + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Integer.toBinaryString( value.shortValue() ) : Integer.toBinaryString( (byte)value.byteValue() );
- sb.append( (stringValue.length() > 8) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getShortValueString( ICDIShortValue value ) throws CDIException {
- CVariableFormat format = getParentVariable().getFormat();
-
- if (CVariableFormat.NATURAL.equals(format)) {
- format = getNaturalFormat(value, CVariableFormat.DECIMAL);
- }
-
- if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return (isUnsigned()) ? Integer.toString( value.intValue() ) : Short.toString( value.shortValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = Integer.toHexString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- sb.append( (stringValue.length() > 4) ? stringValue.substring( stringValue.length() - 4 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = Integer.toOctalString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- stringValue = (stringValue.length() > 6) ? stringValue.substring( stringValue.length() - 6 ) : stringValue;
- sb.append( (stringValue.length() == 6 && stringValue.charAt( 0 ) >= '2') ? (char)((stringValue.charAt( 0 ) - '0') % 2 + '0') + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Integer.toBinaryString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- sb.append( (stringValue.length() > 16) ? stringValue.substring( stringValue.length() - 16 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getIntValueString( ICDIIntValue value ) throws CDIException {
- CVariableFormat format = getParentVariable().getFormat();
-
- if (CVariableFormat.NATURAL.equals(format)) {
- format = getNaturalFormat(value, CVariableFormat.DECIMAL);
- }
-
- if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return (isUnsigned()) ? Long.toString( value.longValue() ) : Integer.toString( value.intValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toHexString( value.longValue() ) : Integer.toHexString( value.intValue() );
- sb.append( (stringValue.length() > 8) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toOctalString( value.longValue() ) : Integer.toOctalString( value.intValue() );
- stringValue = (stringValue.length() > 11) ? stringValue.substring( stringValue.length() - 11 ) : stringValue;
- sb.append( (stringValue.length() == 11 && stringValue.charAt( 0 ) >= '4') ? (char)(stringValue.charAt( 0 ) - 4) + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toBinaryString( value.longValue() ) : Integer.toBinaryString( value.intValue() );
- sb.append( (stringValue.length() > 32) ? stringValue.substring( stringValue.length() - 32 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getLongValueString( ICDILongValue value ) throws CDIException {
- try {
- CVariableFormat format = getParentVariable().getFormat();
-
- if (CVariableFormat.NATURAL.equals(format)) {
- format = getNaturalFormat(value, CVariableFormat.DECIMAL);
- }
-
- if ( CVariableFormat.DECIMAL.equals( format ) ) {
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- return bigValue.toString();
- }
- return Integer.toString( value.intValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 16 ) );
- }
- else
- sb.append( Integer.toHexString( value.intValue() ) );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 8 ) );
- }
- else
- sb.append( Integer.toOctalString( value.intValue() ) );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 2 ) );
- }
- else
- sb.append( Integer.toBinaryString( value.intValue() ) );
- return sb.toString();
- }
- }
- catch( NumberFormatException e ) {
- }
- return null;
- }
-
- private String getLongLongValueString( ICDILongLongValue value ) throws CDIException {
- try {
- CVariableFormat format = getParentVariable().getFormat();
-
- if (CVariableFormat.NATURAL.equals(format)) {
- format = getNaturalFormat(value, CVariableFormat.DECIMAL);
- }
-
- if ( CVariableFormat.DECIMAL.equals( format ) ) {
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- return bigValue.toString();
- }
- return Long.toString( value.longValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 16 ) );
- }
- else
- sb.append( Long.toHexString( value.longValue() ) );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 8 ) );
- }
- else
- sb.append( Long.toOctalString( value.longValue() ) );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- if ( isUnsigned() ) {
- BigInteger bigValue = new BigInteger( value.getValueString() );
- sb.append( bigValue.toString( 2 ) );
- }
- else
- sb.append( Long.toBinaryString( value.longValue() ) );
- return sb.toString();
- }
- }
- catch( NumberFormatException e ) {
- }
- return null;
- }
-
- private String getGenericValueString(String svalue) throws CDIException {
- try {
- BigInteger bigValue = new BigInteger(svalue);
- CVariableFormat format = getParentVariable().getFormat();
- if (CVariableFormat.NATURAL.equals(format)) {
- format = CVariableFormat.DECIMAL;
- }
- if (CVariableFormat.DECIMAL.equals(format)) {
- return svalue;
- } else if (CVariableFormat.HEXADECIMAL.equals(format)) {
- StringBuffer sb = new StringBuffer("0x"); //$NON-NLS-1$
- if (isUnsigned()) {
- sb.append(bigValue.toString(16));
- } else
- sb.append(Long.toHexString(bigValue.longValue()));
- return sb.toString();
- } else if (CVariableFormat.OCTAL.equals(format)) {
- StringBuffer sb = new StringBuffer("0"); //$NON-NLS-1$
- if (isUnsigned()) {
- sb.append(bigValue.toString(8));
- } else
- sb.append(Long.toOctalString(bigValue.longValue()));
- return sb.toString();
- } else if (CVariableFormat.BINARY.equals(format)) {
- StringBuffer sb = new StringBuffer("0b"); //$NON-NLS-1$
- if (isUnsigned()) {
- sb.append(bigValue.toString(2));
- } else
- sb.append(Long.toBinaryString(bigValue.longValue()));
- return sb.toString();
- }
- } catch (NumberFormatException e) {
- }
- return svalue;
- }
-
-
- private String getFloatValueString( ICDIFloatValue value ) throws CDIException {
- float floatValue = value.floatValue();
- if ( Float.isNaN(floatValue) )
- return "NaN"; //$NON-NLS-1$
- if ( Float.isInfinite(floatValue) )
- return "inf"; //$NON-NLS-1$
-
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- return Float.toString( floatValue );
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return Long.toString( Float.floatToIntBits(floatValue) );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = Long.toHexString( Float.floatToIntBits(floatValue) );
- sb.append( (stringValue.length() > 8) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = Long.toOctalString( Float.floatToIntBits(floatValue) );
- stringValue = (stringValue.length() > 11) ? stringValue.substring( stringValue.length() - 11 ) : stringValue;
- sb.append( (stringValue.length() == 11 && stringValue.charAt( 0 ) >= '4') ? (char)(stringValue.charAt( 0 ) - 4) + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Long.toBinaryString( Float.floatToIntBits(floatValue) );
- sb.append( (stringValue.length() > 32) ? stringValue.substring( stringValue.length() - 32 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getDoubleValueString( ICDIDoubleValue value ) throws CDIException {
- double doubleValue = value.doubleValue();
- if ( Double.isNaN(doubleValue) )
- return "NaN"; //$NON-NLS-1$
- if ( Double.isInfinite(doubleValue) )
- return "inf"; //$NON-NLS-1$
-
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- return Double.toString(doubleValue);
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return Long.toString( Double.doubleToLongBits(doubleValue) );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = Long.toHexString( Double.doubleToLongBits(doubleValue) );
- sb.append( (stringValue.length() > 16) ? stringValue.substring( stringValue.length() - 16 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = Long.toOctalString( Double.doubleToLongBits(doubleValue) );
- stringValue = (stringValue.length() > 22) ? stringValue.substring( stringValue.length() - 22 ) : stringValue;
- sb.append( (stringValue.length() == 22 && stringValue.charAt( 0 ) >= '2') ? (char)((stringValue.charAt( 0 ) - '0') % 2 + '0') + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Long.toBinaryString( Double.doubleToLongBits(doubleValue) );
- sb.append( (stringValue.length() > 64) ? stringValue.substring( stringValue.length() - 64 ) : stringValue );
- return sb.toString();
- }
- return null;
- }
-
- private String getPointerValueString( ICDIPointerValue value ) throws CDIException {
- //TODO:IPF_TODO Workaround to solve incorrect handling of structures referenced by pointers or references
- IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
- BigInteger pv = value.pointerValue();
- if ( pv == null )
- return ""; //$NON-NLS-1$
- IAddress address = factory.createAddress( pv );
- if ( address == null )
- return ""; //$NON-NLS-1$
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) || CVariableFormat.HEXADECIMAL.equals( format ) )
- return address.toHexAddressString();
- else if ( CVariableFormat.DECIMAL.equals( format ) )
- return address.toString();
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- // Using the instanceof operator here to avoid API change
- // Add IAddress.toOctalAddressString() in a future CDT release
- if (address instanceof Addr32) {
- return ((Addr32)address).toOctalAddressString();
- } else if (address instanceof Addr64) {
- return ((Addr64)address).toOctalAddressString();
- } else {
- // Fall back to hexadecimal address format
- return address.toHexAddressString();
- }
- } else if ( CVariableFormat.BINARY.equals( format ) )
- return address.toBinaryAddressString();
- return null;
- }
-
- private String getWCharValueString( ICDIWCharValue value ) throws CDIException {
- if ( getParentVariable() instanceof CVariable ) {
- int size = ((CVariable)getParentVariable()).sizeof();
- if ( size == 2 ) {
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- ByteBuffer buffer = ByteBuffer.allocate(4);
- buffer.putInt(value.intValue());
- buffer.position(2);
- String stringValue;
- try {
- stringValue = new String(CDebugUtils.getCharsetDecoder().decode(buffer).array());
- } catch (CharacterCodingException e) {
- stringValue = e.toString();
- }
- StringBuffer sb = new StringBuffer("'"); //$NON-NLS-1$
- sb.append(stringValue);
- sb.append('\'');
- return sb.toString();
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return (isUnsigned()) ? Integer.toString( value.intValue() ) : Short.toString( value.shortValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = Integer.toHexString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- sb.append( (stringValue.length() > 4) ? stringValue.substring( stringValue.length() - 4 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = Integer.toOctalString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- stringValue = (stringValue.length() > 6) ? stringValue.substring( stringValue.length() - 6 ) : stringValue;
- sb.append( (stringValue.length() == 6 && stringValue.charAt( 0 ) >= '2') ? (char)((stringValue.charAt( 0 ) - '0') % 2 + '0') + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Integer.toBinaryString( (isUnsigned()) ? value.intValue() : value.shortValue() );
- sb.append( (stringValue.length() > 16) ? stringValue.substring( stringValue.length() - 16 ) : stringValue );
- return sb.toString();
- }
- }
- if ( size == 4 ) {
- CVariableFormat format = getParentVariable().getFormat();
- if ( CVariableFormat.NATURAL.equals( format ) ) {
- ByteBuffer buffer = ByteBuffer.allocate(8);
- buffer.putLong(value.longValue());
- buffer.position(4);
- String stringValue;
- try {
- stringValue = new String(CDebugUtils.getCharsetDecoder().decode(buffer).array());
- } catch (CharacterCodingException e) {
- stringValue = e.toString();
- }
- StringBuffer sb = new StringBuffer("'"); //$NON-NLS-1$
- sb.append(stringValue);
- sb.append('\'');
- return sb.toString();
- }
- else if ( CVariableFormat.DECIMAL.equals( format ) ) {
- return (isUnsigned()) ? Long.toString( value.longValue() ) : Integer.toString( value.intValue() );
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toHexString( value.longValue() ) : Integer.toHexString( value.intValue() );
- sb.append( (stringValue.length() > 8) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toOctalString( value.longValue() ) : Integer.toOctalString( value.intValue() );
- stringValue = (stringValue.length() > 11) ? stringValue.substring( stringValue.length() - 11 ) : stringValue;
- sb.append( (stringValue.length() == 11 && stringValue.charAt( 0 ) >= '4') ? (char)(stringValue.charAt( 0 ) - 4) + stringValue.substring( 1 ) : stringValue );
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = (isUnsigned()) ? Long.toBinaryString( value.longValue() ) : Integer.toBinaryString( value.intValue() );
- sb.append( (stringValue.length() > 32) ? stringValue.substring( stringValue.length() - 32 ) : stringValue );
- return sb.toString();
- }
- }
- }
- return value.getValueString();
- }
-
- private String getBigIntegerValueString( ICDIBigIntegerValue value ) throws CDIException {
- try {
- CVariableFormat format = getParentVariable().getFormat();
-
- if (CVariableFormat.NATURAL.equals(format)) {
- format = getNaturalFormat(value, CVariableFormat.DECIMAL);
- }
-
- if ( CVariableFormat.DECIMAL.equals( format ) ) {
- BigInteger bigValue = value.bigIntegerValue();
- return bigValue.toString(10);
- }
- else if ( CVariableFormat.HEXADECIMAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer("0x"); //$NON-NLS-1$
- sb.append(value.bigIntegerValue().toString(16));
- return sb.toString();
- }
- else if ( CVariableFormat.OCTAL.equals( format ) ) {
- StringBuffer sb = new StringBuffer("0"); //$NON-NLS-1$
- sb.append(value.bigIntegerValue().toString(8));
- return sb.toString();
- }
- else if ( CVariableFormat.BINARY.equals( format ) ) {
- StringBuffer sb = new StringBuffer("0b"); //$NON-NLS-1$
- sb.append(value.bigIntegerValue().toString(2));
- return sb.toString();
- }
- }
- catch( NumberFormatException e ) {
- }
- return null;
- }
- private boolean isUnsigned() {
- boolean result = false;
- try {
- ICType type = getParentVariable().getType();
- if ( type != null )
- result = type.isUnsigned();
- }
- catch( DebugException e ) {
- }
- return result;
- }
-
- /**
- * Invalidates the string cache.
- */
- @Override
- protected void reset() {
- resetStatus();
- fValueString = null;
- for (AbstractCVariable var : fVariables) {
- var.resetValue();
- }
- }
-
- @Override
- public ICType getType() throws DebugException {
- ICDIValue cdiValue = getUnderlyingValue();
- if ( fType == null ) {
- if ( cdiValue != null ) {
- synchronized( this ) {
- if ( fType == null ) {
- try {
- fType = new CType( cdiValue.getType() );
- }
- catch( CDIException e ) {
- requestFailed( e.getMessage(), null );
- }
- }
- }
- }
- }
- return fType;
-// AbstractCVariable var = getParentVariable();
-// return ( var instanceof CVariable ) ? ((CVariable)var).getType() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#preserve()
- */
- @Override
- protected void preserve() {
- setChanged( false );
- resetStatus();
- for (AbstractCVariable var : fVariables) {
- var.preserve();
- }
- }
-
- private static CVariableFormat getNaturalFormat(ICDIValue value, CVariableFormat defaultFormat) throws CDIException {
- if (value instanceof ICDIFormattable) {
- int naturalFormat = ((ICDIFormattable)value).getNaturalFormat();
- switch (naturalFormat) {
- case ICDIFormat.DECIMAL:
- return CVariableFormat.DECIMAL;
- case ICDIFormat.BINARY:
- return CVariableFormat.BINARY;
- case ICDIFormat.OCTAL:
- return CVariableFormat.OCTAL;
- case ICDIFormat.HEXADECIMAL:
- return CVariableFormat.HEXADECIMAL;
- }
- }
- return defaultFormat;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValueFactory.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValueFactory.java
deleted file mode 100644
index 9db5e6efdbf..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValueFactory.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointValue;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * The value factory for variable and expressions.
- */
-public class CValueFactory {
-
- static public final ICValue NULL_VALUE = new ICValue() {
-
- @Override
- public String getReferenceTypeName() throws DebugException {
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public String getValueString() throws DebugException {
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public boolean isAllocated() throws DebugException {
- return true;
- }
-
- @Override
- public IVariable[] getVariables() throws DebugException {
- return new IVariable[0];
- }
-
- @Override
- public boolean hasVariables() throws DebugException {
- return false;
- }
-
- @Override
- public String getModelIdentifier() {
- return CDebugCorePlugin.getUniqueIdentifier();
- }
-
- @Override
- public IDebugTarget getDebugTarget() {
- return null;
- }
-
- @Override
- public ILaunch getLaunch() {
- return null;
- }
-
- @Override
- public Object getAdapter( Class adapter ) {
- return null;
- }
-
- @Override
- public ICType getType() throws DebugException {
- return null;
- }
-
- @Override
- public String evaluateAsExpression( ICStackFrame frame ) {
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public CDebugElementState getState() {
- return CDebugElementState.UNDEFINED;
- }
-
- @Override
- public Object getCurrentStateInfo() {
- return null;
- }
-
- };
-
- static public CValue createValue( CVariable parent, ICDIValue cdiValue ) {
- if ( cdiValue instanceof ICDIFloatingPointValue ) {
- return new CFloatingPointValue( parent, cdiValue );
- }
- return new CValue( parent, cdiValue );
- }
-
- static public CIndexedValue createIndexedValue( AbstractCVariable parent, ICDIArrayValue cdiValue, int start, int length ) {
- return new CIndexedValue( parent, cdiValue, start, length );
- }
-
- static public CValue createGlobalValue( CVariable parent, ICDIValue cdiValue ) {
- return new CGlobalValue( parent, cdiValue );
- }
-
- static public ICValue createValueWithError( CVariable parent, String message ) {
- return new CValue( parent, message );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
deleted file mode 100644
index d905acaa68f..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
+++ /dev/null
@@ -1,941 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.ICWatchpointTarget;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration3;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.model.CVariableFormat;
-import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICType;
-import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.cdt.debug.internal.core.CSettingsManager;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IValue;
-
-/**
- * A thin wrapper over the CVariable for injection into the CDI event manager's
- * listener collection. We used to directly inject the CVariable, but that's
- * problematic since CVariable overrides the equals() method to base the
- * decision on the internal variable object. So if two CVariables were added to
- * the listener list for the same underlying value, trying to later remove one
- * of the listeners had a 50/50 chance of removing the wrong one.
- *
- * How can you end up with two CVariables for the same internal variable on the
- * listener list? Easy.
- * 1. View a register in the Registers view.
- * 2. Create a custom register group that contains the same register.
- * 3. Expand the custom register group
- * 4. Remove the custom register group
- * Step 4 removed the wrong CVariable from the listener list.
- *
- */
-class VariableEventListener implements ICDIEventListener {
- private CVariable fVar;
- public VariableEventListener(CVariable var) {
- fVar = var;
- }
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents(ICDIEvent[] events) {
- fVar.handleDebugEvents(events);
- }
-}
-
-/**
- * Represents a variable in the CDI model.
- */
-public abstract class CVariable extends AbstractCVariable implements ICDIEventListener, ICWatchpointTarget {
-
- interface IInternalVariable {
- IInternalVariable createShadow( int start, int length ) throws DebugException;
- IInternalVariable createShadow( String type ) throws DebugException;
- CType getType() throws DebugException;
- String getQualifiedName() throws DebugException;
- ICValue getValue() throws DebugException;
- void setValue( String expression ) throws DebugException;
- boolean isChanged();
- void setChanged( boolean changed );
- void dispose( boolean destroy );
- boolean isSameDescriptor( ICDIVariableDescriptor desc );
- boolean isSameVariable( ICDIVariable cdiVar );
- void resetValue();
- boolean isEditable() throws DebugException;
- boolean isArgument();
- int sizeof();
- void invalidateValue();
- void preserve();
-
- // Note: the CDI object association can change; e.g., if a "Cast to Type"
- // or "Display as Array" is done on the element.
- ICDIObject getCdiObject();
- }
-
- /**
- * Whether this variable is currently enabled.
- */
- private boolean fIsEnabled = true;
-
- /**
- * The original internal variable.
- */
- private IInternalVariable fOriginal;
-
- /**
- * The shadow internal variable used for casting.
- */
- private IInternalVariable fShadow;
-
- /**
- * The name of this variable.
- */
- private String fName;
-
- /**
- * The current format of this variable.
- */
- private CVariableFormat fFormat = CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) );
-
- /**
- * Whether this variable has been disposed.
- */
- private boolean fIsDisposed = false;
-
- /**
- * Thin wrapper for instertion into the CDI event manager's listener list
- */
- private VariableEventListener fEventListenerWrapper;
-
- /**
- * Constructor for CVariable.
- */
- protected CVariable( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject ) {
- super( parent );
- fEventListenerWrapper = new VariableEventListener(this);
- if ( cdiVariableObject != null ) {
- setName( cdiVariableObject.getName() );
- createOriginal( cdiVariableObject );
- }
- fIsEnabled = ( parent instanceof AbstractCValue ) ? ((AbstractCValue)parent).getParentVariable().isEnabled() : !isBookkeepingEnabled();
- getCDISession().getEventManager().addEventListener( fEventListenerWrapper );
- if ( cdiVariableObject != null ) {
- setInitialFormat();
- }
- }
-
- /**
- * Constructor for CVariable.
- */
- protected CVariable( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject, String errorMessage ) {
- super( parent );
- fEventListenerWrapper = new VariableEventListener(this);
- if ( cdiVariableObject != null ) {
- setName( cdiVariableObject.getName() );
- createOriginal( cdiVariableObject );
- }
- fIsEnabled = !isBookkeepingEnabled();
- setStatus( ICDebugElementStatus.ERROR, MessageFormat.format( CoreModelMessages.getString( "CVariable.1" ), new String[]{ errorMessage } ) ); //$NON-NLS-1$
- getCDISession().getEventManager().addEventListener( fEventListenerWrapper );
- if ( cdiVariableObject != null ) {
- setInitialFormat();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICVariable#getType()
- */
- @Override
- public ICType getType() throws DebugException {
- if ( isDisposed() )
- return null;
- IInternalVariable iv = getCurrentInternalVariable();
- return ( iv != null ) ? iv.getType() : null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICVariable#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return fIsEnabled;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICVariable#setEnabled(boolean)
- */
- @Override
- public void setEnabled( boolean enabled ) throws DebugException {
- // Debugger engines that use active variable objects will benefit
- // performance-wise if we dispose the internal variable when it's
- // disabled by the user (it will automatically get lazily recreated if
- // it's ever needed again). Engines using passive variables probably
- // won't, so we can defer the dispose until we have no use for the
- // variable altogether.
- boolean disposeVariable = true;
- ICDITargetConfiguration configuration = getParent().getCDITarget().getConfiguration();
- if (configuration instanceof ICDITargetConfiguration2) {
- disposeVariable = !((ICDITargetConfiguration2)configuration).supportsPassiveVariableUpdate();
- }
- if (disposeVariable) {
- IInternalVariable iv = getOriginal();
- if ( iv != null )
- iv.dispose( true );
- iv = getShadow();
- if ( iv != null )
- iv.dispose( true );
- }
- fIsEnabled = enabled;
- fireChangeEvent( DebugEvent.STATE );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICVariable#canEnableDisable()
- */
- @Override
- public boolean canEnableDisable() {
- return !( getParent() instanceof IValue );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICVariable#isArgument()
- */
- @Override
- public boolean isArgument() {
- IInternalVariable iv = getOriginal();
- return ( iv != null ) ? iv.isArgument() : false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IVariable#getValue()
- */
- @Override
- public IValue getValue() throws DebugException {
- if ( !isDisposed() && isEnabled() ) {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- try {
- return iv.getValue();
- }
- catch( DebugException e ) {
- setStatus( ICDebugElementStatus.ERROR, e.getMessage() );
- }
- }
- }
- return CValueFactory.NULL_VALUE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IVariable#getName()
- */
- @Override
- public String getName() throws DebugException {
- return fName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
- */
- @Override
- public String getReferenceTypeName() throws DebugException {
- ICType type = getType();
- return ( type != null ) ? type.getName() : ""; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
- */
- @Override
- public boolean hasValueChanged() throws DebugException {
- if ( isDisposed() )
- return false;
- IInternalVariable iv = getCurrentInternalVariable();
- return ( iv != null ) ? iv.isChanged() : false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.IFormatSupport#supportsFormatting()
- */
- @Override
- public boolean supportsFormatting() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.IFormatSupport#getFormat()
- */
- @Override
- public CVariableFormat getFormat() {
- return fFormat;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.IFormatSupport#changeFormat(org.eclipse.cdt.debug.core.model.CVariableFormat)
- */
- @Override
- public void changeFormat( CVariableFormat format ) throws DebugException {
- setFormat( format );
- storeFormat( format );
- resetValue();
- }
-
- /*
- * (non-Javadoc)
- * Allow this operation only for the pointer types (???).
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToArray#canCastToArray()
- */
- @Override
- public boolean canCastToArray() {
- ICType type;
- try {
- type = getType();
- return ( getOriginal() != null && isEnabled() && type != null && type.isPointer() );
- }
- catch( DebugException e ) {
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToArray#castToArray(int, int)
- */
- @Override
- public void castToArray( int startIndex, int length ) throws DebugException {
- IInternalVariable current = getCurrentInternalVariable();
- if ( current != null ) {
- IInternalVariable newVar = current.createShadow( startIndex, length );
- if ( getShadow() != null )
- getShadow().dispose( true );
- setShadow( newVar );
- // If casting of variable to a type or array causes an error, the status
- // of the variable is set to "error" and it can't be reset by subsequent castings.
- resetValue();
- storeCastToArray( startIndex, length );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
- */
- @Override
- public void setValue( String expression ) throws DebugException {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- String newExpression = processExpression( expression );
- iv.setValue( newExpression );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
- */
- @Override
- public void setValue( IValue value ) throws DebugException {
- notSupported( CoreModelMessages.getString( "CVariable.3" ) ); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
- */
- @Override
- public boolean supportsValueModification() {
- try {
- return fIsEnabled ? getCurrentInternalVariable().isEditable() : false;
- }
- catch( DebugException e ) {
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
- */
- @Override
- public boolean verifyValue( String expression ) throws DebugException {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
- */
- @Override
- public boolean verifyValue( IValue value ) throws DebugException {
- return value.getDebugTarget().equals( getDebugTarget() );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToType#canCast()
- */
- @Override
- public boolean canCast() {
- return ( getOriginal() != null && isEnabled() );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToType#getCurrentType()
- */
- @Override
- public String getCurrentType() {
- String typeName = ""; //$NON-NLS-1$
- try {
- typeName = getReferenceTypeName();
- }
- catch( DebugException e ) {
- }
- return typeName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToType#cast(java.lang.String)
- */
- @Override
- public void cast( String type ) throws DebugException {
- IInternalVariable current = getCurrentInternalVariable();
- if ( current != null ) {
- IInternalVariable newVar = current.createShadow( type );
- if ( getShadow() != null )
- getShadow().dispose( true );
- setShadow( newVar );
- // If casting of variable to a type or array causes an error, the status
- // of the variable is set to "error" and it can't be reset by subsequent castings.
- resetValue();
- storeCast(type);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToType#restoreOriginal()
- */
- @Override
- public void restoreOriginal() throws DebugException {
- IInternalVariable oldVar = getShadow();
- setShadow( null );
- if ( oldVar != null )
- oldVar.dispose( true );
- IInternalVariable iv = getOriginal();
- if ( iv != null )
- iv.invalidateValue();
- // If casting of variable to a type or array causes an error, the status
- // of the variable is set to "error" and it can't be reset by subsequent castings.
- resetValue();
- forgetCast();
- forgetCastToArray();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.ICastToType#isCasted()
- */
- @Override
- public boolean isCasted() {
- return ( getShadow() != null );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv == null )
- return;
- for( int i = 0; i < events.length; i++ ) {
- ICDIEvent event = events[i];
- ICDIObject source = event.getSource();
- if ( source == null )
- continue;
- ICDITarget target = source.getTarget();
- if ( target.equals( getCDITarget() ) ) {
- if ( event instanceof ICDIMemoryChangedEvent &&
- target.getConfiguration() instanceof ICDITargetConfiguration3 &&
- ((ICDITargetConfiguration3)target.getConfiguration()).needsVariablesUpdated(event)) {
- resetValue();
- }
- else if ( event instanceof ICDIChangedEvent ) {
- if ( source instanceof ICDIVariable && iv.isSameVariable( (ICDIVariable)source ) ) {
- handleChangedEvent( (ICDIChangedEvent)event );
- }
- }
- else if ( event instanceof ICDIResumedEvent ) {
- handleResumedEvent( (ICDIResumedEvent)event );
- }
- else if (event instanceof ICDIDestroyedEvent
- && iv.getCdiObject() == source) {
- dispose();
- fireChangeEvent(DebugEvent.STATE);
- }
- }
- }
- }
-
- private void handleResumedEvent( ICDIResumedEvent event ) {
- boolean changed = false;
- if ( hasErrors() ) {
- resetStatus();
- changed = true;
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null )
- iv.invalidateValue();
- }
- if ( changed )
- fireChangeEvent( DebugEvent.STATE );
- }
-
- private void handleChangedEvent( ICDIChangedEvent event ) {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- iv.setChanged( true );
- fireChangeEvent( DebugEvent.STATE );
- }
- }
-
- private IInternalVariable getCurrentInternalVariable() {
- if ( getShadow() != null )
- return getShadow();
- return getOriginal();
- }
-
- private IInternalVariable getOriginal() {
- return fOriginal;
- }
-
- protected void setOriginal( IInternalVariable original ) {
- fOriginal = original;
- }
-
- private IInternalVariable getShadow() {
- return fShadow;
- }
-
- private void setShadow( IInternalVariable shadow ) {
- fShadow = shadow;
- }
-
- protected boolean isBookkeepingEnabled() {
- boolean result = false;
- try {
- result = getLaunch().getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false );
- }
- catch( CoreException e ) {
- }
- return result;
- }
-
- abstract protected void createOriginal( ICDIVariableDescriptor vo );
-
- protected boolean hasErrors() {
- return !isOK();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#setChanged(boolean)
- */
- @Override
- protected void setChanged( boolean changed ) {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- iv.setChanged( changed );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#resetValue()
- */
- @Override
- protected void resetValue() {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- resetStatus();
- iv.resetValue();
- fireChangeEvent( DebugEvent.STATE );
- }
- }
-
- private String processExpression( String oldExpression ) {
- return oldExpression;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
- */
- @Override
- public void dispose() {
- // Hack: do not destroy local variables
- internalDispose( false );
- setDisposed( true );
- }
-
- public int sizeof() {
- IInternalVariable iv = getCurrentInternalVariable();
- return ( iv != null ) ? iv.sizeof() : -1;
- }
-
- /**
- * Compares the original internal variables.
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( obj instanceof CVariable ) {
- // A disposed copy can be stored in the viewer.
- // false should be returned to force the viewer to
- // replace it by a new variable. See bug #115385
- if ( isDisposed() != ((CVariable)obj).isDisposed() )
- return false;
- IInternalVariable iv = getOriginal();
- return ( iv != null ) ? iv.equals( ((CVariable)obj).getOriginal() ) : false;
- }
- return false;
- }
-
- protected boolean sameVariable( ICDIVariableDescriptor vo ) {
- IInternalVariable iv = getOriginal();
- return ( iv != null && iv.isSameDescriptor( vo ) );
- }
-
- protected void setFormat( CVariableFormat format ) {
- fFormat = format;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.ICVariable#getExpressionString()
- */
- @Override
- public String getExpressionString() throws DebugException {
- IInternalVariable iv = getCurrentInternalVariable();
- return ( iv != null ) ? iv.getQualifiedName() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#preserve()
- */
- @Override
- protected void preserve() {
- resetStatus();
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null )
- iv.preserve();
- }
-
- protected void internalDispose( boolean destroy ) {
- getCDISession().getEventManager().removeEventListener( fEventListenerWrapper );
- IInternalVariable iv = getOriginal();
- if ( iv != null )
- iv.dispose( destroy );
- iv = getShadow();
- if ( iv != null )
- iv.dispose( destroy );
- }
-
- protected boolean isDisposed() {
- return fIsDisposed;
- }
-
- protected void setDisposed( boolean isDisposed ) {
- fIsDisposed = isDisposed;
- }
-
- protected void invalidateValue() {
- resetStatus();
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null )
- iv.invalidateValue();
- }
-
- protected void setName( String name ) {
- fName = name;
- }
-
- public ICDIObject getCdiObject() {
- IInternalVariable iv = getCurrentInternalVariable();
- if ( iv != null ) {
- return iv.getCdiObject();
- }
- return null;
- }
-
- protected CSettingsManager getFormatManager() {
- return ((CDebugTarget) getDebugTarget()).getFormatManager();
- }
-
- /**
- * used to concatenate multiple names to a single identifier
- */
- private final static String NAME_PART_SEPARATOR = "-"; //$NON-NLS-1$
-
- /**
- * suffix used to identify format informations
- */
- private final static String FORMAT_SUFFIX = NAME_PART_SEPARATOR + "(format)"; //$NON-NLS-1$
-
- /**
- * suffix used to identify cast settings
- */
- private final static String CAST_SUFFIX = NAME_PART_SEPARATOR + "(cast)"; //$NON-NLS-1$
-
- /**
- * suffix used to identify cast to array settings
- */
- private final static String CAST_TO_ARRAY_SUFFIX = NAME_PART_SEPARATOR + "(cast_to_array)"; //$NON-NLS-1$
-
- /** retrieve the identification for this variable.
- * @return a string identifying this variable, to be used to store settings
- * @throws DebugException
- */
- String getVariableID() throws DebugException {
- return getName(); // TODO: better identification if multiple variables have the same name
- }
-
- /** helper to generate a string id used to persist the settings.
- * @param next_obj next object to encode into the id
- * @param buf contains the id of the part encoded so far.
- * @throws DebugException
- */
- static private void buildPesistID( CDebugElement next_obj, StringBuffer buf ) throws DebugException {
- if ( next_obj instanceof CVariable ) {
- CVariable cVariableParent = (CVariable) next_obj;
- buf.append( NAME_PART_SEPARATOR );
- buf.append( cVariableParent.getVariableID() );
- buildPesistID( cVariableParent.getParent(), buf );
- } else if ( next_obj instanceof CStackFrame ) {
- buf.append(NAME_PART_SEPARATOR);
- // TODO: better identification if multiple functions have the same name (say for static functions)
- buf.append( ((CStackFrame)next_obj ).getFunction() );
- } else if ( next_obj instanceof CDebugTarget ) {
- // global, we use a root NAME_PART_SEPARATOR as indicator of that
- buf.append( NAME_PART_SEPARATOR );
- } else if ( next_obj instanceof AbstractCValue ) {
- // index or indirection.
- AbstractCValue av = (AbstractCValue) next_obj;
- buildPesistID( av.getParentVariable(), buf );
- }
- }
-
- /** returns an string used to identify this variable
- * @return
- * @throws DebugException
- */
- private final String getPersistID() throws DebugException {
- StringBuffer id = new StringBuffer();
- id.append( getVariableID() );
- buildPesistID( getParent(), id );
- return id.toString();
- }
-
- /** stores the given format
- * @param format the format to be used for this variable
- */
- protected void storeFormat( CVariableFormat format ) {
- try {
- String formatString = Integer.toString( format.getFormatNumber() );
-
- getFormatManager().putValue( getPersistID() + FORMAT_SUFFIX, formatString );
- } catch ( DebugException e ) {
- // if we do not get the name, we use the default format, no reason for the creation to fail too.
- DebugPlugin.log( e );
- }
- }
-
- /** stores the cast information.
- * @param type the type to be displayed instead
- */
- protected void storeCast( String type ) {
- try {
- String id = getPersistID() + CAST_SUFFIX;
- getFormatManager().putValue( id, type );
- } catch ( DebugException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /** drops the cast information.
- */
- protected void forgetCast() {
- try {
- String id = getPersistID() + CAST_SUFFIX;
- getFormatManager().removeValue( id );
- } catch ( DebugException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /** stores the cast array information.
- * @param startIndex the first item to be displayed in the cast array operation
- * @param length the number of elements to display
- */
- protected void storeCastToArray(int startIndex, int length) {
- try {
- // we persist the information in a (startIndex):(Length) format.
- String content = Integer.toString( startIndex ) + ":" + Integer.toString( length ); //$NON-NLS-1$
- getFormatManager().putValue( getPersistID() + CAST_TO_ARRAY_SUFFIX, content );
- } catch ( DebugException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /** drops previously stored cast array information.
- */
- protected void forgetCastToArray() {
- try {
- String id = getPersistID() + CAST_TO_ARRAY_SUFFIX;
- getFormatManager().removeValue( id );
- } catch ( DebugException e ) {
- DebugPlugin.log( e );
- }
- }
-
- /**
- * restore the format stored previously for this variable.
- * Only sets explicitly retrieved formats in order to maintain defaults.
- */
- protected void setInitialFormat() {
- try {
- String persistID= getPersistID();
- String stringFormat = getFormatManager().getValue( persistID + FORMAT_SUFFIX );
- if ( stringFormat != null ) {
- try {
- CVariableFormat format = CVariableFormat.getFormat( Integer.parseInt( stringFormat ) );
- setFormat( format );
- } catch ( NumberFormatException e ) {
- DebugPlugin.log( e );
- }
- }
-
- if ( canCast() ) {
- String castString = getFormatManager().getValue( persistID + CAST_SUFFIX );
- if ( castString != null ) {
- cast( castString );
- }
- }
- if ( canCastToArray() ) {
- String castToArrayString = getFormatManager().getValue( persistID + CAST_TO_ARRAY_SUFFIX );
- if (castToArrayString != null) {
- int index = castToArrayString.indexOf( ':' );
- if ( index > 0 ) {
- try {
- int beg = Integer.parseInt( castToArrayString.substring( 0, index ) );
- int num = Integer.parseInt( castToArrayString.substring( index + 1 ) );
- castToArray( beg, num );
- } catch ( NumberFormatException e ) {
- DebugPlugin.log( e );
- }
- } else {
- DebugPlugin.logMessage( "did not find expected : for cast to array", null ); //$NON-NLS-1$
- }
- }
- }
- } catch ( DebugException e ) {
- DebugPlugin.log( e );
- // we drop (and log) the exception here.
- // even if the initial setup fails, we still want the complete creation to be successful
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.IWatchpointTarget#getExpression()
- */
- @Override
- public String getExpression() {
- try {
- return getExpressionString();
- } catch (DebugException e) {
- return ""; //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.IWatchpointTarget#getSize()
- */
- @Override
- public void getSize(ICWatchpointTarget.GetSizeRequest request) {
- // CDI has synchronous APIs, so this is easy...
- request.setSize(sizeof());
- request.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.core.IWatchpointTarget#canCreateWatchpoint(org.eclipse.cdt.debug.internal.core.IWatchpointTarget.CanCreateWatchpointRequest)
- */
- @Override
- public void canSetWatchpoint(ICWatchpointTarget.CanCreateWatchpointRequest request) {
- // CDI has synchronous APIs, so this is easy...
- request.setCanCreate(sizeof() > 0);
- request.done();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java
deleted file mode 100644
index 1dd3f640f7b..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.cdt.core.IBinaryParser.ISymbol;
-import org.eclipse.cdt.core.model.IBinaryModule;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Provides factory methods for the variable types.
- */
-public class CVariableFactory {
-
- public static CLocalVariable createLocalVariable( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject ) {
- return new CLocalVariable( parent, cdiVariableObject );
- }
-
- public static CLocalVariable createLocalVariableWithError( CDebugElement parent, ICDIVariableDescriptor cdiVariableObject, String message ) {
- return new CLocalVariable( parent, cdiVariableObject, message );
- }
-
- public static IGlobalVariableDescriptor createGlobalVariableDescriptor( final String name, final IPath path ) {
-
- return new IGlobalVariableDescriptor() {
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public IPath getPath() {
- return ( path != null ) ? path : new Path( "" ); //$NON-NLS-1$
- }
-
- @Override
- public String toString() {
- return MessageFormat.format( "{0}::{1}", new String[] { getPath().toOSString(), getName() } ); //$NON-NLS-1$
- }
-
- @Override
- public boolean equals( Object obj ) {
- if ( !(obj instanceof IGlobalVariableDescriptor) )
- return false;
- IGlobalVariableDescriptor d = (IGlobalVariableDescriptor)obj;
- return ( getName().compareTo( d.getName() ) == 0 && getPath().equals( d.getPath() ) );
- }
- };
- }
-
- public static IGlobalVariableDescriptor createGlobalVariableDescriptor( final org.eclipse.cdt.core.model.IVariable var ) {
- IPath path = new Path( "" ); //$NON-NLS-1$
- ICElement parent = var.getParent();
- if ( parent instanceof IBinaryModule ) {
- path = ((IBinaryModule)parent).getPath();
- }
- return createGlobalVariableDescriptor( var.getElementName(), path );
- }
-
- public static IGlobalVariableDescriptor createGlobalVariableDescriptor( ISymbol symbol ) {
- return createGlobalVariableDescriptor( symbol.getName(), symbol.getFilename() );
- }
-
- /**
- * @param descriptor can be null if creating a child for a global
- */
- public static CGlobalVariable createGlobalVariable( CDebugElement parent, IGlobalVariableDescriptor descriptor, ICDIVariableDescriptor cdiVariableObject ) {
- return new CGlobalVariable( parent, descriptor, cdiVariableObject );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
deleted file mode 100644
index 58b571f6482..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * oyvind.harboe@zylin.com - http://bugs.eclipse.org/250638
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDebugConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.IDisassembly;
-import org.eclipse.cdt.debug.core.model.IDisassemblyBlock;
-import org.eclipse.cdt.debug.core.model.IExecFileInfo;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * CDI implementation of IDisassembly
- */
-public class Disassembly extends CDebugElement implements IDisassembly, ICDIEventListener {
-
- final static private int DISASSEMBLY_BLOCK_SIZE = 100;
-
- private DisassemblyBlock[] fBlocks = new DisassemblyBlock[1];
-
- /**
- * Constructor for Disassembly.
- *
- * @param target
- */
- public Disassembly( CDebugTarget target ) {
- super( target );
- getCDISession().getEventManager().addEventListener( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassembly#getDisassemblyBlock(org.eclipse.cdt.debug.core.model.ICStackFrame)
- */
- @Override
- public IDisassemblyBlock getDisassemblyBlock( ICStackFrame frame ) throws DebugException {
- if ( fBlocks[0] == null || !fBlocks[0].contains( frame ) ) {
- fBlocks[0] = createBlock( frame );
- }
- return fBlocks[0];
- }
-
- private DisassemblyBlock createBlock( ICStackFrame frame ) throws DebugException {
- ICDITarget target = getDebugTarget().getAdapter( ICDITarget.class );
- if ( target != null ) {
- String fileName = frame.getFile();
- int lineNumber = frame.getLineNumber();
- ICDIMixedInstruction[] mixedInstrs = new ICDIMixedInstruction[0];
- IAddress address = frame.getAddress();
- if (address==null)
- return null;
- if ( fileName != null && fileName.length() > 0 ) {
- try {
- mixedInstrs = target.getMixedInstructions( fileName,
- lineNumber,
- CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) );
- }
- catch( CDIException e ) {
- // ignore and try to get disassembly without source
- }
- }
- // Double check if debugger returns correct address range.
- if ( mixedInstrs.length == 0 ||
- !containsAddress( mixedInstrs, address ) ) {
- try {
- BigInteger addr = new BigInteger( address.toString() );
- ICDIInstruction[] instructions = getFunctionInstructions( target.getInstructions( addr, addr.add( BigInteger.valueOf( DISASSEMBLY_BLOCK_SIZE ) ) ) );
- return DisassemblyBlock.create( this, instructions );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
- else {
- return DisassemblyBlock.create( this, mixedInstrs );
- }
- }
- return null;
- }
-
- @Override
- public IDisassemblyBlock getDisassemblyBlock( IAddress address ) throws DebugException {
- fBlocks[0] = createBlock( address, null);
- return fBlocks[0];
- }
-
- public IDisassemblyBlock getDisassemblyBlock( IAddress startAddress, IAddress endAddress ) throws DebugException {
- fBlocks[0] = createBlock( startAddress, endAddress );
- return fBlocks[0];
- }
-
- private DisassemblyBlock createBlock( IAddress startAddress, IAddress endAddress) throws DebugException {
- ICDITarget target = getDebugTarget().getAdapter( ICDITarget.class );
- if ( target != null ) {
- ICDIMixedInstruction[] mixedInstrs = new ICDIMixedInstruction[0];
- if ( mixedInstrs.length == 0 ||
- !containsAddress( mixedInstrs, startAddress ) ) {
- try {
- BigInteger startAddr = new BigInteger( startAddress.toString() );
- BigInteger endAddr = null;
- if (endAddress != null) {
- endAddr = new BigInteger( endAddress.toString() );
- } else {
- endAddr = startAddr.add( BigInteger.valueOf(
- CDebugCorePlugin.getDefault().getPluginPreferences().getInt(ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS)));
- }
- mixedInstrs = target.getMixedInstructions( startAddr, endAddr);
- return DisassemblyBlock.create( this, mixedInstrs );
- }
- catch( CDIException e ) {
- targetRequestFailed( e.getMessage(), e );
- }
- }
- else {
- return DisassemblyBlock.create( this, mixedInstrs );
- }
- }
- return null;
- }
-
-
- private boolean containsAddress( ICDIMixedInstruction[] mi, IAddress address ) {
- for( int i = 0; i < mi.length; ++i ) {
- ICDIInstruction[] instructions = mi[i].getInstructions();
- for ( int j = 0; j < instructions.length; ++j ) {
- if ( address.getValue().equals( instructions[j].getAdress() ) )
- return true;
- }
- }
- return false;
- }
-
- private ICDIInstruction[] getFunctionInstructions( ICDIInstruction[] rawInstructions ) {
- if ( rawInstructions.length > 0 && rawInstructions[0].getFuntionName() != null && rawInstructions[0].getFuntionName().length() > 0 ) {
- ArrayList list = new ArrayList( rawInstructions.length );
- list.add( rawInstructions[0] );
- for( int i = 1; i < rawInstructions.length; ++i ) {
- if ( rawInstructions[0].getFuntionName().equals( rawInstructions[i].getFuntionName() ) ) {
- list.add( rawInstructions[i] );
- }
- }
- return (ICDIInstruction[])list.toArray( new ICDIInstruction[list.size()] );
- }
- return rawInstructions;
- }
-
- public void dispose() {
- getCDISession().getEventManager().removeEventListener( this );
- CDebugCorePlugin.getDefault().getDisassemblyContextService().unregister( this );
- for ( int i = 0; i < fBlocks.length; ++i )
- if ( fBlocks[i] != null ) {
- fBlocks[i].dispose();
- fBlocks[i] = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- if ( IExecFileInfo.class.equals( adapter ) )
- return getDebugTarget().getAdapter( adapter );
- return super.getAdapter( adapter );
- }
-
- public void reset() {
- for ( int i = 0; i < fBlocks.length; ++i )
- if ( fBlocks[i] != null ) {
- fBlocks[i].dispose();
- fBlocks[i] = null;
- }
- fireChangeEvent( DebugEvent.CONTENT );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassembly#getAddressFactory()
- */
- @Override
- public IAddressFactory getAddressFactory() {
- return ((CDebugTarget)getDebugTarget()).getAddressFactory();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- boolean update = false;
- for ( int i = 0; i < events.length; ++i ) {
- if ( events[i] instanceof ICDIMemoryChangedEvent ) {
- BigInteger[] addresses = ((ICDIMemoryChangedEvent)events[i]).getAddresses();
- for ( int j = 0; j < addresses.length; ++j ) {
- IAddress address = getAddressFactory().createAddress( addresses[j] );
- for ( int k = 0; k < fBlocks.length; ++k ) {
- if ( fBlocks[k] != null && fBlocks[k].contains( address ) ) {
- update = true;
- break;
- }
- }
- }
- }
- }
- if ( update )
- reset();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
deleted file mode 100644
index f5a09f7417d..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Mike Caraman (Frescale) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=210863
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.LineNumberReader;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmSourceLine;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.IDisassembly;
-import org.eclipse.cdt.debug.core.model.IDisassemblyBlock;
-import org.eclipse.cdt.debug.core.model.IExecFileInfo;
-import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
-
-/**
- * CDI-based implementation of IDisassemblyBlock.
- */
-public class DisassemblyBlock implements IDisassemblyBlock, IAdaptable {
-
- private IDisassembly fDisassembly;
-
- private Object fSourceElement;
-
- private IAsmSourceLine[] fSourceLines;
-
- private IAddress fStartAddress = null;
-
- private IAddress fEndAddress = null;
-
- private boolean fMixedMode = false;
-
- /**
- * Constructor for DisassemblyBlock.
- */
- private DisassemblyBlock( IDisassembly disassembly ) {
- fDisassembly = disassembly;
- }
-
- public static DisassemblyBlock create( IDisassembly disassembly, ICDIMixedInstruction[] instructions ) {
- DisassemblyBlock block = new DisassemblyBlock( disassembly );
- ISourceLocator locator = disassembly.getDebugTarget().getLaunch().getSourceLocator();
- IAddressFactory factory = ((CDebugTarget)disassembly.getDebugTarget()).getAddressFactory();
- block.initialize( factory, locator, instructions );
- return block;
- }
-
- public static DisassemblyBlock create( IDisassembly disassembly, ICDIInstruction[] instructions ) {
- DisassemblyBlock block = new DisassemblyBlock( disassembly );
- IAddressFactory factory = ((CDebugTarget)disassembly.getDebugTarget()).getAddressFactory();
- block.initialize( factory, instructions );
- return block;
- }
-
- private void initialize( IAddressFactory factory, ICDIInstruction[] instructions ) {
- setMixedMode( false );
- createSourceLines( factory, instructions );
- initializeAddresses();
- }
-
- private void initialize( IAddressFactory factory, ISourceLocator locator, ICDIMixedInstruction[] mi ) {
- setMixedMode( true );
- createSourceLines( factory, locator, mi );
- initializeAddresses();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#getDisassembly()
- */
- @Override
- public IDisassembly getDisassembly() {
- return fDisassembly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#getModuleFile()
- */
- @Override
- public String getModuleFile() {
- IDisassembly d = getDisassembly();
- if ( d != null ) {
- IExecFileInfo info = d.getAdapter( IExecFileInfo.class );
- if ( info != null && info.getExecFile() != null ) {
- return info.getExecFile().getPath().toOSString();
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#getSourceElement()
- */
- @Override
- public Object getSourceElement() {
- return fSourceElement;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#contains(org.eclipse.cdt.debug.core.model.ICStackFrame)
- */
- @Override
- public boolean contains( ICStackFrame frame ) {
- if ( !getDisassembly().getDebugTarget().equals( frame.getDebugTarget() ) )
- return false;
- if ( fStartAddress == null || fEndAddress == null )
- return false;
- IAddress address = frame.getAddress(); // will return null if frame was disposed
- return (address != null && address.compareTo( fStartAddress ) >= 0 && address.compareTo( fEndAddress ) <= 0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#getSourceLines()
- */
- @Override
- public IAsmSourceLine[] getSourceLines() {
- return fSourceLines;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter( Class adapter ) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyBlock#isMixedMode()
- */
- @Override
- public boolean isMixedMode() {
- return fMixedMode;
- }
-
- public void dispose() {
- }
-
- private void createSourceLines( IAddressFactory factory, ISourceLocator locator, ICDIMixedInstruction[] mi ) {
- IAsmSourceLine[] result = new IAsmSourceLine[mi.length];
- LineNumberReader reader = null;
- if ( result.length > 0 && locator != null ) {
- String fileName = mi[0].getFileName();
- Object element = null;
- if ( locator instanceof ISourceLookupDirector ) {
- element = ((ISourceLookupDirector)locator).getSourceElement( fileName );
- }
- if ( locator instanceof ICSourceLocator ) {
- element = ((ICSourceLocator)locator).findSourceElement( fileName );
- }
- fSourceElement = element;
- File file = null;
- if ( element instanceof IFile ) {
- file = ((IFile)element).getLocation().toFile();
- }
- else if ( element instanceof ITranslationUnit ) {
- file = ((ITranslationUnit)element).getLocation().toFile();
- }
- else if ( element instanceof IStorage ) {
- file = ((IStorage)element).getFullPath().toFile();
- }
- if ( file != null ) {
- try {
- reader = new LineNumberReader( new FileReader( file ) );
- }
- catch( FileNotFoundException e ) {
- }
- }
- }
- for ( int i = 0; i < result.length; ++i ) {
- String text = null;
- boolean failed = false;
- int lineNumber = mi[i].getLineNumber();
- if ( reader != null ) {
- while( reader.getLineNumber() + 1 < lineNumber ) {
- try {
- if ( reader.readLine() == null ) {
- // break if the end of file is reached (see bug #123745)
- failed = true;
- break;
- }
- }
- catch( IOException e ) {
- }
- }
- if ( !failed && reader.getLineNumber() + 1 == lineNumber ) {
- try {
- text = reader.readLine() + '\n';
- }
- catch( IOException e ) {
- }
- }
- }
- result[i] = new AsmSourceLine( factory, text, lineNumber, mi[i].getInstructions() );
- }
- fSourceLines = result;
- }
-
- private void createSourceLines( IAddressFactory factory, ICDIInstruction[] instructions ) {
- fSourceLines = new IAsmSourceLine[] { new AsmSourceLine( factory, "", instructions ) }; //$NON-NLS-1$
- }
-
- private void initializeAddresses() {
- for ( int i = 0; i < fSourceLines.length; ++i ) {
- IAsmInstruction[] instr = fSourceLines[i].getInstructions();
- if ( instr.length > 0 ) {
- if ( fStartAddress == null )
- fStartAddress = instr[0].getAdress();
- fEndAddress = instr[instr.length - 1].getAdress();
- }
- }
- }
-
- private void setMixedMode( boolean mixedMode ) {
- this.fMixedMode = mixedMode;
- }
-
- protected boolean contains( IAddress address ) {
- return ( address.compareTo( fStartAddress ) >= 0 && address.compareTo( fEndAddress ) <= 0 );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyInstruction.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyInstruction.java
deleted file mode 100644
index 982af00a252..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyInstruction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 ARM Limited and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * ARM Limited - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.model.IDisassemblyInstruction;
-
-public class DisassemblyInstruction extends CDebugElement implements IDisassemblyInstruction {
-
- private ICDIInstruction fCDIInstruction;
- private IAddress fAddress;
-
- public DisassemblyInstruction( CDebugTarget target, BigInteger baseElement, ICDIInstruction instruction ) {
- super( target );
- fCDIInstruction = instruction;
- fAddress = target.getAddressFactory().createAddress( fCDIInstruction.getAdress() );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getAdress()
- */
- @Override
- public IAddress getAdress() {
- return fAddress;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getArguments()
- */
- @Override
- public String getArguments() {
- return fCDIInstruction.getArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getFunctionName()
- */
- @Override
- public String getFunctionName() {
- return fCDIInstruction.getFuntionName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getInstructionText()
- */
- @Override
- public String getInstructionText() {
- return fCDIInstruction.getInstruction();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getOffset()
- */
- @Override
- public long getOffset() {
- return fCDIInstruction.getOffset();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmInstruction#getOpcode()
- */
- @Override
- public String getOpcode() {
- return fCDIInstruction.getOpcode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( obj == this )
- return true;
- if ( !(obj instanceof IDisassemblyInstruction) )
- return false;
- IDisassemblyInstruction instr = (IDisassemblyInstruction)obj;
- if ( !instr.getAdress().equals( getAdress() ) )
- return false;
- if ( instr.getOffset() != getOffset() )
- return false;
- if ( instr.getFunctionName().compareTo( getFunctionName() ) != 0 )
- return false;
- if ( instr.getOpcode().compareTo( getOpcode() ) != 0 )
- return false;
- if ( instr.getArguments().compareTo( getArguments() ) != 0 )
- return false;
- if ( instr.getInstructionText().compareTo( getInstructionText() ) != 0 )
- return false;
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
deleted file mode 100644
index 16d4411a896..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2015 ARM Limited and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * ARM Limited - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.core.IAddressFactory;
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIBreakpointMovedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIBreakpointProblemEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDICreatedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.IDisassemblyInstruction;
-import org.eclipse.cdt.debug.core.model.IDisassemblyLine;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-
-public class DisassemblyRetrieval extends CDebugElement implements ICDIEventListener {
-
- public static final int FLAGS_SHOW_INSTRUCTIONS = 0x1;
- public static final int FLAGS_SHOW_SOURCE = 0x2;
-
- private Object fInput = null;
- private BigInteger fBaseElement = null;
- private int fCurrentOffset = 0;
- private int fFlags = 0;
- private IDisassemblyLine[] fLines;
-
- public DisassemblyRetrieval( CDebugTarget target ) {
- super( target );
- fLines = new IDisassemblyLine[0];
- CDebugCorePlugin.getDefault().getDisassemblyContextService().register( this );
- getCDISession().getEventManager().addEventListener( this );
- }
-
- public void dispose() {
- getCDISession().getEventManager().removeEventListener( this );
- CDebugCorePlugin.getDefault().getDisassemblyContextService().unregister( this );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- @Override
- public void handleDebugEvents( ICDIEvent[] events ) {
- for ( ICDIEvent event : events ) {
- Object source = event.getSource();
- if ( (event instanceof ICDICreatedEvent
- || event instanceof ICDIChangedEvent
- || event instanceof ICDIDestroyedEvent
- || event instanceof ICDIBreakpointMovedEvent
- || event instanceof ICDIBreakpointProblemEvent )
- && source instanceof ICDILocationBreakpoint ) {
- BigInteger address = ((ICDILocationBreakpoint)source).getLocator().getAddress();
- if ( address != null ) {
- int index = getIndexForAddress( address, fLines );
- if ( index >= 0 ) {
- fireEvent( new DebugEvent( fLines[index], DebugEvent.CHANGE, DebugEvent.STATE ) );
- }
- if ( event instanceof ICDIBreakpointMovedEvent ) {
- address = ((ICDIBreakpointMovedEvent)event).getNewLocation().getAddress();
- if ( address != null ) {
- index = getIndexForAddress( address, fLines );
- if ( index >= 0 ) {
- fireEvent( new DebugEvent( fLines[index], DebugEvent.CHANGE, DebugEvent.STATE ) );
- }
- }
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblyRetrieval#getInput()
- */
- public Object getInput() {
- return fInput;
- }
-
- public BigInteger getBaseElement() {
- return fBaseElement;
- }
-
- public int getCurrentOffset() {
- return fCurrentOffset;
- }
-
- public IDisassemblyLine[] getLines() {
- return fLines;
- }
-
- public void changeBase( Object input, int offset, int flags ) throws DebugException {
- if ( input instanceof ICStackFrame ) {
- fInput = input;
- ICStackFrame frame = (ICStackFrame)input;
- IAddress frameAddress = frame.getAddress();
- BigInteger address = (frameAddress != null) ? frameAddress.getValue() : BigInteger.valueOf(0);
- if ( !containsAddress( address, fLines ) ) {
- fCurrentOffset = 0;
- reset();
- }
- else if ( flags != fFlags ) {
- reset();
- }
- else {
- fCurrentOffset += getDistance( fBaseElement, address );
- }
- fFlags = flags;
- fBaseElement = address;
- }
- }
-
- public void retrieveDisassembly( Object input, Object base, int offset, int lineCount, boolean reveal, int flags ) throws DebugException {
- fFlags = flags;
- boolean showSource = ( (flags & FLAGS_SHOW_SOURCE) != 0 );
- List lines = new ArrayList( lineCount );
- BigInteger startAddress = getCurrentStartAddress();
- BigInteger address = null;
- if ( startAddress != null ) {
- if ( getCurrentOffset() > offset ) {
- // scrolling up
- address = startAddress.subtract( BigInteger.valueOf( getMinInstructionSize() * (getCurrentOffset() - offset) ) );
- }
- else if ( getCurrentOffset() < offset ) {
- // scrolling down
- IDisassemblyInstruction next = getNextInstruction( startAddress, fLines );
- if ( next != null )
- address = next.getAdress().getValue();
- }
- else {
- address = startAddress;
- }
- }
- if ( address == null )
- address = fBaseElement;
- lines.addAll( Arrays.asList( disassembleDown( address, lineCount, showSource ) ) );
- fLines = lines.toArray( new IDisassemblyLine[lines.size()] );
- fCurrentOffset = offset;
- }
-
- private boolean containsAddress( BigInteger address, IDisassemblyLine[] lines ) {
- return ( getIndexForAddress( address, lines ) >= 0 );
- }
-
- public void reset() {
- fLines = new IDisassemblyLine[0];
- }
-
- private int getDistance( BigInteger address1, BigInteger address2 ) {
- int index1 = getIndexForAddress( address1, fLines );
- Assert.isTrue( index1 >=0 );
- int index2 = getIndexForAddress( address2, fLines );
- Assert.isTrue( index2 >=0 );
- return index2 - index1;
- }
-
- private int getIndexForAddress( BigInteger address, IDisassemblyLine[] lines ) {
- for ( int i = 0; i < lines.length; ++i ) {
- if ( lines[i] instanceof IDisassemblyInstruction &&
- address.compareTo( ((IDisassemblyInstruction)lines[i]).getAdress().getValue() ) == 0 )
- return i;
- }
- return -1;
- }
-
- private BigInteger getCurrentStartAddress() {
- for ( IDisassemblyLine l : fLines ) {
- if ( l instanceof IDisassemblyInstruction )
- return ((IDisassemblyInstruction)l).getAdress().getValue();
- }
- return null;
- }
-
- private IDisassemblyLine[] disassembleDown( BigInteger address, int lineCount, boolean mixed ) throws DebugException {
- BigInteger startAddress = address;
- IDisassemblyLine[] lines = new IDisassemblyLine[0];
- BigInteger endAddress = startAddress;
- if ( lines.length < lineCount && endAddress.compareTo( getGlobalEndAddress() ) < 0 ) {
- endAddress = address.add( BigInteger.valueOf( lineCount * getMaxInstructionSize() ) );
- if ( endAddress.compareTo( getGlobalEndAddress() ) > 0 )
- endAddress = getGlobalEndAddress();
- lines = disassemble( address, endAddress, mixed );
- IDisassemblyInstruction firstInstruction = getFirstInstruction( lines );
- IDisassemblyInstruction lastInstruction = getLastInstruction( lines );
- if ( firstInstruction != null && lastInstruction != null ) {
- if ( startAddress.compareTo( firstInstruction.getAdress().getValue() ) < 0 ) {
- lines = appendLines( disassemble( startAddress, firstInstruction.getAdress().getValue(), mixed ), lines );
- }
- startAddress = lastInstruction.getAdress().getValue();
- if ( startAddress.compareTo( endAddress ) < 0 ) {
- IDisassemblyLine[] extraLines = new IDisassemblyLine[0];
- while( extraLines.length == 0 && endAddress.compareTo( getGlobalEndAddress() ) < 0 ) {
- endAddress = endAddress.add( BigInteger.valueOf( getMaxInstructionSize() ) );
- extraLines = disassemble( startAddress, endAddress, mixed );
- }
- lines = appendLines( lines, extraLines );
- }
- }
- }
- int size = Math.min( lineCount, lines.length );
- IDisassemblyLine[] result = new IDisassemblyLine[size];
- int start = getIndexForAddress( address, lines );
- if ( start != -1 ) {
- System.arraycopy( lines, start, result, 0, size );
- }
- return result;
- }
-
- private IDisassemblyLine[] disassemble( BigInteger startAddress, BigInteger endAddress, boolean mixed ) throws DebugException {
- List list = new ArrayList();
- ICDITarget cdiTarget = getDebugTarget().getAdapter( ICDITarget.class );
- try {
- ICDIMixedInstruction[] mixedInstructions = null;
- ICDIInstruction[] asmInstructions = null;
- if ( mixed ) {
- mixedInstructions = cdiTarget.getMixedInstructions( startAddress, endAddress );
- if ( mixedInstructions.length == 0
- || mixedInstructions.length == 1
- && mixedInstructions[0].getInstructions().length == 0 ) {
- mixedInstructions = null;
- }
- }
- if ( mixedInstructions == null ) {
- asmInstructions = cdiTarget.getInstructions( startAddress, endAddress );
- }
- if ( mixedInstructions != null ) {
- for ( ICDIMixedInstruction mi : mixedInstructions ) {
- ICDIInstruction[] instructions = mi.getInstructions();
- if ( instructions.length > 0 ) {
- list.add( new DisassemblySourceLine( (CDebugTarget)getDebugTarget(), fBaseElement, mi ) );
- for ( ICDIInstruction i : instructions ) {
- list.add( new DisassemblyInstruction( (CDebugTarget)getDebugTarget(), fBaseElement, i ) );
- }
- }
- }
- }
- else if ( asmInstructions != null ) {
- for ( ICDIInstruction i : asmInstructions ) {
- list.add( new DisassemblyInstruction( (CDebugTarget)getDebugTarget(), fBaseElement, i ) );
- }
- }
- }
- catch( CDIException exc ) {
- throw new DebugException( new Status( IStatus.ERROR, "dummy", exc.getDetailMessage(), exc ) ); //$NON-NLS-1$
- }
- return list.toArray( new IDisassemblyLine[list.size()] );
- }
-
- private int getMaxInstructionSize() {
- return 4;
- }
-
- private int getMinInstructionSize() {
- return 1;
- }
-
- private IDisassemblyInstruction getNextInstruction( BigInteger address, IDisassemblyLine[] lines ) {
- int index = getIndexForAddress( address, lines );
- if ( index == -1 || index == lines.length - 1 )
- return null;
- for ( int i = index + 1; i < lines.length; ++i ) {
- if ( lines[i] instanceof IDisassemblyInstruction )
- return (IDisassemblyInstruction)lines[i];
- }
- return null;
- }
-
- private IDisassemblyInstruction getFirstInstruction( IDisassemblyLine[] lines ) {
- for ( IDisassemblyLine l : lines ) {
- if ( l instanceof IDisassemblyInstruction )
- return (IDisassemblyInstruction)l;
- }
- return null;
- }
-
- private IDisassemblyInstruction getLastInstruction( IDisassemblyLine[] lines ) {
- for ( int i = lines.length - 1; i >= 0; --i ) {
- if ( lines[i] instanceof IDisassemblyInstruction )
- return (IDisassemblyInstruction)lines[i];
- }
- return null;
- }
-
- private BigInteger getGlobalEndAddress() {
- return getAddressFactory().getMax().getValue();
- }
-
- private IAddressFactory getAddressFactory() {
- return ((CDebugTarget)getDebugTarget()).getAddressFactory();
- }
-
- private IDisassemblyLine[] appendLines( IDisassemblyLine[] lines1, IDisassemblyLine[] lines2 ) {
- List list = new ArrayList( lines1.length + lines2.length );
- list.addAll( Arrays.asList( lines1 ) );
- for ( IDisassemblyLine l : lines2 ) {
- if ( !list.contains( l ) )
- list.add( l );
- }
- return list.toArray( new IDisassemblyLine[list.size()] );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblySourceLine.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblySourceLine.java
deleted file mode 100644
index 5b503d86074..00000000000
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblySourceLine.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 ARM Limited and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * ARM Limited - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.internal.core.model;
-
-import java.io.File;
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.core.model.IAsmInstruction;
-import org.eclipse.cdt.debug.core.model.IDisassemblySourceLine;
-
-public class DisassemblySourceLine extends CDebugElement implements IDisassemblySourceLine {
-
- private BigInteger fBaseElement;
- private ICDIMixedInstruction fCDIMixedInstruction;
-
- public DisassemblySourceLine( CDebugTarget target, BigInteger baseElement, ICDIMixedInstruction mixedInstruction ) {
- super( target );
- fBaseElement = baseElement;
- fCDIMixedInstruction = mixedInstruction;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IDisassemblySourceLine#getFile()
- */
- @Override
- public File getFile() {
- String name = fCDIMixedInstruction.getFileName();
- if ( name != null && name.length() > 0 ) {
- return new File( name );
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmSourceLine#getInstructions()
- */
- @Override
- public IAsmInstruction[] getInstructions() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.model.IAsmSourceLine#getLineNumber()
- */
- @Override
- public int getLineNumber() {
- return fCDIMixedInstruction.getLineNumber();
- }
-
- public BigInteger getBaseAddress() {
- return fBaseElement;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return fCDIMixedInstruction.getFileName() + ' ' + getLineNumber();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals( Object obj ) {
- if ( !(obj instanceof IDisassemblySourceLine) )
- return false;
- IDisassemblySourceLine other = (IDisassemblySourceLine)obj;
- if ( !getFile().equals( other.getFile() ) )
- return false;
- if ( getLineNumber() != other.getLineNumber() )
- return false;
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
index c9bde9be8e2..b86e9e5bfad 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
@@ -19,16 +19,11 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.core.model.ICStackFrame;
import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
import org.eclipse.cdt.debug.core.sourcelookup.ISourceLookupChangeListener;
-import org.eclipse.cdt.debug.internal.core.CBreakpointManager;
import org.eclipse.cdt.debug.internal.core.ListenerList;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
@@ -64,13 +59,6 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
if (object instanceof String) {
return (String)object;
}
- if (object instanceof IAdaptable) {
- ICStackFrame frame = ((IAdaptable)object).getAdapter(ICStackFrame.class);
- if (frame != null) {
- String name = frame.getFile();
- return (name != null && name.trim().length() > 0) ? name : null;
- }
- }
return null;
}
@@ -87,30 +75,7 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
// Workaround for cases when the stack frame doesn't contain the source file name
String name = null;
IBreakpoint breakpoint = null;
- if (object instanceof IAdaptable) {
- ICStackFrame frame = ((IAdaptable)object).getAdapter(ICStackFrame.class);
- if (frame != null) {
- name = frame.getFile().trim();
- if (name == null || name.length() == 0)
- {
- if (object instanceof IDebugElement)
- results = new Object[] { new CSourceNotFoundElement((IDebugElement) object, ((IDebugElement) object).getLaunch().getLaunchConfiguration(), name) };
- else
- results = new Object[] { gfNoSource };
- fCachedResults.put(object, results);
- return results;
- }
- }
- // See if findSourceElements(...) is the result of a Breakpoint Hit Event
- ICDebugTarget target = ((IAdaptable)object).getAdapter(ICDebugTarget.class);
- if (target != null) {
- CBreakpointManager bmanager = target.getAdapter(CBreakpointManager.class);
- Object stateInfo = target.getCurrentStateInfo();
- if (bmanager != null && stateInfo instanceof ICDIBreakpointHit) {
- breakpoint = bmanager.getBreakpoint(((ICDIBreakpointHit)stateInfo).getBreakpoint());
- }
- }
- } else if (object instanceof String) {
+ if (object instanceof String) {
name = (String)object;
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceManager.java
index 3d10e11a694..31c34841d96 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceManager.java
@@ -13,14 +13,11 @@ package org.eclipse.cdt.debug.internal.core.sourcelookup;
import org.eclipse.cdt.debug.core.model.ICStackFrame;
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.Disassembly;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
@@ -33,7 +30,6 @@ import org.eclipse.debug.core.model.IStackFrame;
public class CSourceManager implements ICSourceLocator, IPersistableSourceLocator, IAdaptable {
private ISourceLocator fSourceLocator = null;
private ILaunch fLaunch = null;
- private CDebugTarget fDebugTarget = null;
/**
* Constructor for CSourceManager.
@@ -75,17 +71,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
public void setSourceLocations(ICSourceLocation[] locations) {
if (getCSourceLocator() != null) {
getCSourceLocator().setSourceLocations(locations);
- CDebugTarget target = getDebugTarget();
- if (target != null) {
- Disassembly d = null;
- try {
- d = (Disassembly)target.getDisassembly();
- } catch (DebugException e) {
- }
- if (d != null) {
- d.reset();
- }
- }
}
}
@@ -203,14 +188,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
return (getCSourceLocator() != null) ? getCSourceLocator().getProject() : null;
}
- public void setDebugTarget(CDebugTarget target) {
- fDebugTarget = target;
- }
-
- protected CDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
/*
* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#setSearchForDuplicateFiles(boolean)
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.classpath b/debug/org.eclipse.cdt.debug.mi.core/.classpath
deleted file mode 100644
index 0afe5291481..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.cvsignore b/debug/org.eclipse.cdt.debug.mi.core/.cvsignore
deleted file mode 100644
index ba077a4031a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.options b/debug/org.eclipse.cdt.debug.mi.core/.options
deleted file mode 100644
index 76c7d9926fc..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.cdt.debug.mi.core/debug=true
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.project b/debug/org.eclipse.cdt.debug.mi.core/.project
deleted file mode 100644
index ccce5584ad9..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
- org.eclipse.cdt.debug.mi.core
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.api.tools.apiAnalysisBuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.pde.PluginNature
- org.eclipse.pde.api.tools.apiAnalysisNature
-
-
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.settings/org.eclipse.jdt.core.prefs b/debug/org.eclipse.cdt.debug.mi.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 397ee5a8e4b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,74 +0,0 @@
-#Wed Apr 08 15:56:28 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
deleted file mode 100644
index 83856982c5f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
+++ /dev/null
@@ -1,1219 +0,0 @@
-2006-08-31 Mikhail Khodjaiants
- Bug 155816: NPE thrown by info threads
- Applied patch from James Blackburn (jamesblackburn+eclipse@gmail.com).
- * Target.java
-
-2006-08-22 Mikhail Khodjaiants
- Bug 145758: Unable to use the default command factories.
- * MANIFEST.MF
-
-2006-08-22 Mikhail Khodjaiants
- Bug 146725: Erroneous error message during GDB startup.
- * CygwinGDBCDIDebugger2.java
- * GDBCDIDebugger2.java
- * CommandFactory.java
- + MIGDBSetNewConsole.java
- * StandardLinuxCommandFactory.java
-
-2006-08-22 Mikhail Khodjaiants
- Bug 153894: Variable View: Can not format 'short int' to Hex.
- Applied patch from James Blackburn (jamesblackburn+eclipse@gmail.com).
- * SourceManager.java
-
-2006-05-25 Mikhail Khodjaiants
- Bug 137970: No default debugger in C++ managed project.
- * MIPlugin.java
-
-2006-05-25 Mikhail Khodjaiants
- Bug 109733: Request to make certain methods as public (MISession and MIInferior).
- * MIInferior.java
- * MISession.java
-
-2006-05-25 Mikhail Khodjaiants
- Bug 109733: Request to make certain methods as public (null check for setPrompt).
- * RxThread.java
-
-2006-04-21 Mikhail Khodjaiants
- Don't create pty when using gdbserver.
- * AbstractGDBCDIDebugger.java
- * GDBServerCDIDebugger2.java
-
-2006-04-21 Mikhail Khodjaiants
- Close the pty if the session creation failed.
- * MIPlugin.java
-
-2006-04-18 Mikhail Khodjaiants
- Duplicate message key.
- * MIPluginResources.properties
- * AbstractGDBCDIDebugger.java
-
-2006-04-17 Mikhail Khodjaiants
- Breakpoint can be temporary and hardware at the same time.
- * MIBreakInsert.java
-
-2006-04-16 Mikhail Khodjaiants
- Bug 113107: Make trace logs more readily available.
- * AbstractGDBCDIDebugger.java
- * IMILaunchConfigurationConstants.java
-
-2006-04-13 Mikhail Khodjaiants
- Bug 113107: Make trace logs more readily available.
- Core support for the "Verbose Mode" action.
- * Target.java
- * MISession.java
- * RxThread.java
- * AbstractGDBCDIDebugger.java
- + GDBProcess.java
-
-2006-04-12 Mikhail Khodjaiants
- Write log messages to the system out instead of err.
- * MIPlugin.java
-
-2006-04-12 Mikhail Khodjaiants
- Bug 136206: Suppress Resumed events when processing solib events.
- * EventManager.java
- * RxThread.java
- * Command.java
- * MIEvent.java
-
-2006-04-12 Mikhail Khodjaiants
- Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for.
- Support for deferred breakpoints.
- * BreakpointManager.java
- * EventManager.java
- * SharedLibraryManager.java
- * Target.java
- * GDBCDIDebugger.java
- * GDBCDIDebugger2.java
- * GDBDebugger.java
-
-2006-04-10 Mikhail Khodjaiants
- Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for.
- * SharedLibraryManager.java
- * GDBCDIDebugger2.java
- * IMILaunchConfigurationConstants.java
- * MICoreUtils.java
-
-2006-04-10 Mikhail Khodjaiants
- "set solib-search-path" and "show solib-search-path" are not supported on Windows.
- * StandardWinCommandFactory.java
-
-2006-04-03 Mikhail Khodjaiants
- Bug 134617: The "stop on shared library event" option doesn't work.
- * GDBCDIDebugger2.java
-
-2006-03-31 Mikhail Khodjaiants
- Corrected position of the "try-catch-finally" clause in createSession.
- * AbstractGDBCDIDebugger.java
-
-2006-03-31 Mikhail Khodjaiants
- Throw OperationCanceledException instead of IOException when getGDBprocess is canceled.
- * MIProcessAdapter.java
-
-2006-03-27 Mikhail Khodjaiants
- Cleaned up the "Session" class constructors.
- * Session.java
-
-2006-03-27 Mikhail Khodjaiants
- Added the "getSessionConfiguration" method to allow clients to provide their own session configurations.
- * AbstractGDBCDIDebugger.java
-
-2006-03-23 Mikhail Khodjaiants
- Pass ILaunch instead of ILaunchConfiguration.
- Added "getGDBPath" method.
- * AbstractGDBCDIDebugger.java
- * CygwinGDBCDIDebugger2.java
- * GDBCDIDebugger2.java
- * GDBServerCDIDebugger2.java
-
-2006-03-23 Mikhail Khodjaiants
- Added default attribute value for ATTR_DEBUG_NAME.
- * IMILaunchConfigurationConstants.java
-
-2006-03-21 Mikhail Khodjaiants
- Missing error message.
- * MIPluginResources.properties
-
-2006-03-20 Mikhail Khodjaiants
- Made "getCommandFile" and "getWorkingDirectory" methods protected.
- * GDBCDIDebugger2.java
-
-2006-03-16 Mikhail Khodjaiants
- ILaunch is added to the arguments list of "doStartSession".
- * AbstractGDBCDIDebugger.java
- * CygwinGDBCDIDebugger2.java
- * GDBCDIDebugger2.java
-
-2006-03-13 Mikhail Khodjaiants
- Added default implementation for "getExtraArguments". No need to force
- clients to implement this method.
- * AbstractGDBCDIDebugger.java
-
-2006-02-09 Mikhail Khodjaiants
- Bug 114793: Add an extension point to contribute command factories.
- Registered windows and linux specific command factories for gdbserver.
- * plugin.properties
- * plugin.xml
-
-2006-02-09 Mikhail Khodjaiants
- The inferior is in the suspended state when connecting to gsbserver.
- * GDBServerCDIDebugger2.java
-
-2006-02-08 Mikhail Khodjaiants
- Bug 114793: Add an extension point to contribute command factories.
- Added standard command factory for gdb server.
- * plugin.xml
- * plugin.properties
-
-2006-02-07 Mikhail Khodjaiants
- Bug 114793: Add an extension point to contribute command factories.
- + mi/org/eclipse/cdt/debug/mi/core/command/factories/linux (package)
- + LinuxCLIInfoSharedLibrary.java
- + LinuxCLIInfoSharedLibraryInfo.java
- + StandardLinuxCommandFactory.java
- * plugin.xml
-
-2006-02-07 Mikhail Khodjaiants
- Bug 126789: Use new "fullname" attribute of stack frame description.
- * MIStackListFrames.java
- * MIFrame.java
-
-2006-02-06 Mikhail Khodjaiants
- Suppress "set auto-solib" - returns error on Windows.
- * StandardWinCommandFactory.java
-
-2006-02-06 Mikhail Khodjaiants
- Use getters to access members of "MICommand".
- * MIBreakCondition.java
- * MICommand.java
- * MIDataDisassemble.java
- * MIEnvironmentCD.java
- * MIGDBSetEnvironment.java
-
-2006-02-06 Mikhail Khodjaiants
- Bug 114793: Add an extension point to contribute command factories.
- * MANIFEST.MF
- * CommandFactory.java
- + mi/org/eclipse/cdt/debug/mi/core/command/factories (package)
- + CommandFactoriesMessages.java
- + CommandFactoriesMessages.properties
- + CommandFactoryDescriptor.java
- + CommandFactoryManager.java
- + StandardCommandFactory.java
- + mi/org/eclipse/cdt/debug/mi/core/command/factories/win32 (package)
- + CygwinCommandFactory.java
- + CygwinMIEnvironmentCD.java
- + CygwinMIEnvironmentDirectory.java
- + StandardWinCommandFactory.java
- + WinCLIInfoSharedLibrary.java
- + WinCLIInfoSharedLibraryInfo.java
- + WinMIEnvironmentCD.java
- * CLIInfoSharedLibraryInfo.java
- + commandFactories.exsd
- - CygwinCommandFactory.java
- * CygwinGDBCDIDebugger.java
- * CygwinGDBCDIDebugger2.java
- * CygwinGDBDebugger.java
- - CygwinMIEnvironmentCD.java
- - CygwinMIEnvironmentDirectory.java
- * GDBCDIDebugger2.java
- * IMILaunchConfigurationConstants.java
- * MIPlugin.java
- * plugin.xml
- * plugin.properties
-
-2006-01-31 Mikhail Khodjaiants
- Bug 124966: GDBTypeParser.parse(String) parses incorrectly.
- Applied patch from Matthias Spycher (matthias@coware.com).
- * GDBTypeParser.java
-
-2006-01-27 Mikhail Khodjaiants
- Bug 107202: slow debug launch with external sources.
- Use "-p" option when passing a large number of directories to "cygpath".
- * CygwinMIEnvironmentDirectory.java
-
-2006-01-25 Mikhail Khodjaiants
- Reversing changes made to fix bug 107571. The fix for bug 119683 covers this problem too.
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
-
-2006-01-23 Mikhail Khodjaiants
- Bug 119683: long messages during launch cause gdb to timeout, launch to fail.
- * plugin.xml
- * plugin.properties
- * MISession.java
- + AbstractGDBCDIDebugger.java
- + CygwinGDBCDIDebugger2.java
- + GDBCDIDebugger2.java
- + GDBServerCDIDebugger2.java
- * MIPlugin.java
- * MIPluginResources.properties
-
-2006-01-04 Mikhail Khodjaiants
- Bug 118900: Display libraries loaded in post-mortem debug.
- Applied with modifications the patch from Joanne Woo (jwoo.mvista.com).
- * GDBCDIDebugger.java
-
-2005-12-27 Mikhail Khodjaiants
- Cleanup.
- * BreakpointManager.java
- * RegisterManager.java
-
-2005-12-27 Mikhail Khodjaiants
- Bug 109526: Support Eclipse-LazyStart and deprecate Eclipse-AutoStart.
- * MANIFEST.MF
-
-2005-12-20 Mikhail Khodjaiants
- Bug 120390: Avoiding .gdbinit
- * GDBCDIDebugger.java
- * GDBDebugger.java
- * GDBServerCDIDebugger.java
- * GDBServerDebugger.java
- * IMILaunchConfigurationConstants.java
- * MIPlugin.java
-
-2005-11-29 Mikhail Khodjaiants
- Partial fix for bug 118114: Cannot view typedef'ed array in debugger.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2005-11-29 Mikhail Khodjaiants
- Bug 100298: [Memory View] Changing variable's value from variables view or memory view doesn't sync to each other.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
-
-2005-11-02 Mikhail Khodjaiants
- Bug 113364: Wrong values displaying an array of structures.
- Previous fix didn't work for classes with access specifiers.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2005-10-21 Mikhail Khodjaiants
- Bug 113364: Wrong values displaying an array of structures.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2005-10-18 Mikhail Khodjaiants
- Bug 106632: Invalid detail value for arrays with dimension greater than 100.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
-2005-10-18 Mikhail Khodjaiants
- Bug 111568: Fix for corrupt stack messages not working.
- Applied patch from Timesys.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
-
-2005-09-01 Mikhail Khodjaiants
- Bug 108636: mi level selection option should be moved to the gdb page.
- * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2005-09-01 Mikhail Khodjaiants
- Bug 108424: Debugger stops on removed breakpoints.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2005-08-31 Alain Magloire
- Improve performance by caching the type result on the frame
- and on the RegisterManager. The patch is originally from Chris Wiebe
- with modifications.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2005-08-31 Alain Magloire
- Fix Pr 107571: Do not create the Console pipe is we
- have no consumer.
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
-
-2005-08-28 Alain Magloire
- Speed improvement after exchanging with the HP folks.
- HP has apps having hundred of local variable running on machine
- with hundred of registers. The latency of the command "-var-create"
- is too taxing. So we take the approach of not waiting for post command
- MISession.postCommand(MIVarCreate, -1) and synchronize when we need the
- mi varObj.
-
- The next step will be to cache the types, since sending ptype/whatis
- is also time consuming.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * mi/org/eclipse/cdt/debug/mi/core/RxThread.java
-
-2005-08-26 Mikhail Khodjaiants
- Bug 108130: wrong type shown on breakpoint view for R watchpoint created from gdb console.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2005-08-25 Mikhail Khodjaiants
- Bug 66446: Use the debugger path as a debugger process label.
- * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
-
-2005-07-28 Alain Magloire
- Fix Pr 104421: The register did not update.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
-
-2005-07-26 Alain Magloire
- Fix for 92446
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
-2005-07-21 Alain Magloire
- Fix for PR 103193
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2005-07-18 Alain Magloire
- GDB has now four different version of MI, so it has become
- important to give the user the choice of the version.
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
- * mi/org/eclipse/cdt/debug/mi/core/RxThread.java
- * mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
- * mi/org/eclipse/cdt/debug/mi/core/command/MICommand.java
- + mi/org/eclipse/cdt/debug/mi/core/command/MIVersion.java
- * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
- * src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
-
-2005-07-10 Alain Magloire
- Fix for PR 100992: Setting breakpoints for methods
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2005-07-07 Alain Magloire
- Try to suspend the target before disconnecting.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2005-06-29 Alain Magloire
- Fix PR 100602
- * mi/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2005-06-28 Alain Magloire
- Fix PR 94612: addr =
- * mi/org/eclipse/cdt/debug/mi/core/MIFormat.java
-
-2005-06-27 Alain Magloire
- New command from newer version of gdb "set breakpoint pending"
- better handling of the breakpoint while the target is running.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
- + mi/org/eclipse/cdt/debug/mi/core/ccommand/MIGDBSetBreakpoinPending.java
-
-2005-06-27 Alain Magloire
- Bug when parsing "int *&" corrected.
- Change in ICDIReferenceValue.
- Use the type in the response of the var-create instead of reissuing -var-info-type
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResource.properties
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * cdi;/org/eclipse/cdt/debug/mi/core/cdi/model/CharValue.java
- * cdi;/org/eclipse/cdt/debug/mi/core/cdi/model/IntergralValue.java
- * cdi;/org/eclipse/cdt/debug/mi/core/cdi/model/PointerValue.java
- * cdi;/org/eclipse/cdt/debug/mi/core/cdi/model/ReferenceValue.java
- * mi/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
- * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2005-06-27 Alain Magloire
- Base on a patch from Chris Wiebe.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
-
-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
- necessary some command option will not be accepted depending on the version.
- Too much file to enumerate.
- * ...
-
-2005-06-25 Alain Magloire
- We should consider a "^done" like a suspended only for CLICommands, for example:
- (gdb) run
- ^done
- (gdb)
- * mi/org/eclipse/cdt/debug/mi/core/RxThread.java
-
-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
- Fix PR 95705
- * mi/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java
-
-2005-05-16 Alain Magloire
- Fix PR 91975
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2005-05-12 Alain Magloire
- Fix PR 94841
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
-2005-04-28 Alain Magloire
- Added command -gdb-show endian
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
- + mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowEndian.java
- - mi/org/eclipse/cdt/debug/mi/core/command/MIShowEndian.java
- + mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndianInfo.java
- - mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndian.java
-
-2005-04-27 Alain Magloire
- Changes in the CDI interface
- * cdi/org/eclipse/cdt/debug/core/cdi/model/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/Session.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
- * mi/org/eclipse/cdt/debug/mi/core/command/MIEnvrionmentDirectory.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinCommandfactory.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinMIEnvironmentDirectory.java
-
-2005-04-25 Alain Magloire
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManger.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties
- * 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/MI2CDIException.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
-
- + cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java
- + cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java
- + cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java
- + cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Threa.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
-
-2005-04-05 Alain Magloire
- PR 90090
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java
-
-2005-03-24 Alain Magloire
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Memoryblock.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Target.java
- * mi/org/eclipse/cdt/debug/mi/core/command/MIShowEndian.java
- * mi/org/eclipse/cdt/debug/mi/core/output/MIShowEndianInfo.java
-
-2005-03-23 Alain Magloire
- Changes in the CDI ICDIMemoryBlock && ICDIMemoryBlockManagement API.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2005-03-09 Mikhail Khodjaiants
- Fix for bug 87546: Obsolete debug MI settings in Preference need to be removed.
- * RegisterManager.java
- * IMIConstants.java
- * MIPreferenceInitializer.java
-
-2005-03-07 Alain Magloire
- Fix for 87230: base on Jayaprakash ideas/patch
- On HP statck-list-frames answer contain not kosher strings
- * mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java
-
-2005-02-01 Alain Magloire
- Part of Fix for PR 84165
- We check in the expression is a number and
- add a "*" for address watchpoint
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2005-01-20 Mikhail Khodjaiants
- Fix for bug 83355: The disable/enable breakpoints durning debugging acts weird.
- * cdi\org\eclipse\cdt\debug\mi\core\cdi\model\Breakpoint.java
- * cdi\org\eclipse\cdt\debug\mi\core\cdi\BreakpointManager.java
-
-2005-01-13 Alain Magloire
- PR 82764 Fix the the type parsing.
- * mi/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2005-01-10 Mikhail Khodjaiants
- PR 82601 changes to the memory block interface
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ICDIMemoryBlock.java
- * mi/org/eclipse/cdt/debug/mi/core/output/MIMemory.java
-
-2005-01-10 Alain Magloire
- Fix for PR 82506
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
- * mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java
-
-2004-12-20 Alain Magloire
- Fix for PR 81019 for MacOsX
- * mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java
-
-2004-11-26 Alain Magloire
- Make the deferred breakpoint on by default.
- * cdi/org/eclipose/cdt/debug/mi/core/cdi/SharedLibraryManager.java
-
-2004-11-26 Alain Magloire
- Final fix for PR 79583
- * cdi/org/eclipose/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipose/cdt/debug/mi/core/cdi/SharedLibraryManager.java
-
-2004-11-26 Alain Magloire
- Final fix for PR 79452
- * cdi/org/eclipose/cdt/debug/mi/core/cdi/BreapointManager.java
-
-2004-11-26 Alain Magloire
- Fix for PR 79582
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
-
-2004-11-24 Alain Magloire
- Make the terminate() more responsive when gdb is shuting down.
- See long discussion part of the 77435 fixes and 40087.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
- * mi/org/eclipse/cdt/debug/core/MIInferior.java
-
-2004-11-23 Alain Magloire
- Tentative fix for 77435
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
-
-2004-11-19 Alain Magloire
- Protect agains possible NPE.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2004-11-19 Alain Magloire
- Use the qualified name when creating a register.
- Destroy the corresponding gdb variable on register's disposal.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
-
- Added the "dispose" method.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
-
-2004-11-19 Alain Magloire
- RegisterManager.findRegister() was not implemented correctly
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
-
-2004-11-19 Alain Magloire
- No need for stackframe when creating the Type class,
- but rather use the target in the constructor.
-
-2004-11-19 Alain Magloire
- Fix for 78816
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-11-19 Alain Magloire
-
- Clear the confusion about sublist of stackframes.
- PR 78611
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
-
-2004-11-17 David Inglis
-
- ICDIDebugger change to use IBinaryObject instead of IBnaryExecutable
-
- * stc/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
-
-2004-11-17 Alain Magloire
- Fix for 78816
- * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2004-11-16 Alain Magloire
- Optimize things by providing a new method
- ICDIRegisterGroup.hasRegisters();
- * cdi/org/eclipse/cdt/debug/core/cdi/model/RegisterGroup.java
-
-2004-11-16 Alain Magloire
- Remove some warnings and use the new Launch key
- to decide whether or not to use pseudo tty.
- * mi/org/eclipse/cdt/debug/mi/core/TxThread.java
- * mi/org/eclipse/cdt/debug/mi/core/command/RawCommand.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-11-16 Alain Magloire
- NPE when watchpoints are set in the gdb console.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2004-11-16 Alain Magloire
- Do not check for isEnable() when changing condition.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/mode/Breakpoint.java
-
-2004-11-12 Mikhail Khodjaiants
- Implemented the "equals' method of the "Condition" class.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
-
-2004-11-12 Alain Magloire
- Fix for PR 78488
- * mi/org/eclipse/cdt/debug/mi/core/command/MICommand.java
-
-2004-11-11 Alain Magloire
- Fix for PR 75000, from PalmSource
- * cdi/org/eclipse/cdt/debug/core/cdi/model/Variable.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/VariableDescriptor.java
- * mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoType.java
-
-2004-11-10 Alain Magloire
- Fix for PR 51113 and PR 66268
- It allow more flexibility in the GDB console, for example
- when gdb require interactive questions.
-
- * mi/org/eclipse/cdt/debug/mi/core/CLIProcessor.java
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
- * mi/org/eclipse/cdt/debug/mi/core/RxThread.java
- * mi/org/eclipse/cdt/debug/mi/core/SessionProcess.java
- * mi/org/eclipse/cdt/debug/mi/core/TxThread.java
- * mi/org/eclipse/cdt/debug/core/command/MIGDBShowPrompt.java
- * mi/org/eclipse/cdt/debug/core/command/RawCommand.java
- * mi/org/eclipse/cdt/debug/core/output/MIOutput.java
- * mi/org/eclipse/cdt/debug/core/output/MIParser.java
-
-2004-11-09 Alain Magloire
- Throw not implemented exception for exception breakpoint
-
-2004-11-09 Alain Magloire
- Reverting the changes below, for PR 74496. After exchanging with
- the Palm folks, it was not fixing the problem.
- This PR can not be fix for CDT-2.1 moving
- it to 3.0 where we should have enough framework for a better fix.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
-
-2004-11-08 Alain Magloire
- Fix for 74496 ; we should destroy the global
- variables if they are in the address range of a
- shared library being unloaded.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
-
-2004-11-08 Mikhail Khodjaiants
- Added support for refresh preferences and properties.
- * IMIConstants.java
- * MIPlugin.java
- * MIPreferenceInitializer.java: new
- * RegisterManager.java
- * SharedLibraryManager.java
- * plugin.xml
-
-2004-11-08 Alain Magloire
- Implement new Interface ICDIFunctionFinished.
- It returns the return value of the function.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java
- * mi/org/eclipse/cdt/debug/mi/core/event/MIFuncitonFinishedEvent.java
-
-2004-11-07 Alain Magloire
- Support for MIInterpreterExec
-
-2004-11-03 Alain Magloire
- Partial fix for 77435
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
-
-2004-11-02 Alain Magloire
- Refactor ICDIConfiguratio --> ICDISessionConfiguration and ICDITargetConfiguration
- * cdi/org/eclipse/cdt/debug/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/core/cdi/SessionConfiguration.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/TargetConfiguration.java
-
-2004-11-02 Alain Magloire
- Tentative fix for PR 77435
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
-
-2004-10-31 Alain Magloire
- Tentative fix for PR 74496
-
-2004-10-31 Alain Magloire
- Refactor ICDIVariableObject --> ICDIVariableDescriptor
- Refactor ICDIArgumentObject --> ICDIArgumentDescriptor
- Refactor ICDIRegisterObject --> ICDIRegisterDescriptor
- Addition ICDIThreadStorageDescriptor, ICDIThreadStorage
- Addition ICDILocalVariableDescriptor, ICDILocalVariable
- Addition ICDIGlobalVariableDescriptor, ICDIGlovalVariable
-
- Adjust the classes to the changes.
-
-2004-10-29 Alain Magloire
- Remove of ICDISharedLibraryManager
- * cdi/org/eclipse/cdt/debug/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/core/cdi/SharedLibraryManager.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/core/cdi/model/SharedLibraryManagement.java
-
- * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
-
-2004-10-28 Alain Magloire
- Add ICDIValue.getType() and ICDIExpression.geType() new methods.
-
-2004-10-26 Alain Magloire
- Remove ICDIMemoryManager in CDI
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java
-
-2004-10-26 Alain Magloire
- Remove of ICDISourceManager in CDI
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
- * mi/org/eclipse/cdt/debug/mi/core/cdi/command/MIDataDsassemble.java
-
-2004-10-26 Alain Magloire
- Remove of ICDISignalManager in CDI
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java
-
-2004-10-25 Alain Magloire
- Remove of ICDExpressionManager in CDI
- ICDIExpression changes in the interface.
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/EventManager.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/ExpressionManager.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/Session.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/event/ChangedEvent.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/event/DestroyedEvent.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/model/Expression.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/model/Target.java
- * cdi/rg/eclipse/cdt/debug/mo/core/cdi/model/Variable.java
-
-2004-10-24 Alain Magloire
- Changes in ICDITarget.evaluateExpressionToString()
- * org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2004-10-20 Alain Magloire
- Use the new ICDIDebugger interface
-
- * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
- * mi/org/eclipse/cdt/debug/mi/core/MISession.java
- * mi/org/eclipse/cdt/debug/mi/core/SessionProcess.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
- * src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
- * plugin.xml
-
-2004-10-20 David Inglis
- Fixed terminated delay for corefile
- * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2004-10-19 Alain Magloire
- Fix Core Launching
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * mi/org/eclipse/cdt/debug/mi/core/CoreProcess.java
- * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-10-18 Alain Magloire
- Adjust to changes in CDI
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/Session.java
-
-2004-10-17 Alain Magloire
- Remove deprecated method in CDI adjust the implementation.
-
-2004-10-15 Alain Magloire
-
- The way we do breakpoints is changing. gdb does not have
- -break-thread-id command that would allow to change if a breakpoint
- is associated with a particular thread(the same way as in
- -break-condition, and -break-after). So to do thread breakpoint
- we associate 1 Eclipse breakpoint with n GDB breakpoints:
- 1:n
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
-
-2004-10-04 Alain Magloire
-
- IllegalMonitorException fix.
- mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
- src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
-
-2004-09-22 Alain Magloire
- Makes the mi/ source folder independant of the cdt.core
- so we can make it a library.
- To many files to enumerate
-
-2004-09-17 Alain Magloire
- Support for 64 bits application
- PR 74056 74058. Pathc from Artyom Kuanbekov
- To much files to enumerate.
-
-2004-09-15 Alain Magloire
-
- Chang Type to take a VariableObject.
-
-2004-09-15 Alain Magloire
-
- The correct thread was not set.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
-
-2004-09-12 Alain Magloire
- Since MISession is attach to the Target, the
- way we fire termination events must change also.
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * src/org/eclipse/cdt/debug/mi/core/MISession.java
-
-2004-09-09 Alain Magloire
- Introduction of new classes in the CDI interface
- ICDIExecuteStep
- ICDIExecuteStepReturn
- ICDIExecuteResume
- ICDISuspend
- ICDIThreadGroup
- The code is adjust to the new demands.
-
-2004-09-07 Alain Magloire
-
- Remove ICDIBreakpointManager class
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2004-09-06 Alain Magloire
-
- The changes is move the MISession as part
- of Target. The rationale; we want to have
- Session
- ---------------
- | |
- Target(gdb) Target(gdb)
- To be able to do this we need to untie the MISession
- from Session.
-
- Also we are moving toward retiring the ICDIXXXXManager
- and move the methods in the the proper methods.
-
-2004-09-01 Alain Magloire
-
- Fix for 72974
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
-
-2004-08-14 Alain Magloire
-
- Fix for 71992.
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2004-08-05 Alain Magloire
-
- Tentative Fix for PR 69991
- * src/org/eclipse/cdt/debug/mi/core/RxThread.java
-
-2004-07-22 Alain Magloire
-
- Fix for PR 70688
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2004-07-12 Alain Magloire
-
- Remove some compiler warnings.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
- * mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvirnmentDirectory.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-07-09 Alain Magloire
-
- Patch from gwatson to deal with Mac
- version of gdb, there gdb as a different
- syntax but still valid.
-
- * mi/org/eclipse/cdt/debug/mi/core/output/MIArg.java
-
-2004-07-09 Alain Magloire
-
- Patch from Stefan Bylund for PR 69711
- Added support for thread name.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
- * mi/org/eclipse/cdt/debug/mi/core/output/MIInfoThreadsInfo.java
-
-2004-07-02 Mikhail Khodjaiants
-
- Fix for bug 68934: Debug into dll doesn't work.
- The "solib-search-path" and "stop-on-solib-events" options are not supported by gdb on CygWin.
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
-
-2004-07-02 Alain Magloire
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java
-
-2004-06-29 Alain Magloire
-
- When selecting threads gdb can reset the current
- stack frame on us. We should be aware of it and reset.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/mode/Target.java
-
-2004-06-24 Alain Magloire
-
- Fix 68226
- * cdi/org/eclipse/cdt/debug/mic/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mic/core/cdi/Configuration.java
- * cdi/org/eclipse/cdt/debug/mic/core/cdi/SoourceManager.java
-
-2004-06-22 Alain Magloire
-
- Fix PR 68176
- * mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvironmentCD.java
-
-2004-06-09 Alain Magloire
- Fix for PR 66338
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
-
-2004-06-09 Alain Magloire
-
- Keep the breakpoint disable when doing
- deffered breakpoint installation.
-
- * cdt/org/eclpse/cdt/debug/mi/core/cdi/EventManager.java
-
-2004-06-08 Alain Magloire
-
- Fix for PR 65077
-
- * mi/org/eclipse/cdt/debug/mi/core/command/CygwinCommandFactory.java
- * mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvironmentCD.jav
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
-
-2004-06-02 Mikhail Khodjaiants
-
- Moved externalized strings to the right property file.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties
- * src/org/eclipse/cdt/debug/mi/core/MIPluginResources.properties
-
-2004-0602 Alain Magloire
-
- Overload getFullName() for registerObject
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/mode/RegisterObject.java
-
-2004-05-28 Alain Magloire
-
- GDB has special "types"
- int8_t int16_t etc ... parse them also.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterObject.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
-
-2004-05-28 Alain Magloire
-
- QuickFix for PR 58249
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
-2004-05-28 Alain Magloire
-
- Error in looking for the CIdentifier.
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2004-05-28 Alain Magloire
-
- Fix to PR 60020.
- GDB returns the children when a pointer
- points to a structure.
- Also ignore the keyword "const" when parsing.
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2004-05-18 Alain Magloire
-
- Remove dependencies on the compatibility plugin
- and move to be more Eclipse-3.0 compliant.
-
-2004-05-07 Alain Magloire
- PR 57127. Pass the stream verbatim
- even if it has spaces.
- This what gdb expects.
-
- * mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java
-
-2004-05-07 Alain Magloire
-
- Patch from Keith Rolling(Palm Source).
- PR 60664
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2004-04-01 Alain Magloire
-
- GDBServer configuration should be "*" not "native"
-
- * plugin.xml
-
-2004-03-23 Alain Magloire
-
- Fix for bug 55766: The Shared Libraries view displays the wrong icon if the "Load Symbols" action fails.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
-
-2004-03-17 Alain Magloire
-
- Changes pass the array of events instead
- of one at a time
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
-
-2004-03-16 Tanya Wolff
-
- Marked strings in src as non-translatable
- * src/GDBServerDebugger.java
- * src/GDBTypeParser.java
- * src/RxThread.java
-
-2004-03-14 Alain Magloire
-
- Break the ChangeLog file in two.
-
- * ChangeLog
- * ChangeLog-2003
-
-2004-03-14 Alain Magloire
-
- The Managers extends Manager class for more flexibility
-
- * cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
-
-2004-03-12 Tanya Wolff
-
- Marked strings as non-translatable and externalized strings in new exceptions thrown.
-
- * cdi/
- * src/
-
-2004-03-12 Tanya Wolff
-
- Marked strings as non-translatable.
-
- * mi/
-
-2004-03-01 Alain Magloire
-
- Reog. New source browser.
- Move the classes to the appropriate categories.
-
- * mi/
- * cdi/
-
-2004-02-19 Alain Magloire
-
- PR #52317
- The children were added in the wrong order.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2004-02-17 Alain Magloire
-
- If we attach save the PID for later
- for example to be able to suspend.
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-02-11 Alain Magloire
-
- Use String.endsWith("(gdb)") to detect the prompt.
- Sometimes gdb does not flush the endline.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2004-01-30 Alain Magloire
-
- Allow the clients to override the interrupt.
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
- * src/org/eclipse/cdt/debug/mi/core/TxThread.java
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
- * src/org/eclipse/cdt/debug/mi/core/command/MICommand.java
-
-2004-01-29 Alain Magloire
-
- The CDT debug ui prefers things to be in ascending
- number. It makes life easier so we comply.
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoThreadsInfo.java
-
-2004-01-28 Alain Magloire
-
- Some clients using MI need to have access to thoes
- methods change the scope for protected.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
- * src/org/eclipse/cdt/debug/mi/core/command/CLICommand.java
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoThreadsInfo.java
-
-2004-01-22 Alain Magloire
-
- Cache the stackframes when we become suspended, to reduce
- the chat between gdb.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
-
diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog-2003 b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog-2003
deleted file mode 100644
index 60b45209194..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog-2003
+++ /dev/null
@@ -1,2151 +0,0 @@
-2003-12-22 Mikhail Khodjaiants
- Fix for bug 49282 terminate the gdb session if the termination of the inferior fails.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2003-12-22 Mikhail Khodjaiants
- Fix for Bug 49278 do not retry the "info threads" command if the first attempt fails.
- Throw an exception from the "getCThreads" method when it fails.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2003-12-18 Alain Magloire
-
- PR 49148
- Set environment variable value to give the program.
- Arguments are VAR VALUE where VAR is variable name and VALUE is value.
- VALUES of environment variables are uninterpreted strings.
- This does not affect the program until the next "run" command.
-
- So pass the string raw.
-
- * src/org/eclipse/cdt/debug/mi/core/command/MIGDBSetEnvironment.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
- * src/org/eclipse/cdt/debug/mi/core/CommandFactory.java
-
-2003-12-17 Mikhail Khodjaiants
-
- Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
-
-2003-12-16 Mikhail Khodjaiants
-
- Show the gdb arguments when tracing.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2003-12-16 Mikhail Khodjaiants
-
- Fix for PR 48870: Terminate gdb if attach to process fails.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2003-12-09 Alain Magloire
-
- Do not try to interrupt if the target was suspended.
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2003-12-08 Alain Magloire
-
- Target.terminate() did not pass the exception up.
- Added new method MIInferior.terminate().
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
-
-2003-12-02 Alain Magloire
-
- Retry the stack-info-depth when it fails the first time
- and decrement the count. GDB can cope up the second try
- and probably mark the thread invalid.
- Patch base on Ashish Karkare patch:
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
-
-2003-11-26 Mikhail Khodjaiants
- Cleanup.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2003-11-26 Mikhail Khodjaiants
- Cleanup.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
- * src/org/eclipse/cdt/debug/mi/core/command/MIBreakAfter.java
- * src/org/eclipse/cdt/debug/mi/core/event/MIFunctionFinishedEvent.java
- * src/org/eclipse/cdt/debug/mi/core/event/MIInferiorSignalExitEvent.java
- * src/org/eclipse/cdt/debug/mi/core/event/MISignalEvent.java
- * src/org/eclipse/cdt/debug/mi/core/event/MIWatchpointTriggerEvent.java
- * src/org/eclipse/cdt/debug/mi/core/output/MIGDBShowDirectoriesInfo.java
- * src/org/eclipse/cdt/debug/mi/core/output/MIGDBShowSolibSearchPathInfo.java
- * src/org/eclipse/cdt/debug/mi/core/output/MIList.java
-
-2003-11-25 Alain Magloire
-
- Process the suspend event even if there is not threads
- or stack associated with the target.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
-
-2003-11-22 Alain Magloire
-
- In MISession constructor if the initialization fails shutdown
- the Tx/RX/Event threads.
- In MIPlugin if the initialization fails shutdown the pty console.
- Ditto for GDBDebugger/GDBServerDebugger/CygwinGDBDebugger.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
- * src/org/eclipse/cdt/debug/mi/core/MISession.java
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
-
-2003-11-21 Alain Magloire
-
- The wrong MIPlugin.createCSession() method was used.
- Problem noted by Ashish.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
-
-2003-11-21 Mikhail Khodjaiants
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java
- Fix for PR 46592: Debug View shows Functions as func(type param,...)().
- Return an empty string instead of "??" if the function name is not available.
-
-2003-11-20 Alain Magloire
-
- Fix NPE: 46313. Setting breakpoint when the target was running
- was throwing NPE.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- * src/org/eclipse/cdt/debug/mi/core/cdit/EventManager.java
-
-2003-11-19 Mikhail Khodjaiants
-
- Fix for PR 45533: MIException while creating MISession can leave an orphan gdb process.
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java: removed the 'getAdjustedTimeout' method.
-
-2003-11-19 Mikhail Khodjaiants
-
- Fix for PR 45533: MIException while creating MISession can leave an orphan gdb process.
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java: initialization of preferences by default values.
- * src/org/eclipse/cdt/debug/mi/core/MISession.java: removed the duplicate constant for the default
- launch timeout value.
-
-2003-11-13 Mikhail Khodjaiants
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java
- Fix for PR 46592: Debug View shows Functions as func(type param,...)().
- In some situations gdb returns the function names that include parameter types.
- To make the presentation consistent truncate the parameters.
-
-2003-11-06 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java:
- Small fix for the defferred breakpoint support.
-
-2003-11-06 Alain Magloire
-
- Patch from Ashish Karkare:
- A CDT 1.2 patch that enables setting of
- serial line speed in the launch configuration when debugging remote targets.
-
- * src/org/eclipse/cdt/debug/mi/core/IGDBServerMILaunchConfigurationConstants.java
- New attribute definition DEV_SPEED.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
- Extracts serial speed value and passes it to createCSession().
-
-
-2003-10-29 Alain Magloire
-
- Deal with PR 45533
-
- Make a preferenc for Timeout and use it when launching
- the ICDebugger session, when way wait for for gdb
- to say "ready" by returning the prompt.
-
- * src/org/eclipse/cdt/debug/mi/core/MISession.java
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
- * src/org/eclipse/cdt/debug/mi/core/IMIConstants.java
-
-2003-10-17 Alain Magloire
-
- Put the framework to deal with deferred breakpoint.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ResumeEvent.java
- Deal with MIRunningEvent.RETURN.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
- Check if MIBreakpoint is null first.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
- Check if MIWathchpoint is null first.
- * src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- Implement Deferred Breakpoint
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
- Implement Deferred Breakpoint
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
- Enable deferredBreakpoint.
- * src/org/eclipse/cdt/debug/mi/core/CygwinDebugger.java
- Enable deferredBreakpoint.
-
-
-2003-10-07 Mikhail Khodjaiants
-
- All methods of 'IRuntimeOptions' should throw CDI exceptions in case of failure.
- * src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
-
-2003-09-30 Alain Magloire
-
- ICDIVariableObject.equals();
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java
-
-2003-09-29 Mikhail Khodjaiants
- Added the initialization of the shared libraries' attributes to CygwinGDBDebugger.
-
- * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
-
-2003-09-26 Alain Magloire
-
- Second part of PR 43496.
- On the startup of GDB, we have to wait for "(gdb)" prompt
- to make sure that gdb is ready to accept command.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2003-09-25 Alain Magloire
-
- Fix for PR 43496.
- In the event of an error we should Process.destroy()
- after creating the Process.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
-
-2003-09-11 Mikhail Khodjaiants
- Moving the shared library search paths block to mi UI.
- * IMILaunchConfigurationConstants.java: added the 'ATTR_DEBUGGER_SOLIB_PATH' attribute.
-
-2003-09-11 Alain Magloire
-
- Fix to info shared parsing.
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibary.java
-
-2003-09-09 Mikhail Khodjaiants
- Regrouping the launch configuration constants.
- * IMILaunchConfigurationConstants.java
-
-2003-09-09 Mikhail Khodjaiants
- Added the 'stop-on-solib-events' option.
- Changed the initialization of the shared library search path.
- Changed the messages of the thrown exceptions.
- * GDBDebugger.java
-
-2003-09-09 Mikhail Khodjaiants
-
- CoreFileConfiguration supports shared libraries.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/CoreFileConfiguration.java
-
-2003-08-30 Alain Magloire
-
- Unnecessary synchronization making deadlocks. Should revisit this code.
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java
-
-2003-08-29 Mikhail Khodjaiants
-
- Added new command - 'set stop-on-solib-events'.
-
- * src/org/eclipse/cdt/debug/mi/core/command/MIGDBSetStopOnSolibEvents.java
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
-
- Implementation of the new methods added to the 'ICDISharedLibraryManager' interface.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
-
-2003-08-26 Alain Magloire
-
- This is still a hack: "info shared" the real solution
- is to implement in GDB/MI the corresponding command.
- So now we do weird parsing, that varies from platform
- to platform. For example Cygwin output of "info shared"
- is totally different from the GNU/Linux one etc ...
- We the best we can to cope ... but things will break.
-
- * src/org/eclipse.cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java
-
-2003-08-26 Alain Magloire
-
- Using the wrong method for toString() and we were returning
- a overly verbose string.
-
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2003-08-25 Alain Magloire
-
- Small fix, get the datatype for the GDBTypeParser.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
-
-2003-08-22 Alain Magloire
-
- For casting array we use the "@" format, hide it in
- the name. But show it the qualifiedName() since the
- expression is use to evaluate.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
-
-2003-08-21 Alain Magloire
-
- GDB varobj for the arrays children name only returns
- the index. We need to construct the entire name:
- char buffer[2]
- GDB return "0", "1" for the children names.
- We will return
- "buffer[0]", "buffer[1]"
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/Variable.java
-
-2003-08-20 Alain Magloire
-
- GDB/MI altough define an interface that all commands should
- follow .. they do not. For example, we should be able
- to separate options from agument with a "--" string not
- all commands. The latest is -break-condition.
- So we override the MICommand.toString() to do specific
- parsing for specific commands.
-
- * src/org/eclipse/cdt/debug/mi/core/command/MICommand.java
- break the toString() method.
- * src/org/eclipse/cdt/debug/mi/core/command/MIBreakCondition.java
-
-2003-08-19 Alain Magloire
-
- Fix to the GDBTypeParser to deal with gdb
- awkwardness
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2003-08-19 Alain Magloire
-
- GDB, uses false category for C++ class/struct.
- Fix to return the correct name.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
-2003-08-18 Alain Magloire
-
- Patch from Chris Songer, excerpt from the email.
- Using the phrase "To ensure consistency between a register name and its
- number, the output list may include empty register names," the MI protocol
- appears to allow gdb to return a "sparse" array of registers by giving a 0
- length name in response to the -data-list-register-names-command. CDT 1.0.1
- does not handle this especially well and subsequently exposes a bug in GDB
- 5.1.3 and crashes it if the debugger has more than 3 register names of 0
- length.
-
- example:
-
- 8-data-list-register-names
- (gdb)
- 8^done,register-names=["ar0","ar1",... ,"","","","","","","ur0",\
- "ur1","ur2","ur3","ur4","ur5","ur6","ur7","","" ..]
-
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIDataListRegisterNamesInfo.java:
- New method getNumRealNames().
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java:
- Check if the register name is not empty.
-
-2003-08-18 Alain Magloire
-
- From the manual:
- By default GDB will automatically keep track of objects as they are
- loaded and unloaded by the dynamic linker. By using the command `set
- stop-on-solib-events 1' you can arrange for GDB to stop the inferior
- when shared library events occur, thus allowing you to set breakpoints
- in shared libraries which are explicitly loaded by the inferior.
-
- * src/org/eclipse/cdt/debug/mi/core/event/MISharedLibEvent.java:
- New file, StoppedEvent du to shared lib events.
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java:
- Catch MISharedLibEvent.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryevent.java:
- New file implements ICDISharedLibaryEvent.
- * src/org/eclipse/cdt/debug/mi/core/RxThread.java:
- Hack to catch suspend/stop on shared library.
-
-2003-08-11 Mikhail Khodjaiants
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Removed the 'type' parameter from the 'getVariableObjectAsArray' method.
-
-2003-08-11 Mikhail Khodjaiants
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java:
- The 'type' argument of the 'getVariableObjectAsArray' method shouldn't be null.
-
-2003-08-11 Mikhail Khodjaiants
- * src/org/eclipse/cdt/debug/mi/core/cdi/variableManager.java
- Mistype in the 'CheckType' method.
-
-2003-08-07 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/variableManager.java
- getVariableObjectAsArray() ignore the type argument it does
- not work with gdb.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java
- Added hasChildren() method.
-
-2003-08-07 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Update the interface to reflect ICDIVariableManager.
-
-2003-08-06 Mikhail Khodjaiants
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java:
- Removed the unused local variable 'children' from the 'getVariables' method.
-
-2003-08-07 Alain Magloire
-
- PR 38964.
-
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java:
- The method interrupted was synchronized and so was the
- setSuspended(). Now do a notify when the status change.
- Throw an exception if the interrupt() failed.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java:
- Do not check for running.
-
-2003-08-06 Alain Magloire
-
- Dealing with casting: Casting a field of a structure did not
- work properly for example:
- struct foo { int bar; } foobar;
- To cast the field bar, we need to construct the full qualified
- name "foobar.bar".
- Unfortunately for C++ things are hectic in the GDB/MI world
- the childre of structure are not the fields. So we try to
- deal with it too.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java:
- New constructor, new method getLanguage() to deal with
- different type of languages ex: C vs C++.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- Clean up and added a bunch of set/getXXX() methods instead of
- accessing directly the fields.
- * src/og/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Clean the methods use for casting and format the indentation.
- * src/org/eclipse/cdt/debug/mi/core/command/MIVarInfoExpression.java:
- Added parsing method.
-
-2003-08-06 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- Implement isEditable method.
-
-2003-08-06 Mikhail Khodjaiants
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java:
- Fix for 'isEditable'.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- Use correct expression in 'sizeof'.
-
-2003-08-06 Alain Magloire
-
- First framework to deal with breaking the arrays in ranges.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java:
- Remove unused getArgumentObject().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java:
- Remove unuse getRegisterObject().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java:
- Move methods to VariableObject to comply with the interface.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- Implement new methods of ICDIVariableObject.java
- Save the castin information.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java:
- New method getVariables(int, int).
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- New method encodeVariable(), to get the encode specific string
- for gdb casting of arrays.
-
-2003-07-28 Mikhail Khodjaiants
-
- Minimize the number of the "evaluate expression" requests when changing the value of the floating point types.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
-
-2003-07-17 Alain Magloire
-
- Catch the use of cli command "detach" and fire the appropriate events.
-
- * src/org/eclipse/cdt/debug/mi/core/CLIProcessor.java
-
-2003-07-16 Alain Magloire
-
- Provide FunctionValue, PointerValue and ArrayValue.
- For ArrayValue apply the patch from Chris Songer, excerpt from
- his email:
- Given GDB performance, we saw CDT start to time out on large array
- requests. The following patch corrects this by scaling the time out with
- the number of children being retrieved. I have not looked at the head on
- this so your mileage may vary. On 1.0.1 with this and the MIParser change
- you can open 16k arrays.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValueValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
-
-2003-07-10 Alain Magloire
-
- In the case of not having a PTY to unmixed inferior output from gdb commands
- do the only sane thing and when a response comes in that is not a valid
- MI format consider it as inferior output.
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIParser.java:
- Put non valid lines in the TargetStream.
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java:
- Pass output straight to the target.
- * src/org/eclipse/cdt/debug/mi/core/TxThread.java:
- Remove unused code.
- * src/org/eclipse/cdt/debug/mi/core/command/Command.java:
- Try to remove duplicate errors when throwing the MIException.
-
-2003-07-08 Alain Magloire
-
- Unfortunately GDB/MI does not make the errors available via the advertise
- way explain in the documentation, for example:
- 27-var-create - * this->aaa
- &"There is no member or method named aaa.\n"
- &"Type Hello has no component named aaa.\n"
- 27^error,msg="."
-
- According to the doc, the error should be available in the msg field:
- 27^error,msg="There is no member or method named aaaa"
-
- Since this will not be fix in GDB/MI anytime soon, we cope with it by
- grabing the logstream error and make it available in
-
- CDIException.getDetailedMesssage().
-
- * src/org/eclipse/cdt/debug/mi/core/command/*.java: All the commands
- changed to grab also the logstream messages if any for the exception.
-
-2003-06-25 Alain Magloire
-
- Patch from Chris Songer, excerpt from its email:
- The MIParser is O(N^2) time in the length of a line returned from GDB.
- While not an issue for OOB messages, this can be quite an issue for array
- retrieval from the target and other potentially long messages. It's N^2
- because it relies on StringBuffer.deleteCharAt( 0 ) and
- StringBuffer.delete( 0, X ). These operations appear to do a copy of the
- remaining data in the Sun Java library rather than bumping some index.
-
- The following diffs are code that we are using on 1.0.1 to correct this
- issue. It's relatively new, so there may be some bugs but has certainly
- performed just fine in our initial regressions. Because of that I'm not
- sending it in as a patch, more an FYI really. The basic change is exactly
- what you'd expect: these diffs make MIParser use a new type of string
- buffer that's quite efficient at deleting from the head of the array.
-
- * src/org/eclipse/cdt/debug/mi/core/output/MIParser.java
-
-2003-06-18 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java:
- Check if the variable was a register.
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java:
- Cleanup.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java:
- Removing of method {get,set}Value() and new method getChildren().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- (setValue): calls update on the appropriate manager.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterValue.java:
- Remove file, unused.
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- (getVariableObjectAsType): check for register.
- (getVariableObjectAsArray): check for register.
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java:
- (getRegister): reimplemented.
-
-2003-06-18 Mikhail Khodjaiants
- Removed unused local variable.
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
-
-2003-06-17 Alain Magloire
-
- PR 38934
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java (update):
- We have to call "-var-update" to update the register values in gdb.
-
-2003-06-05 Mikhail Khodjaiants
- gdb/mi support of infinite values of the floating point types.
- * DoubleValue.java
- * FloatingPointValue.java
- * FloatValue.java
-
-2003-06-05 Mikhail Khodjaiants
- Removed the redundant methods from the 'ICDIFloatingPointValue' interface.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
-
-2003-06-04 Mikhail Khodjaiants
- Correction in the parsing of reference value.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java
-
-2003-06-04 Mikhail Khodjaiants
- Added some missing types and methods for the type parsing.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java: new
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java: new
-
-2003-06-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java:
- Bug fix gdb returns fix like "char [200]" no variables.
-
-2003-06-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- (getType): save the head of the type for the return value.
-
-2003-06-02 Alain Magloire
-
- Enable the new type parsing with the class GDBTypeParser.
- This class takes the output of GDB/MI
- (gdb) whatis
- or
- (gdb) ptype
- And parse it.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java
- * src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
- * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
-
-2003-05-25 Alain Magloire
-
- Do extra parsing.
- * src/org/eclipse/cdt/debug/mi/core/model/type/ArrayType.java
- * src/org/eclipse/cdt/debug/mi/core/model/type/DerivedType.java
- * src/org/eclipse/cdt/debug/mi/core/model/type/PointerType.java
- * src/org/eclipse/cdt/debug/mi/core/model/type/FunctionType.java
- * src/org/eclipse/cdt/debug/mi/core/model/Variable.java
-
-2003-05-24 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/StackFrame.java
- When execption reset the variable to null and rethrow the exception.
-
-2003-05-24 Alain Magloire
-
- Continuing the implementation of types.
- ICDIType is ICDIObject.
- * src/org/eclispe/cdt/mi/core/cdi/model/type/Type.java:
- Extends CObject
-
-2003-05-23 Alain Magloire
-
- Draft implementation of org.eclipse.cdt.debug.core.cdi.model.type/*
-
-2003-05-06 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java (suspend):
- Suspend the program before selecting the thread.
-
-2003-05-01 Mikhail Khodjaiants
- Implementations of the new "terminateSessionOnExit" method of ICDIConfiguration.
- * Configuration.java
- * CoreFileConfiguration.java
-
-2003-04-30 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java:
- Call MIInferior.update() if attaching session.
-
-2003-04-30 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java (supportsTerminate):
- Returns true.
-
-2003-04-25 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/EventManager.java (update):
- Remove the call to MIInferior.update(), wrong place.
- * src/org/eclipse/cdt/debug/mi/core/EventThread.java (run):
- Call MIInferior.update() when suspended.
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java (update):
- Do not do the call to "info program" for type "attached" sessions.
- * src/org/eclipse/cdt/debug/mi/core/MISession.java (terminate):
- When terminate() is call disable posting commands to the queue etc...
-
-2003-04-25 Mikhail Khodjaiants
-
- Fix for bug 36909.
- * MIFrame.java:
- gdb returns "??" as a function name if symbols are not available.
- Set the function name in this case to "";
-
-2003-04-24 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java (createMIInfoProgram):
- New method.
- * src/org/eclipse/cdt/debug/mi/core/command/MIInfoProgram.java:
- New file, "info program".
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoProgramInfo.java:
- New file, parsing of "info Program".
- * src/org/eclipse/cdt/debug/mi/core/output/EventManager.java (processSuspend):
- Call MIInferio.update();
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java (update):
- New method to retrieve the pid.
- (interrupt): Try doing Spawner.raise(pid, INT) as a fallback.
- * src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java (supportSuspend):
- Bug fix.
-
-2003-04-23 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java (update):
- Move the creation of the list after the call to "info signals".
- The call may fail.
-
-2003-04-21 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/Target.java (suspend):
- Remove the delay of 10 secs.
- * src/org/eclipse/cdt/debug/mi/core/MIInferior.java (interrupt):
- Do a delay of 10 secs to allow time for the inferior to stop.
- * src/org/eclipse/cdt/debug/mi/core/MISession.java (terminate) :
- Clear the EventQueue, if we restart.
- * src/org/eclipse/cdt/debug/mi/core/Queue (isEmpty):
- New method.
-
-2003-04-21 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java:
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java:
- Ignore exception when doing "set auto-solib-path on".
-
-2003-04-17 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java:
- setCurrentThread(), calls VariableManager.update();
- * src/org/eclipse/cdt/debug/micore/cdt/model/Thread.java:
- setCurrentStackFrame() calls VariableManager.update();
-
-2003-04-07 Mikhail Khodjaiants
- Changed the messages of CDI exceptions.
- * MISession.java
- * Target.java
-
-2003-04-04 Alain Magloire
-
- Code from Monta Vista to add a Session via GDBServer.
-
- * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java:
- * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java:
- * src/org/eclipse/cdt/debug/mi/core/IGDBServerMILaunchConfigurationConstants.java:
- * plugin.xml
-
-2003-04-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdt/VariableManager.java:
- Check for null in update().
-
-2003-04-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdt/VariableManager.java:
- update(), put a limit on the number of stack we check for variables.
-
-2003-04-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdt/model/Target.java:
- * src/org/eclipse/cdt/debug/mi/core/cdt/model/Thread.java:
- Before updating the register check if the manager is on autoupdate.
-
-2003-04-02 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdt/model/Target.java:
- suspend() sync for at least < 10 seconds to allow the gdb to
- suspend via SIGINT the program.
-
-2003-03-28 Mikhail Khodjaiants
- Added time stamp to the trace messages.
- * MIPlugin.java
-
-2003-03-28 Mikhail Khodjaiants
- Correction of the previous patch.
- * MIAsm.java
-
-2003-03-27 Mikhail Khodjaiants
- Applied patch from Chris Songer: Assembly View Fixups
- * Instruction.java
- * MIAsm.java
-
-2003-03-19 Alain Magloire
-
- Some applications, like recursive code, have a very deep stackframes
- bigger > 50. This can turn out to be a problem, as the VariableManager
- will try to update all the variables and there can be a lot of local
- variable in all those stackframes. We can not use:
- "-var-update *"
- either since on gdb-5.2.1, for reasons unknown to me this will make
- gdb unstable/crash. So the approach is to only update variables
- in the current stackframe.
- The advantage we only update a small set of variables.
- The downside if we have side effects i.e. pointers pass to
- argument and modifying the pointer affect the callees memory.
- But this is a small price to pay and usually C/C++ programmer
- are interrested to see changes of variables in the current stack
- not changes 20 stack before.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Method update() only check the variable in the scope of the
- current stackframe(the highest stack). This will include
- any globals.
-
-2003-03-19 Alain Magloire
-
- Base on PR/patch from Chris Songer.
- Assigning a value to a register may have side-effects
- on other registers. When assigning, the action is now
- to upate again the values. The same for the variables.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java:
- Method setValue() calls manager.update() after the assignment.
-
-2003-03-17 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java:
- getArguments() and getLocalVariable() are caching the results.
-
-2003-03-16 Alain Magloire
-
- GDB/MI does not keep the stack level, from what we expect. In gdb, the
- highest stack is level 0 and lower stack as the highest level:
- -stack-list-frames
- ^done,stack=[frame={level="0 ",addr="0x0804845b",func="main",file="hello.c",line="24"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- -stack-list-frames
- ^done,stack=[frame={level="0 ",addr="0x08048556",func="main2",file="hello.c",line="58"},
- frame={level="1 ",addr="0x08048501",func="main",file="hello.c",line="41"},
- frame={level="2 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- This is of no use to us since the level is always "0". The level is necessary for example when
- doing recursive calls to make a distinction between frames.
- So in CDT this reverse the hidghest frame will have the highest number. In CDT:
- stack=[frame={level="2 ",addr="0x0804845b",func="main",file="hello.c",line="24"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- stack=[frame={level="3 ",addr="0x08048556",func="main2",file="hello.c",line="58"},
- frame={level="2 ",addr="0x08048501",func="main",file="hello.c",line="41"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java:
- Takes a new Argument in the constructor, the level.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Threawd.java:
- Create the StackFrame with the constructor.
- * src/org/eclipse/cdt/debug/mi/core/cdi/Location.java:
- Fix equals().
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Use the right level when setting the frame.
-
-2003-03-14 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java:
- New method getArgumentObject().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java:
- New method getRegisterObject().
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- Checks for ICDIVariable and ICDIArgument since they are now ICDIVariableObject too.
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java:
- Checks for ICDIRegister when creating since they are now ICDIRegisterObject too.
-
-2003-03-13 Alain Magloire
-
- Small bug fix
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
-
-2003-03-13 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- New method getLocalVariableObjects() implemented returns all the local.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
- getLocalVariables() use getLocalVariableObjects().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java:
- getName() does not longer throw an Exception.
-
-2003-03-11 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- New methods getVariableObjectAsArray() getVariableObjectAsType().
-
-2003-03-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/CommandQueue.java (print): Comment out.
- * src/org/eclipse/cdt/debug/mi/core/Queue.java (print): Comment out.
-
-2003-02-12 Mikhail Khodjaiants
- The 'setAutoSolib' method is no longer in ICDISharedLibraryManager.
- * GDBDebugger.java
-
-2003-02-12 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java:
- Removed getRegisterObjects(), getRegisters(), getSharedLibraries().
- Those actions are done via the managers.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java (getChild):
- Check the grand children also.
-
-2003-02-12 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java (isAutoLoadSymbols):
- New method.
- * src/org/eclipse/cdt/deb/mi/core/command/MIGDBShow.java (getMIGDBShowInfo):
- New method.
-
-2003-02-12 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java (ChangedEvent):
- Returns a Variable.
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java (DestroyedEvent):
- Check if it was an expression also.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java (getVariables):
- Calls the parent's implementation.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java (getVariables):
- New implementation.
- * src/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java (update):
- Deal with new MIVarDeleteEvent.
- * src/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java (addExpression):
- Removed.
- (removeExpression): New method.
- * src/org/eclipse/cdt/debug/mi/core/event/MIVarChangedEvent.java (getScope):
- removed.
- * src/org/eclipse/cdt/debug/mi/core/event/MIVarDeletedEvent.java:
- New file.
-
-2003-02-09 Alain Magloire
-
- in GDB/MI 5.3 and below, the -data-list-register-xxx can bring gdb down with
- an assert(). The problem is that code like this
- ui_out_list_begin();
- for () {
- if(error)
- return ERROR;
- }
- ui_out_list_end();
- The ui_out_list_end() is never call.
- However gdb offers the varobj to deal cleanly with register but calling
- "-var-update *" seems to make gdb misbehave and hang after a while.
- So we use a mixed of -data-list-register-xxx calls and var-object to deal
- with registers and do not call "-var-update *" but rather call it for
- each time for individual objects to see the updates.
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java:
- Reimplemented to use the var obj.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterValue.java:
- New file implement ICDIValue.
- * src/org/eclipse/cdt/debug/mi/core/cdi/EventManagero.java (processSuspendedEvent):
- Call each manager.update().
- * src/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java (update):
- Reimplemented.
- * src/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java (update):
- Reimplemented
- * src/org/eclipse/cdt/debug/mi/core/cdi/UpdateManager.java:
- Removed.
- * src/org/eclipse/cdt/debug/mi/core/cdi/IUpdateListener.java:
- Removed.
- * src/org/eclipse/cdt/debug/mi/core/CLIProcessor.java:
- Catch the cli "run" command.
-
-2003-02-06 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java (getVariableArrayObject):
- New Method to type cast in an array.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java (VariableObject):
- New constructor.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManger.java(getSignal):
- Return an signal object even when the session is terminated.
-
-2003-02-05 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/command/MISignal.java:
- * src/org/eclipse/cdt/debug/mi/core/command/MIJump.java:
- Return a fake ^running, since the MI semantic is not respected.
-
-2003-02-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/CLICommand.java:
- Catch cli command "jump"
-
-2003-02-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java:
- New implementation for signal(), jump, and stepReturn(boolean).
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java:
- (signal): Calls Target.signal().
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/SignalManager.java:
- (signal): Method removed.
- * src/org/eclipse/cdt/debug/mi/core/command/MIJump.java:
- New file.
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java:
- New method creteMIJump().
-
-2003-02-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManger.java:
- Implement signal() method.
- * src/org/eclipse/cdt/debug/mi/core/command/MISignal.java:
- New file.
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java:
- (createMISignal): new method.
-
-2003-02-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java:
- Catch MIInferiorSignalExitEvent.
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java:
- Catch MIInferiorSignalExitEvent.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java:
- New File.
- * src/org/eclipse/cdt/debug/mi/core/event/MIInferiorSignalExitEvent.java:
- New File
- * src/org/eclipse/cdt/debug/mi/core/event/CLIProcessir.java:
- "signal" command is like continue.
- * src/org/eclipse/cdt/debug/mi/core/event/RxThread.java:
- Catch MIInferiorSignalExitEvent.
-
-2003-02-04 Alain Magloire
-
- Refactor MISignal in MISigHandle to not confus with
- CLI command "signal SIGNAL".
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java:
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoSignalsInfo.java:
- * src/org/eclipse/cdt/debug/mi/core/output/MISigHandle.java:
-
-2003-02-03 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java:
- (loadSymbols): set the read flag to true.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java:
- (getMIShared): New method.
- * src/org/eclipse/cdt/debug/mi/core/output/MIShared.java:
- (setSymbolsRead): New method.
-
-2003-02-01 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java:
- Support for ICDISignal event.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java (handle):
- Implemented.
- * src/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java (update):
- Support for ICDISignal event.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java (handle):
- New method.
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java (createMIHandle):
- New method
- * src/org/eclipse/cdt/debug/mi/core/command/MIHandle.java:
- New File.
- * src/org/eclipse/cdt/debug/mi/core/CLICommand.java:
- Check for "handle" and "signal" cli command.
-
-2003-01-31 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java:
- Use deleteSharedLibrary from the manager.
- * src/org/eclipse/cdt/debug/mi/core/cdi/signal/Signal.java:
- Construct a signal base on the MISignal response.
- * src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
- (suspendedInferior): Take ICDITarget as argument.
- (resumeInferior): Take ICDITarget as argument.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
- (containsSharedLibrary): removed.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
- (update): implemented.
- (getSignals): implemented.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java:
- Ask the manager for the signal.
- * src/org/eclipse/cdt/debug/mi/core/event/MISignalEvent.java:
- New file.
-
-2003-01-29 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java (getSharedLibraryPaths):
- New method.
- (setSharedLibraryPaths): New method.
- (setAutoLoadSymbols): New methos set autosolib.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java (setAutoSolib):
- Move to SharedLibraryManager.java
-
-2003-01-28 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/command/MIInfoSignals.java:
- * src/org/eclipse/cdt/debug/mi/core/output/MIInfoSignalsInfo.java:
- * src/org/eclipse/cdt/debug/mi/core/output/MISignal.java:
- New files.
-
-2003-01-28 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentObject.java:
- Use ICDIStackFrame in the constructor.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterObject.java:
- Use ICDIStackFrame in the constructor.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- Use ICDIStackFrame in the constructor.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java (getVariables):
- No need to cast to StackFrame.
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java (setCurrentFrame):
- Implement new method, takes a boolean as the second method.
- * src/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java:
- No need to cast to StackFrame.
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java:
- No need to cast to StackFrame.
-
-2003-01-28 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java (getCondition):
- Condition was initialize with the wrong parameter.
- (setMIBreakpoint): reset location and condition.
-
-2003-01-28 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java (setMIBreakpoint):
- New method.
- * src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java (update):
- Reset the new MIBreakpoint on the Breakpoint object.
- (containsBreakpoint): Removed.
- (hasBreakpointChanged): Change arguments.
- * src/org/eclipse/cdt/debug/mi/core/output/MIBreakpoint.java (parser):
- Better check for watchpoints.
- * src/org/eclipse/cdt/debug/mi/core/CLIProcessor.java (isChangeBreakpoint):
- Check for "ignore" and "condition" cli commands.
-
-2003-01-27 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java (getTypeName):
- Use MIWhatis to get the type of the register.
- (getVariables): Cache the answer.
- * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java (loadSymbols):
- Use MISharedLibrary.
- * src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java (createMIWhatis):
- New method.
- (MIPType): New method.
- * src/org/eclipse/cdt/debug/mi/core/command/MISharedLibrary.java:
- New file.
-
-
-2003-01-27 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java (getCThreads):
- When attaching gdb(at least on some platform) does not show
- the selected thread(info threads). Fallback on the first one.
-
-2003-01-27 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java (findVariable):
- Bug fix, did not compare the stacks correctly.
-
-2003-01-27 Alain Magloire
-
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentObject.java:
- * src/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterObject.java:
- Move to model package.
-
-2003-01-26 Alain Magloire
-
- Major refactor of the code. Rewrote/Added Managers:
- VariableManager
- ExpressionManager
- RegisterManager
- UpdateManager.
-
- Refactor of CSession to Session, CTarget to Target
- and CThread to Thread.
- * src/.../mi/core/cdi/event/ChangedEvent.java:
- * src/.../mi/core/cdi/event/CreatedEvent.java:
- * src/.../mi/core/cdi/event/DestroyedEvent.java:
- * src/.../mi/core/cdi/event/DisconnectedEvent.java:
- * src/.../mi/core/cdi/event/ExitedEvent.java:
- * src/.../mi/core/cdi/event/MemoryChangedEvent.java:
- * src/.../mi/core/cdi/event/ResumedEvent.java:
- * src/.../mi/core/cdi/event/SuspendedEvent.java:
-
-
- * src/.../mi/core/cdi/model/Argument.java:
- * src/.../mi/core/cdi/model/Breakpoint.java:
- * src/.../mi/core/cdi/model/Thread.java:
- * src/.../mi/core/cdi/model/Target.java:
- * src/.../mi/core/cdi/model/MemoryBlock.java:
- * src/.../mi/core/cdi/model/MixedInstruction.java:
- * src/.../mi/core/cdi/model/Instruction.java:
- * src/.../mi/core/cdi/model/Signal.java:
- * src/.../mi/core/cdi/model/SharedLibrary.java:
- * src/.../mi/core/cdi/model/CObject.java:
- * src/.../mi/core/cdi/model/Expression.java:
- * src/.../mi/core/cdi/model/Variable.java:
- * src/.../mi/core/cdi/model/Value.java:
- * src/.../mi/core/cdi/model/Register.java:
- * src/.../mi/core/cdi/model/StackFrame.java:
-
- * src/.../mi/core/cdi/ArgumentObject.java:
- * src/.../mi/core/cdi/VariableObject.java:
- * src/.../mi/core/cdi/RegisterObject.java:
- * src/.../mi/core/cdi/BreakpointHit.java:
- * src/.../mi/core/cdi/BreakpointManager.java:
- * src/.../mi/core/cdi/VariableManager.java:
- * src/.../mi/core/cdi/ExpressionManager.java:
- * src/.../mi/core/cdi/RegisterManaget.java:
- * src/.../mi/core/cdi/SignalManager.java:
- * src/.../mi/core/cdi/SharedLibraryManager.java:
- * src/.../mi/core/cdi/EventManager.java:
- * src/.../mi/core/cdi/MemoryManager.java:
- * src/.../mi/core/cdi/ErrorInfo.java:
- * src/.../mi/core/cdi/Session.java:
- * src/.../mi/core/cdi/ExitInfo.java:
- * src/.../mi/core/cdi/UpdateManager.java:
- * src/.../mi/core/cdi/IUpdateListener.java:
- * src/.../mi/core/cdi/SessionObject.java:
- * src/.../mi/core/cdi/SignalReceived.java:
- * src/.../mi/core/cdi/SourceManager.java:
- * src/.../mi/core/cdi/RuntimeOptions.java:
- * src/.../mi/core/cdi/WatchpointScope.java:
- * src/.../mi/core/cdi/WatchpointTrigger.java:
- * src/.../mi/core/cdi/EndSteppingRange.java:
-
- * src/.../mi/core/MIPlugin.java:
- * src/.../mi/core/CygwinGDBDebugger.java:
- * src/.../mi/core/GDBDebugger.java:
-
-
-
-2003-01-24 Alain Magloire
-
- * src/.../mi/core/CLIProcessor.java (isEnableBreakpoint):
- Check for "enable", "disable" cli commands.
-
-2003-01-23 Alain Magloire
-
- * src/.../mi/core/CLIProcessor.java (isDeletingBreakpoint):
- Check for "d" it means delete breakpoints.
-
-2003-01-20 Alain Magloire
-
- * src/.../mi/core/cdi/Configuration.java (supporstSharedLibrary):
- New method.
- * src/.../mi/core/cdi/CoreFileConfiguration.java (supporstSharedLibrary):
- New method.
- * src/.../mi/core/cdi/SharedLibraryManager.java (update):
- Checks if support for shared Libary before doin an update.
-
-2003-01-20 Alain Magloire
-
- * src/.../mi/core/cdi/SuspendedEvent.java: Use SignalReceived.
- * src/.../mi/core/cdi/model/Signal.java: New file.
- * src/.../mi/core/cdi/model/SignalManager.java: Use model/Signal.
- * src/.../mi/core/cdi/SignalReceived.java: New file.
-
-2003-01-20 Alain Magloire
-
- The problem was that no check was done for the existence of
- the program/executable nor the working directory etc ...
- By asking the arguements to be File, the check is done by
- the caller.
-
- * src/.../mi/core/MIPlugin.java (createCSession): Change the
- the arguments.
- * src/.../mi/core/GDBDebugger.java (createCSession): Change the
-
-2003-01-20 Alain Magloire
-
- * src/.../mi/core/command/MIWhatis.java: New file.
- * src/.../mi/core/command/MIPType.java: New file.
- * src/.../mi/core/command/MISharedLibary.java: New file.
- * src/.../mi/core/output/MIWhatisInfo.java: New file.
- * src/.../mi/core/output/MIPTypeInfo.java: New file.
-
-2003-01-18 Alain Magloire
-
- * src/.../mi/core/cdi/event/DestroyedEvent.java (DestroyedEvent):
- Remove the deleted shared library from the list.
- * src/.../mi/core/cdi/SharedLibraryManager.java (getUnloadedLibrary):
- Get a shared library slated for unload.
- (removeFromUnloadedList): Remove the library form the list.
-
-2003-01-17 Alain Magloire
-
- * src/.../mi/core/output/MIInfoSharedLibraryInfo.java (parseWinShared):
- Break the methods in parserUnixShared() and parseWinShared() to cope
- with the different formats.
-
-2003-01-17 Alain Magloire
-
- * src/.../mi/core/cdi/SharedLibraryManager.java (loadSymbols):
- New method takes and array of ICDISharedLibrary.
- * src/.../mi/core/cdi/SharedLibrary.java (loadSymbols):
- Call the share manager to load.
-
-2003-01-17 Alain Magloire
-
- * src/.../mi/core/cdi/SharedLibraryManager.java (loadSymbols):
- Call "shared libraryname".
-
-2003-01-17 Alain Magloire
-
- The problem here is that we do not knw the state of
- the session, for example "target remote server:port"
- was issue, in this case the state is suspended.
- We try to guess by posting a "info remote-process"
- and set suspended when no error.
-
- * src/.../mi/core/MIPlugin.java (createCSession):
- Try "info remote-process" to guess the state.
- Remove the "new-console" call to windows specific files.
- * src/.../mi/core/CygwinGDBDebugger.java(createLaunchSession):
- call "set new-console" for windows plaforms.
-
-2003-01-16 Alain Magloire
-
- * src/.../mi/core/cdi/SharedLibary.java (setMIShared):
- New method.
- * src/.../mi/core/cdi/SharedLibraryManager.java (update):
- When changed reset the MIShared of the SharedLibrary.
-
-2003-01-16 Alain Magloire
-
- Process gdbinit configuration file.
-
- * src/.../mi/core/MIPlugin.java (createCSession): Takes now two new
- arguments for working directory and configuration file gdbinit.
- * src/.../mi/core/GDBDebugger.java (createAttachSession):
- (createCoreSession): pass the working directory and gdbinit file
- (createLaunchSession): pass the working directory and gdbinit file
- * src/.../mi/core/IMILaunchConfigurationConstants.java:
- New constant ATTR_GDB_INIT.
-
-2003-01-16 Alain Magloire
-
- * src/.../mi/core/cdi/EventManager.java (processSuspended):
- Also process the Shared lib by calling update on the manager.
-
- * src/.../mi/core/cdi/CSession.java: Create a shared
- library manager.
-
-2003-01-16 Alain Magloire
-
- * src/.../mi/core/event/MISharedLibCreatedEvent.java: New file.
- * src/.../mi/core/event/MISharedLibChangedEvent.java: New file.
- * src/.../mi/core/event/MISharedLibUndloadedEvent.java: New file.
-
- * src/.../mi/core/cdi/event/CreatedEvent.java:
- new constructors to deal with MISharedLibCreatedEvent.
- * src/.../mi/core/cdi/event/ChangedEvent.java:
- new constructors to deal with MISharedLibChangedEvent.
- * src/.../mi/core/cdi/event/DestroyedEvent.java:
- new constructors to deal with MISharedLibUnloadedEvent.
-
- * src/.../mi/core/cdi/model/SharedLibrary.java: New file.
-
- * src/.../mi/core/cdi/SharedLibraryManager.java: New file.
- * src/.../mi/core/cdi/CSession.java (getSharedLibraryManager):
- New method.
- * src/.../mi/core/cdi/EventManager.java (update):
- Deal with the new MISharedLibXXXEvents.
-
-2003-01-15 Alain Magloire
-
- * src/.../mi/core/command/CommandFactory.java (createMIInfoSharedLibrary):
- New method.
- * src/../mi/core/command/MIInfoSharedLibrary.java: New file.
- * src/../mi/core/output/MIInfoSharedLibraryInfo.java: New File.
- * src/../mi/core/output/MIShared.java: new File.
-
-2003-01-13 Mikhail Khodjaiants
- * CTarget.java: in the 'runUntil' method check if file name or function name length > 0, otherwise use address.
-
-2003-01-10 Alain Magloire
-
- * src/.../mi/core/cdi/BreakpointManager.java (update): fix subscript
- (setCondition): Fire a ChangedEvent.
- (enableBreakpoint): Fire a ChangedEvent.
- (disableBreakpoint): Fire a ChangedEvent.
-
-2003-01-10 Alain Magloire
-
- * src/.../mi/core/cdi/model/CTarget.java (runUntil): Address breakpoint
- needs a "*" prefix.
-
-2003-01-09 Alain Magloire
-
- * src/.../mi/core/cdi/BreakpointManager.java (hasBreakpointChanged):
- Implemented.
-
-2003-01-09 Alain Magloire
-
- * src/.../mi/core/cdi/model/CTarget.java (setCurrentThread): takes
- a new argument to decide if the events should be fired.
- * src/.../mi/core/cdi/model/CThread.java (getStackFrameCount): use
- the setCurrentThread() with events updates disable
- (getStackFrames): Ditto.
- (updateState): Wrong subscript in the loop.
-
-2003-01-09 Alain Magloire
-
- Generate CreatedEvent's for Variable, Argument, Expression, Memory, Thread
- objects when they are created. This makes it consistent with the generated
- DestroyedEvent's.
-
- * src/.../mi/core/cdi/EventManager.java (update): Deal with
- MI{Register,Memory,Thread,Var}CreatedEvent events.
- * src/.../mi/core/cdi/model/Ctarget.java (updateState): Fire events
- when threads are created or destroyed.
- * src/.../mi/core/cdi/model/MemoryBlock.java: Move here.
- * src/.../mi/core/cdi/model/Register.java (getID): rename getId() to getID().
- * src/.../mi/core/cdi/event/CreatedEvent.java: New constructors
- to deal with MI{Register,Memory,Thread,Var}CreatedEvent.
-
- * src/.../mi/core/event/MIMemoryCreatedEvent.java: New file.
- * src/.../mi/core/event/MIRegisterCreatedEvent.java: New file.
- * src/.../mi/core/event/MIThreadCreatedEvent.java: New file.
- * src/.../mi/core/event/MIVarCreatedEvent.java: New file.
- * src/.../mi/core/event/MIBreakpointChangedEvent.java (MIBreakpointChangedEvent):
- Reuse the constructor.
- * src/.../mi/core/event/MIBreakpointCreatedEvent.java (MIBreakpointCreatedEvent):
- Reuse the constructor.
- * src/.../mi/core/event/MIBreakpointDeletedEvent.java (MIBreakpointDeletedEvent):
- Reuse the constructor.
-
-2003-01-08 Alain Magloire
-
- Refactoring, split the org.eclipse.cdt.debug.mi.core.cdi in pacackages
- org.eclipse.cdt.debug.mi.core.cdi
- org.eclipse.cdt.debug.mi.core.cdi.event
- org.eclipse.cdt.debug.mi.core.cdi.model
- This help structure things up.
- * src/.../mi/core/cdi/event: New files.
- * src/.../mi/core/cdi/model: New files.
-
-2003-01-08 Alain Magloire
-
- * src/.../mi/core/cdi/EventManager.java (update): bug fix
- was calling DestroyedEvent() incorrectly.
-
-2003-01-08 Alain Magloire
-
- CLIProcessor a new class to recognise the CLI(Command Line Interface)
- of gdb example:
- (gdb) next
- (gdb) n
- (gdb) b
- (gdb) break
- etc ..:
- When the patterns are discover, the class will generate some events
- to warn te UI that something change.
-
- * src/.../mi/core/cdi/BreakpointManager.java (update):
- Send a -break-list and generate events for any difference, in
- the breakpoints that we know about.
- (deleteBreakpoint): Take as argument the breakpoint number.
- (getBreakpoints): Call update() to generate events if new breakpoints.
- (getMIBreakpoints): return the MIBreakpoints.
- * src/.../mi/core/cdi/ChangedEvent.java (ChangedEvent):
- New constructor with MIBreakPointChangedEvent.
- * src/.../mi/core/cdi/DestroyedEvent.java (DestroyedEvent):
- New constructor with MIBreakPointDeletedEvent.
- * src/.../mi/core/cdi/Created.java: New file.
- * src/.../mi/core/cdi/EventManager.java (update):
- Watch for the new MIBreakPoint*Events.
- * src/.../mi/core/event/MIBreakPointCreatedEvent.java: New file.
- * src/.../mi/core/event/MIBreakPointChangedEvent.java: New file.
- * src/.../mi/core/event/MIBreakPointDeletedEvent.java: New file.
- * src/.../mi/core/event/MICreatedEvent.java: New file.
- * src/.../mi/core/event/MIDestroyedEvent.java: New file.
- * src/.../mi/core/event/MIInferiorExitEvent.java: Extends MIDestroyedEvent
- * src/.../mi/core/event/MIThreadExitEvent.java: Extends MIDestroyedEvent
- * src/.../mi/core/event/MIGDBExitEvent.java: Extends MIDestroyedEvent
- * src/.../mi/core/event/MIDetachedEvent.java: Extends MIDestroyedEvent
- * src/.../mi/core/CLIProcessor.java: New file.
- * src/.../mi/core/TxThread.java: New file.
-
-2003-01-07 Alain Magloire
-
- * src/.../mi/core/MIInferior.java (getOutputStream): Remove useless assignement.
- * src/.../mi/core/MIPluging.java (debugLog): Not need to be static.
- * src/.../mi/core/cdi/EventManager.java (update): Remove useless assignement.
-
-2003-01-06 Alain Magloire
-
- * build.properties: Patch from Judy Green.
-
-2003-01-06 Alain Magloire
-
- * src/.../mi/core/cdi/BreapoinManager.java (createLocation): new method
- to create a breakoint with an address.
- * src/.../mi/core/cdi/Location.java (Location): New constructor takes
- an address as argument.
-
-2003-01-03 Alain Magloire
-
- The Class creating the CDISession part of the initialization would call
- (gdb) set autosolib on
- this works fine for Unix system, but on Windows it throws an error
- failing the debugger. Windows(Cygwin, MingWin) does not need any
- special initialization like solib-search-paths etc ..
-
- * src/.../mi/core/cdi/SourceManager.java (setAutoSolib): Takes a boolean argument
- to set the autosolib on or off.
- * src/.../mi/core/CygwinGDBDebugger.java(initializeLibraries):
- Empty method, cygwin does not need any special handling.
- * src/.../mi/core/GDBDebugger.java (initializeLibraries):
- Always call autosolib.
-
-
-2003-01-02 Alain Magloire
-
- Bug when using recursive:
- int recursive(int x) {
- if (x > 10)
- recursive(++x);
- return 0;
- }
-
- The Variable Manager is caching the MI/GDB var-obj for speed.
- It is finding the object by looking at the name and the stack/thread,
- for recursive calls, this is wrong and the code would be full in
- thinking the variable "x"(see above) is the same object. To make the distinction
- we use the depth "-stack-info-depth" that will be use also in the equality
- to make sure we identify an object uniquely. In the recursive() case above
- because the depth is different, a new "x" object will be created. The downside
- is that on certain platform doing deep recursive/stackframe, we have noticed
- that "-stack-info-depth" can be very long, test done for gdb/QNX with
- a stack depth of 1000.
-
- * src/.../mi/core/cdi/VariableManager.java (getElement):
- Use the depth when doing equal().
- (createElement): Save the depth of the stack part of the Element.
-
-2003-01-02 Alain Magloire
-
- GDB/MI uses some oob reasons that was not documented for the watchpoints
- *stopped,reason="access-watchpoint-trigger"...
- *stopped,reason="read-watchpoint-trigger",...
- * src/.../mi/core/event/MIWatchpointTrigger.java (parse):
- check for "hw-awpt" and "hw-rwpt".
- * src/.../mi/core/RxThread.java (createEvents):
- Check for "access-watchpoint-trigger", "read-watchpoint-trigger.
-
-2002-12-17 Alain Magloire
-
- * src/.../mi/core/cdi/Register.java (setFormat): bug fix
- The format variable was not set.
-
-2002-12-05 Alain Magloire
-
- GDB/MI provides error messages in its log stream, one problem
- is that it is not consistent, for example doing:
- (gdb) info threads
- & "info threads\n"
- which is obviously not an error.
- So we put the error stream output par of the exception so when
- it is relevant it shows in the Exception.
- MI2CDIException is the bridge class.
-
- * src/.../mi/core/cdi/BreakpoinManager.java:
- * src/.../mi/core/cdi/CSession.java:
- * src/.../mi/core/cdi/CTarget.java:
- * src/.../mi/core/cdi/CThread.java:
- * src/.../mi/core/cdi/MemoryBlock.java:
- * src/.../mi/core/cdi/MemoryManager.java:
- * src/.../mi/core/cdi/Register.java:
- * src/.../mi/core/cdi/RegisterManager.java:
- * src/.../mi/core/cdi/SourceManager.java:
- * src/.../mi/core/cdi/Value.java:
- * src/.../mi/core/cdi/Variable.java:
- * src/.../mi/core/cdi/VariableManager.java:
-
- * src/.../mi/core/command/Command.java (getMIInfo):
- When error get the log stream and put it in the MIException.
- * src/.../mi/core/event/MIErrorEvent.java:
- Get the log stream error also.
- * src/.../mi/core/MIException.java (getLogMessage): New method
- contains buffer output.
- * src/.../mi/core/RxThread.java (processMIOutput): get the
- oob arrays up so it can be use in MIErrorEvent.
-
-2002-12-02 Alain Magloire
-
- * src/.../mi/core/cdi/CTarget.java (updateState): If we
- have the current thread id set it before, getCThread() if
- it is implemented with "info threads" can override it but
- "-stack-list-thread" does not give this information.
- * src/.../mi/core/cdi/ErrorInfo.java: New file
- * src/.../mi/core/cdi/EventManager.java (getReason): Return
- an ErrorInfo also.
- * src/.../mi/core/event/MIErroEvent.java: New file
- * src/.../mi/core/RxThread.java (processMIOutput):
- Generated MIErrorEvent for "^error".
-
-2002-11-29 Alain Magloire
-
- * src/.../mi/core/cdi/EventManager.java (processSuspended):
- get the threadId.
-
-2002-11-29 Alain Magloire
-
- * src/.../mi/core/cdi/MemoryBlock.java (setValue):
- Check if the change affects other block and fire MemoryChangedEvent
- when necessary.
-
-2002-11-29 Alain Magloire
-
- * src/.../mi/core/event/MIBreakpointEvent.java:
- * src/.../mi/core/event/MIFunctionFinishedEvent.java:
- * src/.../mi/core/event/MILocationReachedEvent.java:
- * src/.../mi/core/event/MISignalEvent.java:
- * src/.../mi/core/event/MISteppingRangeEvent.java:
- * src/.../mi/core/event/MIStoppedEvent.java:
- * src/.../mi/core/event/MIWatchpointEvent.java:
- * src/.../mi/core/event/MIWatchpointTriggerEvent.java:
- * src/.../mi/core/RxThread.java:
- Some events like the temporary events, do not have
- any specific format but do provide a frame and a thread-id
- move the code in MIStoppedEvent.
-
-2002-11-28 Alain Magloire
-
- * src/.../mi/core/cdi/MemoryBlock.java (setValue): Only get a byte.
-
-2002-11-28 Alain Magloire
-
- * src/.../mi/core/cdi/CTarget.java (runUntil): new method implemented.
- * src/.../mi/core/cdi/CThread.java (runUntil): new method implemented.
-
-2002-11-26 Doug Schaefer
-
- * src/.../mi/core/CygwinGDBDebugger.java:
- New Debugger that provides the Cygwin Command Factory to the MISession
- * src/.../mi/core/command/CygwinCommandFactory.java:
- New Command Factory for Cygwin specific implementations of the commands
- * src/.../mi/core/command/CygwinMIEnvironmentDirectory.java:
- New. Subclasses the MIEnvironmentDirectory command to convert the
- paths using cygpath.
- * plugin.xml:
- Defines the new debugger extension.
-
-2002-11-25 Alain Magloire
-
- * src/.../mi/core/cdi/Watchpoint.java:
- Check if it was access point also.
- * src/.../mi/core/output/MIBreakInsertInfo.java (parse):
- Check for "wpt" variable.
- * src/.../mi/core/output/MIBreakpoint.java (IsWriteWatchpoint):
- implemented.
-
-2002-11-20 Mikhail Khodjaiants
- Fix for bug 26595.
- * src/.../mi/core/cdi/MemoryManager.java (compareBlocks):
- If the start address of a memory block has changed fir 'changed' event
- only for the corresponding bytes of the overlapping area of new and old blocks.
-
-2002-11-19 Alain Magloire
-
- * src/.../mi/core/cdi/MemoryManager.java (compareBlocks):
- The startAddress() may have change for example if we were
- watching "char *p;" and the address move "p++". Take this
- into account now.
-
-2002-11-18 Alain Magloire
-
- * src/.../mi/core/cdi/StackFrame.java (getCurrentStackFrame):
- if the currentFrame was not set only get the top level
- frame for the current.
- * src/.../mi/core/cdi/CTarget.java (updateStateId):
- Set the currentThreads && currentThreadId.
-
-2002-11-18 Alain Magloire
-
- * src/.../mi/core/cdi/CThread.java (getStackFrameCount):
- Set the new thread before getting the value and restore
- after.
-
-2002-11-14 Alain Magloire
-
- This is needed in post-mortem, application doing a
- very deep recursion and crashing the stack size, for example
- on GNU/Linux it may reach 200000 levels deep. Trying to
- bring in the UI a bactrace tree of 200000 nodes is useless.
- The UI could check the count and do the appropriate action
- by showing ranges etc ..
-
- * src/.../mi/core/cdi/CThread.java (getStackFrame):
- new method with a hi and low.
- (getStackFrameCount): new method.
- * src/.../mi/core/command/CommandFactory.java (createMIStackInfoDepth):
- new method.
- * src/.../mi/core/command/MIStackInfoDepth.java (getMIStackInfoDepthInfo):
- new method.
-
-2002-11-13 Dave Inglis
- * plugin.xml
- Added "native" cpu support.
-
-2002-11-06 Alain Magloire
-
- * src/.../mi/core/cdi/StackFrame.java (getLocals):
- If an exception was thrown, the array may contain null
- entries. Use a list and catch the exception.
-
-2002-11-06 Alain Magloire
-
- * src/.../mi/core/cdi/StackFrame.java (getArguments):
- If an exception was thrown, the array may contain null
- entries. Use and a List and catch the exception.
-
-2002-11-05 Alain Magloire
-
- * src/.../mi/core/cdi/Register.java (setValue): Fire a
- MIRegisterChangedEvent when changing value.
- Fix PR:25730
-
-2002-11-01 Alain Magloire
-
- The change in MISession(), will catch things like starting gdb-5.0
- with argument "-i mi1", that level of mi is not supported.
-
- * src/.../mi/core/cdi/MemoryBlock.java (refresh): When doing the refresh
- check if other blocks wehre affected and update them.
- * src/.../mi/core/cdi/MemoryManager.java (update): Return the array of
- affected addresses.
- * src/.../mi/core/MIPlugin.java (createCSession): Do not throw an
- error when trying "set new-console", it does not work on Linux.
- * src/.../mi/core/MISession.java (MISession): Check if the process
- terminated early, maybe because of wron arguments etc .. and throw
- the exception.
-
-2002-11-1 David Inglis
- * src/.../mi/core/MIPlugin.java
- throw MIExceptions in createSession (not rethorwn IOExceptions)
-
-2002-10-30 Alain Magloire
-
- * src/.../core/cdi/MemoryBlock.java (setDirty): When need a
- refresh setDirty() to true.
- (isDirty): Return the flag value.
-
- * src/.../core/cdi/MemoryManager.java (update): Check if
- the MemoryBlock isDirty().
-
-2002-10-30 Alain Magloire
-
- * src/.../core/cdi/MemoryBlock.java (setValue): reuse refresh()
- to update the memory and fire any MemoryChangedEvents.
-
-2002-10-26 Alain Magloire
-
- * src/.../core/cdi/MemoryBlock.java (setValue): Generate
- a MemoryChangeEvent when the value is set, gdb/mi will not
- do it.
-
-2002-10-25 Alain Magloire
-
- * src/.../core/cdi/CThread.java (getStackFrames): Save the
- current thread before changing and restore when operation finish.
-
- * src/.../core/cdi/MemoryBlock.java (refresh): Flush the old
- data and get new memory.
- (update): New method to compare individual blocks.
-
-2002-10-25 Alain Magloire
-
- Automatically suspend/resume gdb when setting a breakpoint.
- The workflow when debuggin which gdb command prompt is to
- hit CTRL-C set the breakpoint and continue. The UI debugger
- should be smart enought to do this by itself. So if the
- inferior is running, when setting a breakpoint the program
- is suspended(target.suspend()), the suspend event is ignore
- the breakpoint is set (--break-insert) and the target is resume.
- To ignore a specific event, we use a (mis)behaviour of gdb that
- associate the suspend(*stopped) with the last execution command.
- (gdb)
- 111-exec-continue
- 111^running
- (gdb)
- 222-exec-interrupt
- 222^done
- (gdb)
- 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
- frame={addr="0x00010140",func="foo",args=[],file="try.c",line="13"}
- (gdb)
- In the case above event 111 is ignore.
-
- * src/.../core/command/CLICommand.java (toString): Always put
- the identifying token.
- * src/.../core/command/Command.java (setToken): Removed.
- (getUniqToken): New method returns a global uniq token.
- (getToken): Returns a uniq token for the command.
- * src/.../core/MIInferior.java (setTerminated): New argument token,
- since now all MIEvent has the corresponding command token.
- * src/.../core/MISession.java (cmdCount): Removed.
- (postCommand): the command getToken() will return a uniq token.
- * src/.../core/RxThread.java (processMIOOBRecord): MIEvent take
- the corresponding command token as argument.
- * src/.../core/TxThrea.java (token): Field removed, token are no
- longer created in this tread.
- * src/.../core/event/MIBreakpointEvent.java:
- * src/.../core/event/MIBreakpointEvent.java:
- * src/.../core/event/MIChangedEvent.java:
- * src/.../core/event/MIDetachedEvent.java:
- * src/.../core/event/MIEvent.java:
- * src/.../core/event/MIFunctionFinishedEvent.java:
- * src/.../core/event/MIGDBExitEvent.java:
- * src/.../core/event/MIInferiorExitEvent.java:
- * src/.../core/event/MILocationReachedEvent.java:
- * src/.../core/event/MIMemoryChangedEvent.java:
- * src/.../core/event/MIRegisterChangedEvent.java:
- * src/.../core/event/MIRunningEvent.java:
- * src/.../core/event/MISignalEvent.java:
- * src/.../core/event/MISteppingRangeEvent.java:
- * src/.../core/event/MIStoppedEvent.java:
- * src/.../core/event/MIThreadExitEvent.java:
- * src/.../core/event/MIVarChangedEvent.java:
- * src/.../core/event/MIWatchpointScopeEvent.java:
- * src/.../core/event/MIWatchpointTriggerEvent.java:
- Calls super with getToken().
- * src/.../core/cdi/BreakpointManager.java (allowProgramInterruption):
- New method to allow suspending the program to set a breakpoint.
- (suspendInferior): get the last token execution an ignore the suspend
- event.
- * src/.../core/cdi/CTarget.java (getLastExecutionToken): New method
- returns the token of the last execution command.
- * src/.../core/cdi/EventManager.java (enableEventToken): New method.
- (enableEventTokens): New method.
- (disableEventToken): New method.
- (disableEventTokens): New method.
- (update): Ignore token in the disable list.
- * src/.../core/cdi/RegisterManager.java (update): MIEvent takes
- a token.
- * src/.../core/cdi/Variable.java (setValue): MIEvent takes a token.
- * src/.../core/cdi/VariableManager.java (update): MIEvent takes a token.
-
-2002-10-24 Alain Magloire
-
- * src/.../core/RxThread.java (processMIOutput): Fire a
- suspended event when seeing an error.
-
-2002-10-24 Alain Magloire
-
- * src/.../core/output/MIConst.java (isoC): Change to return
- a string instead '\n' is platform dependent and has to be
- translate to "\r\n" for SWT widgets to work correctly on windows.
-
-2002-10-23 Alain Magloire
-
- gdb/mi for program control command will fire a change state event:
- -exec-run
- ^running
- This allow the UI to change its state and wait for the suspended.
- Providing a gdb prompt adds some problems, since there is no state
- change, i.e.(^running) after command like, next/step/...:
- next
- &"next\n"
- ...
- So to palliate, the txthread do some query when the commands are
- CLI commands trying to discover the type and fire any appropriate
- events on behalf on gdb.
-
- * src/.../core/RxThread.java (createEvent): Adjust the parser to
- not rely on the oob "*stopped", since for CLI command it is not
- in the result-class. So the suspended state will be base of
- the "reason" only.
- * src/.../core/TxThread.java (processCLICommand): new method,
- get the command and try to recognize if it is a program control
- command like: next, step, etc ..
- * src/.../core/command/CLICommand.java (getOperation): New method,
- returns the command string.
-
-2002-10-22 Alain Magloire
-
- Change the framework to support access to gdb prompt.
- Trying to reuse as much as possible Eclipse framework.
- The session/gdb process is available via CDI.
-
- * src/.../core/GDBStreamsProxy.java: Removed.
- * src/.../core/GDBProcess.java: Removed.
- * src/.../core/GDBStreamMonitor.java: Removed.
- * src/.../core/SessionProcess.java: New file.
- * src/.../core/MISession.java (getMISessionProcess):
- New method, returns a "fake" Process that wraps the input/outpu
- stream of gdb.
- (getGDBProcess): was getMIProcess(), renamed.
- * src/.../core/cdi/CSession.java (getSessionProcess): New method
- return gdb process.
-
-2002-10-22 Alain Magloire
-
- * src/.../core/GDBStreamsProxy.java (write):
- Replace the OutputStream with a Write class.
- And clear the buffer on flush().
-
-2002-10-21 Alain Magloire
-
- * src/.../core/GDBProcess.java (getExitValue): Catch
- IllegalThreadStateException.
- (getAttribute): Only create Properties, when call.
- (setAttribute): Only create Properties, when call.
- (getAdapter): Implemented.
- (canTerminate): true only of the process is alive.
- (GDBProcess): Takes one more argument the name.
- * src/.../core/GDBStreamMonitor.java (fireStreamAppend): New method.
- Use a synchronized LinkedList for the listeners.
- (read): new Method.
- (startMonitoring): New method, start a thread in the background
- to monitor the input.
- * src/.../core/GDBStreamsProxy.java (getErrorStream): Start the monitor thread.
- (getOutputStream): Start the monitor thread.
-
-2002-10-21 Alain Magloire
-
- Framework for having a gdb console. The idea is to reuse
- the eclipse console and save a lot of work. We "adapt"
- the gdb Process to what eclipse debug LaunchView wants(IProcess).
- So when this fake "gdb process" is selected we can grab the
- input/output of the console and redirect everything to raw gdb.
-
- * src/.../core/GDBProcess.java: New file, it implements Eclipse
- debug class IProcess.
- * src/.../core/GDBStreamMonitor: New file, it implements Eclipse
- debug class IStreamMonitor.
- * src/.../core/GDBStreamsProxy: New file, it implements Eclipse
- debug class IStreamsProxy.
- * src/../core/MISession.java (getMIConsoleStream): New method
- to return the mi console stream output that we get from gdb/mi.
- (getMILogStream): New method, to return the mi log stream output
- that we get from gdb/mi.
- (terminate): close the fake MI Console and Log streams.
- * src/../core/RxThread.java (processMIOOBRecord): Redirect the
- console and the log stream to a buffer pipe.
-
-2002-10-21 Alain Magloire
-
- * src/.../core/cdi/EventManager.java (update): Only
- fire the event for MemoryChangedEvent if the block was
- not frozen.
-
-2002-10-20 Alain Magloire
-
- Eclipse provides plugins a way to trace by having an .options file,
- this mechanism is use to print out the mi exchange between gdb
- and the plugin. To enable this in the debug launch one must enable
- "tracing" and set for the "org.eclipse.debug.mi.core/debug" to true.
- But one problem, the console will simply blow taking down eclipse,
- for big MI line response, say 4k length, for example asking the children
- of "char buffer[4096]", -var-list-children varxx.
- This seem only to happen in Eclipse-gtk or Eclipse-motif
- on GNU/Linux, so it will be break in smaller chunks to give a chance to
- the console.
-
- * .options: Set debug to true.
- * src/.../core/MIPlugin.java (debugLog): Break the log line in small chuncks of 100.
- * src/.../core/MISession.java (postCommand): Print the gdb/mi command.
- * src/.../core/RxThread.java (run): Print gdb/mi responses.
-
-2002-10-20 Alain Magloire
-
- -data-write-register-values is not in the texinfo manual but implemented in
- gdb-5.2.1/gdb/mi/mim-main.c:
- Write given values into registers. The registers and values are
- given as pairs. The corresponding MI command is
- -data-write-register-values [...]
-
- * src/.../core/command/MIDataWriteRegisterValues.java: New file.
- * src/.../core/command/CommandFactory.java (createMIDataWriteMemory): New method.
- * src/.../core/cdi/Register.java (setValue): Implemented.
-
-2002-10-20 Alain Magloire
-
- Althought -data-write-memory is not documented in the texinfo manual
- it is implemented and well documented in the code(gdb-5.2.1/gdb/mi/mi-main.c).
- "mi_cmd_data_write_memory: Usage: [-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
-
- * src/.../core/command/MIDataWriteMemory.java: New file
- * src/.../core/command/CommandFactory.java (createMIDataWriteMemory): New method.
- * src/.../core/cdi/MemoryBlock.java (setValue): Implemented.
-
-2002-10-20 Alain Magloire
-
- * src/.../core/cdi/CTarget.java (getMemoryBlock): Remove
- we use the MemoryManager instead.
- (EvaluateExpressionToValue): Removed not use.
- * src/.../core/cdi/SourceManager.java (setFile): Removed not use.
- (getFile): Removed not use.
- (reset): Removed not use.
-
-2002-10-19 Alain Magloire
-
- The responsability to generate Events for modify memory blocks is push
- on the CDI implementation. The way we do this is every time consuming,
- when the inferior is suspended(see EventManager.processSuspendedEvent()),
- MemoryManager.update() is called, the method will go through the list of MemoryBlocks
- that are not MemoryBlocks.setFrozen() and fetch the new memories, the data is compare
- and MemoryChangedEvents are fired for blocks with changed values.
- Gdb/mi var objects does not seem to provide any support for Memory ranges.
-
- * src/.../core/cdi/MemoryChangedEvent.java: New File implements ICDIMemoryChangedEvent.
- * src/.../core/cdi/EventManager.java (update): Process MIMemoryChangedEvent's.
- (processSuspendedEvent): call MemoryManager.update().
- * src/.../core/cdi/MemoryBlock.java (getExpression): New method.
- (getMIDataReadMemoryInfo): New method.
- (setMIDataReadMemoryInfo): New method.
- * src/.../core/cdi/MemoryManager.java (update): New method.
- (compareBlock): New method.
- (listMemoryBlocks): New method.
-
- * src/.../core/cdi/CTarget.java (setCurrentThread): Catch null pointer.
- (getCThreads): Likewise.
- * src/.../core/event/MIMemoryChangedEvent.java: New File.
- * src/.../core/event/MIThreadExitEvent.java: Indentation fixes.
- * src/.../core/event/MIVarChangedEvent.java: Indentation fixes.
-
-
-
-2002-10-16 Alain Magloire
-
- * src/.../mi/core/cdi/MemoryManager.java (createMemoryBlock):
- New method that takes a string instead of a long, rearrange
- the method for it.
-
-2002-10-12 Alain Magloire
-
- There are some serious problems with gdb/mi, for example
- the most recurrent one is when using -data-disassemble
- in a threaded program, GNU/Linux uses a thread manager
- when trying to access the stackframe, gdb usually coredumps
- with an assert, it goes something like this:
-
--data-disassemble -f manager.c -l 136 -n 100 0
-&"Cannot access memory at address 0x4002d794\n"
-^error,msg="Cannot access memory at address 0x4002d794"
-(gdb)
--data-disassemble -s 0x4002d900 -e 0x4002d964 0
-&"Cannot access memory at address 0x4002d900\n"
-^error,msg="Cannot access memory at address 0x4002d900"
-(gdb)
--thread-select 2
-&"ui-out.c:133: gdb-internal-error: push_level: Assertion `uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS' failed.\n"
-
- The RxThread will spawn a thread to terminate the session
- and clear the receiving queue.
-
-
- * RxThread.java (run): When the thread is being cancel() or
- running out of run(), clear the receiving queue(rxQueue) and
- notify any commands waiting.
-
- * TxTread.java (run): Before putting the command in the
- receiving queue(rxQueue) check to see if the thread is
- still running.
- When the thread is being cancel() or running out of run(),
- clear the transmition queue(txQueue) an notify any commands
- waiting.
-
- * Queue.java (clearItems): New method that clear the items
- on the queue and returning them.
-
- * CommandQueue.java (clearCommands): New method calls super.clearItems()
- whith the appropriate castings.
-
- * cdi/CThread.java (setCurrentStackFrame): Check for null.
-
-2002-10-12 Alain Magloire
-
- The memory block is implemented with
- -data-read-memory (MIDataReadMemory)
- Since the ICDIMemoryBlock only have
- byte[] getBytes()
- We will always issue:
- -data-read-memory address x 1 1 length
- The CDI upper layer will deal with any conversions
-
- The problem now is how to send changedEvent when
- an element of the memory changed.
-
- * cdi/MemoryBlock.java (getLength): Implemented
- (getBytes): Implemented
- (getStartAddress): Implemented
-
- * cdi/MemoryManager.java: Implemented.
-
- * command/MIDataReadMemory (getMIDataReadMemoryInfo):
- New helper method.
-
-2002-10-12 Alain Magloire
-
- * cdi/Location (getInstructions): Methods removed
- no longer define in ICDILocation.
-
-2002-10-11 Alain Magloire
-
- * cdi/SourceManager (getMixedInstruction):
- Implement the 3 new methods to return Mixed source
- and assemby instructions.
-
- * cdi/MixedInstruction: New class implements
- ICDIMixedInstruction.
-
-2002-10-11 Alain Magloire
-
- * cdi/ExpressionManager.java: Not needed, removed.
-
-2002-10-10 Alain Magloire
-
- The Eclipse/UI/Debug framewok is being very repetive
- and each command can be ask 2, 3 times. So we'll try
- to make certain commands smarter by not reissuing them
- to gdb if the state is the same. We do this when
- selecting the thread and when selecting the stackframe.
-
- The other problem is that Eclipse/UI/Debug is calling
- ICDISession.terminate() twice, this is catch by looking
- at isTerminated().
-
- * cdi/CThread.java (setCurrentStackFrame): Make it smarter
- to not reselect the stack level if it is already at that
- level.
-
- * MISession.java (isTerminated): Declare a flag that will
- hold the state.
- (terminate): Check if it was call already.
-
-2002-10-10 Alain Magloire
-
- * SourceManager.java: Implement getInstructions().
diff --git a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 77a4f13a8a5..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.cdt.debug.mi.core; singleton:=true
-Bundle-Version: 7.3.0.qualifier
-Bundle-Activator: org.eclipse.cdt.debug.mi.core.MIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.cdt.debug.mi.core,
- org.eclipse.cdt.debug.mi.core.cdi,
- org.eclipse.cdt.debug.mi.core.cdi.event,
- org.eclipse.cdt.debug.mi.core.cdi.model,
- org.eclipse.cdt.debug.mi.core.cdi.model.type,
- org.eclipse.cdt.debug.mi.core.command,
- org.eclipse.cdt.debug.mi.core.command.factories,
- org.eclipse.cdt.debug.mi.core.command.factories.linux,
- org.eclipse.cdt.debug.mi.core.command.factories.macos,
- org.eclipse.cdt.debug.mi.core.command.factories.win32,
- org.eclipse.cdt.debug.mi.core.event,
- org.eclipse.cdt.debug.mi.core.output
-Require-Bundle: org.eclipse.cdt.debug.core;bundle-version="[7.0.0,8.1.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.cdt.core;bundle-version="[5.0.0,7.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="3.2.200",
- org.eclipse.cdt.gdb;bundle-version="7.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: com.ibm.icu.text
diff --git a/debug/org.eclipse.cdt.debug.mi.core/about.html b/debug/org.eclipse.cdt.debug.mi.core/about.html
deleted file mode 100644
index d7c511887d6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/about.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-About
-
-
-
About This Content
-
-
June 22, 2007
-
License
-
-
The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at http://www.eclipse.org/legal/epl-v10.html.
-For purposes of the EPL, "Program" will mean the Content.
-
-
If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at http://www.eclipse.org.
-
-
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.core/build.properties b/debug/org.eclipse.cdt.debug.mi.core/build.properties
deleted file mode 100644
index 479aeaeea51..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-###############################################################################
-
-bin.includes = plugin.xml,\
- plugin.properties,\
- about.html,\
- .,\
- META-INF/,\
- .options
-src.includes = .options,\
- about.html
-javadoc.packages = org.eclipse.cdt.debug.mi.core.*,\
- org.eclipse.cdt.debug.mi.core.cdi.*,\
- org.eclipse.cdt.debug.mi.core.command.*,\
- org.eclipse.cdt.debug.mi.core.event.*,\
- org.eclipse.cdt.debug.mi.core.output.*
-source.. = cdi/,\
- mi/,\
- src/
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java
deleted file mode 100644
index d4791c48007..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Breakpoint;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointHitEvent;
-
-/**
- */
-public class BreakpointHit extends SessionObject implements ICDIBreakpointHit {
-
- MIBreakpointHitEvent breakEvent;
-
- public BreakpointHit(Session session, MIBreakpointHitEvent e) {
- super(session);
- breakEvent = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit#getBreakpoint()
- */
- @Override
- public ICDIBreakpoint getBreakpoint() {
- int number = breakEvent.getNumber();
- // Ask the breakpointManager for the breakpoint
- BreakpointManager mgr = ((Session)getSession()).getBreakpointManager();
- // We need to return the same object as the breakpoint.
- Breakpoint point = mgr.getBreakpoint(breakEvent.getMISession(), number);
- // FIXME: if point == null ?? Create a new breakpoint ??
- return point;
- }
-
-}
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
deleted file mode 100644
index 86104fe7c8a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
+++ /dev/null
@@ -1,1152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Anton Leherbauer (Wind River Systems)
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.io.File;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
-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.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-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.EventBreakpoint;
-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;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Watchpoint;
-import org.eclipse.cdt.debug.mi.core.command.CLICatch;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakAfter;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakCondition;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakDelete;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakDisable;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakEnable;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakInsert;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakList;
-import org.eclipse.cdt.debug.mi.core.command.MIBreakWatch;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetBreakpointPending;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.output.CLICatchInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakInsertInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakListInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakWatchInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-
-/**
- * Breakpoint Manager for the CDI interface.
- */
-public class BreakpointManager extends Manager {
-
- public static ICDIBreakpoint[] EMPTY_BREAKPOINTS = {};
-
- Map breakMap;
- Map deferredMap;
- boolean allowInterrupt;
-
- public BreakpointManager(Session session) {
- super(session, false);
- breakMap = Collections.synchronizedMap(new HashMap());
- deferredMap = Collections.synchronizedMap(new HashMap());
- allowInterrupt = true;
- }
-
- synchronized List getBreakpointsList(ICDITarget target) {
- List bList = (List)breakMap.get(target);
- if (bList == null) {
- bList = Collections.synchronizedList(new ArrayList());
- breakMap.put(target, bList);
- }
- return bList;
- }
-
- MIBreakpoint[] getAllMIBreakpoints(MISession miSession) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIBreakList breakpointList = factory.createMIBreakList();
- try {
- miSession.postCommand(breakpointList);
- MIBreakListInfo info = breakpointList.getMIBreakListInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info.getMIBreakpoints();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- boolean hasBreakpointChanged(MIBreakpoint miBreak, MIBreakpoint miBreakpoint) {
- return miBreak.isEnabled() != miBreakpoint.isEnabled() ||
- !miBreak.getCondition().equals(miBreakpoint.getCondition()) ||
- miBreak.getIgnoreCount() != miBreakpoint.getIgnoreCount();
- }
-
- public Watchpoint getWatchpoint(MISession miSession, int number) {
- return (Watchpoint)getBreakpoint(miSession, number);
- }
-
- public Breakpoint getBreakpoint(MISession miSession, int number) {
- Session session = (Session)getSession();
- Target target = session.getTarget(miSession);
- if (target != null) {
- return getBreakpoint(target, number);
- }
- return null;
- }
-
- public Breakpoint getBreakpoint(Target target, int number) {
- List bList = (List)breakMap.get(target);
- if (bList != null) {
- Breakpoint[] bkpts = (Breakpoint[]) bList.toArray(new Breakpoint[0]);
- for (int i = 0; i < bkpts.length; i++) {
- MIBreakpoint[] miBreakpoints = bkpts[i].getMIBreakpoints();
- for (int j = 0; j < miBreakpoints.length; j++) {
- if (miBreakpoints[j].getNumber() == number) {
- return bkpts[i];
- }
- }
- }
- }
- return null;
- }
-
- boolean suspendInferior(Target target) throws CDIException {
- boolean shouldRestart = false;
- // Stop the program
- if (allowInterrupt && target.isRunning()) {
- // Disable events.
- ((EventManager) getSession().getEventManager()).allowProcessingEvents(false);
- target.suspend();
- shouldRestart = true;
- }
- return shouldRestart;
- }
-
- void resumeInferior(Target target, boolean shouldRestart) throws CDIException {
- ((EventManager) getSession().getEventManager()).allowProcessingEvents(true);
- if (shouldRestart) {
- target.resume();
- }
- }
-
- public void deleteBreakpoint(MISession miSession, int no) {
- Session session = (Session)getSession();
- Target target = session.getTarget(miSession);
- if (target != null) {
- deleteBreakpoint(target, no);
- }
- }
-
- /**
- * Use in the event classes, the breakpoint is not remove from the list
- * It is only done in DestroyedEvent class. Since we need to keep the breakpoint
- * type around.
- * @param target
- * @param no
- */
- void deleteBreakpoint (Target target, int no) {
- List bList = (List)breakMap.get(target);
- if (bList != null) {
- Breakpoint[] points = (Breakpoint[]) bList.toArray(new Breakpoint[0]);
- for (int i = 0; i < points.length; i++) {
- MIBreakpoint[] miBreakpoints = points[i].getMIBreakpoints();
- for (int j = 0; j < miBreakpoints.length; j++) {
- if (miBreakpoints[j].getNumber() == no) {
- bList.remove(points[i]);
- break;
- }
- }
- }
- }
- }
-
- /**
- * Call through the Breakpoint class Breakpoint.setEnabled(boolean)
- *
- * @param breakpoint
- * @throws CDIException
- */
- public void enableBreakpoint(Breakpoint breakpoint) throws CDIException {
- Target target = (Target)breakpoint.getTarget();
-
- // Check if the breakpoint is in the deffered list
- List dList = (List)deferredMap.get(target);
- if (dList != null) {
- if (dList.contains(breakpoint)) {
- breakpoint.setEnabled0(true);
- return; // bail out here, our work is done.
- }
- }
-
- List bList = (List)breakMap.get(target);
- if (bList == null) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- if (!bList.contains(breakpoint)) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- MIBreakpoint[] miBreakpoints = breakpoint.getMIBreakpoints();
- if (miBreakpoints == null || miBreakpoints.length == 0) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
-
- int[] numbers = new int[miBreakpoints.length];
- for (int i = 0; i < miBreakpoints.length; i++) {
- numbers[i] = miBreakpoints[i].getNumber();
- }
-
- boolean restart = false;
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIBreakEnable breakEnable = factory.createMIBreakEnable(numbers);
- try {
- restart = suspendInferior(target);
- miSession.postCommand(breakEnable);
- MIInfo info = breakEnable.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- for (int i = 0; i < miBreakpoints.length; i++) {
- miBreakpoints[i].setEnabled(true);
- }
- breakpoint.setEnabled0(true);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- try {
- // Resume the program and enable events.
- resumeInferior(target, restart);
- } finally {
- // Fire a changed Event.
- miSession.fireEvent(new MIBreakpointChangedEvent(miSession, numbers[0]));
- }
- }
-
-
- }
-
- /**
- * Call through the Breakpoint class. Breakpoint.disable
- *
- * @param breakpoint
- * @throws CDIException
- */
- public void disableBreakpoint(Breakpoint breakpoint) throws CDIException {
- Target target = (Target)breakpoint.getTarget();
-
- // Check if the breakpoint is in the deffered list
- List dList = (List)deferredMap.get(target);
- if (dList != null) {
- if (dList.contains(breakpoint)) {
- breakpoint.setEnabled0(false);
- return; // bail out here, our work is done.
- }
- }
-
- List bList = (List)breakMap.get(target);
- if (bList == null) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- if (!bList.contains(breakpoint)) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
-
- MIBreakpoint[] miBreakpoints = breakpoint.getMIBreakpoints();
- if (miBreakpoints == null || miBreakpoints.length == 0) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- int[] numbers = new int[miBreakpoints.length];
- for (int i = 0; i < miBreakpoints.length; i++) {
- numbers[i] = miBreakpoints[i].getNumber();
- }
-
- boolean restart = false;
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIBreakDisable breakDisable = factory.createMIBreakDisable(numbers);
- try {
- restart = suspendInferior(target);
- miSession.postCommand(breakDisable);
- MIInfo info = breakDisable.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- for (int i = 0; i < miBreakpoints.length; i++) {
- miBreakpoints[i].setEnabled(false);
- }
- breakpoint.setEnabled0(false);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- try {
- resumeInferior(target, restart);
- } finally {
- // Fire a changed Event.
- miSession.fireEvent(new MIBreakpointChangedEvent(miSession, numbers[0]));
- }
- }
- }
-
- /**
- * Use by the Breakpoint class, Breakpoint.setCondition(Condition cond)
- * In this case we will not try to change the condition with -break-condition.
- * Since condition may contains new thread-id it is simpler to remove the breakpoints
- * and make a new breakpoints with the new conditions.
- * @param breakpoint
- * @param newCondition
- * @throws CDIException
- */
- public void setCondition(Breakpoint breakpoint, ICDICondition newCondition) throws CDIException {
- Target target = (Target)breakpoint.getTarget();
-
- // Check if the breakpoint is in the deffered list
- List dList = (List)deferredMap.get(target);
- if (dList != null) {
- if (dList.contains(breakpoint)) {
- breakpoint.setCondition0(newCondition);
- return; // bail out here, our work is done.
- }
- }
-
- List bList = (List)breakMap.get(target);
- if (bList == null) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- if (!bList.contains(breakpoint)) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
-
- MIBreakpoint[] miBreakpoints = breakpoint.getMIBreakpoints();
- deleteMIBreakpoints(target, miBreakpoints);
- ICDICondition oldCondition = breakpoint.getCondition();
- boolean success = false;
- try {
- breakpoint.setCondition0(newCondition);
- if (breakpoint instanceof LocationBreakpoint) {
- setLocationBreakpoint((LocationBreakpoint)breakpoint);
- } else if (breakpoint instanceof Watchpoint) {
- setWatchpoint((Watchpoint)breakpoint, false);
- } else {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- success = true;
- } finally {
- if (!success) {
- breakpoint.setCondition0(oldCondition);
- if (breakpoint instanceof LocationBreakpoint) {
- setLocationBreakpoint((LocationBreakpoint)breakpoint);
- } else if (breakpoint instanceof Watchpoint) {
- setWatchpoint((Watchpoint)breakpoint, false);
- }
- }
- }
-
- // Fire a changed Event.
- miBreakpoints = breakpoint.getMIBreakpoints();
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- MISession miSession = target.getMISession();
- miSession.fireEvent(new MIBreakpointChangedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- }
-
- @Override
- public void update(Target target) throws CDIException {
- update(target, null);
- }
-
- /**
- * Pass the event that causes this update
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=135250
- */
- public void update(Target target, MIEvent event) throws CDIException {
- MISession miSession = target.getMISession();
- MIBreakpoint[] allMIBreakpoints = getAllMIBreakpoints(miSession);
- List bList = getBreakpointsList(target);
- List eventList = new ArrayList(allMIBreakpoints.length);
- for (int i = 0; i < allMIBreakpoints.length; i++) {
- MIBreakpoint miBreakpoint = allMIBreakpoints[i];
- int no = miBreakpoint.getNumber();
- Breakpoint bp = getBreakpoint(target, no);
- if (bp != null) {
- MIBreakpoint[] miBps = bp.getMIBreakpoints();
- for (int j = 0; j < miBps.length; j++) {
- if (miBps[j].getNumber() == no) {
- if (hasBreakpointChanged(miBps[j], miBreakpoint)) {
- miBps[j] = miBreakpoint;
- bp.setEnabled0(miBreakpoint.isEnabled());
- // FIXME: We have a problem if the thread id change.
- ICDICondition oldCond = bp.getCondition();
- String[] tids = oldCond.getThreadIds();
- Condition newCondition = new Condition(miBreakpoint.getIgnoreCount(),
- miBreakpoint.getCondition(), tids);
- bp.setCondition0(newCondition);
- // Fire ChangedEvent
- eventList.add(new MIBreakpointChangedEvent(miSession, no));
- }
- }
- }
- } else {
- // add the new breakpoint and fire CreatedEvent
- int type = ICBreakpointType.REGULAR;
- if (miBreakpoint.isHardware()) {
- type = ICBreakpointType.HARDWARE;
- } else if (miBreakpoint.isTemporary()) {
- type = ICBreakpointType.TEMPORARY;
- }
- String[] tids = null;
- String tid = miBreakpoint.getThreadId();
- if (tid != null && tid.length() > 0) {
- tids = new String[] { tid };
- }
- Condition condition = new Condition(miBreakpoint.getIgnoreCount(),
- miBreakpoint.getCondition(), tids);
-
- if (miBreakpoint.isWatchpoint()) {
- int watchType = 0;
- if (miBreakpoint.isAccessWatchpoint() || miBreakpoint.isReadWatchpoint()) {
- watchType |= ICDIWatchpoint.READ;
- }
- if (miBreakpoint.isAccessWatchpoint() || miBreakpoint.isWriteWatchpoint()) {
- watchType |= ICDIWatchpoint.WRITE;
- }
- Watchpoint wpoint = new Watchpoint(target, miBreakpoint.getWhat(), type, watchType, condition, miBreakpoint.isEnabled());
- wpoint.setMIBreakpoints(new MIBreakpoint[] {miBreakpoint});
- bList.add(wpoint);
- } else {
- int hint = MIBreakpointChangedEvent.HINT_NONE;
- if (event instanceof MIBreakpointChangedEvent) {
- hint = ((MIBreakpointChangedEvent)event).getHint();
- }
- String function = miBreakpoint.getFunction();
- String file = miBreakpoint.getFile();
- int line = miBreakpoint.getLine();
- String addr = miBreakpoint.getAddress();
- boolean enabled = miBreakpoint.isEnabled();
-
- Breakpoint newBreakpoint = null;
- if (hint == MIBreakpointChangedEvent.HINT_NEW_LINE_BREAKPOINT ||
- (hint == MIBreakpointChangedEvent.HINT_NONE && file != null && file.length() > 0 && line > 0)) {
- LineLocation location = createLineLocation (miBreakpoint.getFile(),
- miBreakpoint.getLine());
- newBreakpoint = new LineBreakpoint(target, type, location, condition, enabled);
- } else if ((hint == MIBreakpointChangedEvent.HINT_NEW_FUNCTION_BREAKPOINT ||
- hint == MIBreakpointChangedEvent.HINT_NONE) && function != null && function.length() > 0) {
- FunctionLocation location = createFunctionLocation(file, function);
- newBreakpoint = new FunctionBreakpoint(target, type, location, condition, enabled);
- } else if (hint == MIBreakpointChangedEvent.HINT_NEW_EVENTBREAKPOINT || EventBreakpoint.getEventTypeFromMI(miBreakpoint)!=null) {
- String ctype = EventBreakpoint.getEventTypeFromMI(miBreakpoint);
- if (ctype != null) {
- newBreakpoint = new EventBreakpoint(target, ctype, EventBreakpoint
- .getEventArgumentFromMI(miBreakpoint), condition, enabled);
- } else {
- MIPlugin.log("Unsupported event breakpoint: "+miBreakpoint.getWhat()); //$NON-NLS-1$ log entry not for users
- }
- } else if (addr != null && addr.length() > 0) {
- BigInteger big = MIFormat.getBigInteger(addr);
- AddressLocation location = createAddressLocation(big);
- newBreakpoint = new AddressBreakpoint(target, type, location, condition,
- enabled);
- }
- if (newBreakpoint != null) {
- newBreakpoint.setMIBreakpoints(new MIBreakpoint[] { miBreakpoint });
- bList.add(newBreakpoint);
- }
- }
- eventList.add(new MIBreakpointCreatedEvent(miSession, no));
- }
- }
- // Check if any breakpoint was removed.
- Breakpoint[] oldBreakpoints = (Breakpoint[]) bList.toArray(new Breakpoint[0]);
- for (int i = 0; i < oldBreakpoints.length; i++) {
- boolean found = false;
- MIBreakpoint[] miBreakpoints = oldBreakpoints[i].getMIBreakpoints();
- for (int j = 0; j < miBreakpoints.length; j++) {
- int no = miBreakpoints[j].getNumber();
- for (int k = 0; k < allMIBreakpoints.length; k++) {
- if (no == allMIBreakpoints[k].getNumber()) {
- found = true;
- break;
- }
- }
- if (!found) {
- // Fire destroyed Events.
- eventList.add(new MIBreakpointDeletedEvent(miSession, no));
- }
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- miSession.fireEvents(events);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#allowProgramInterruption()
- */
- public void allowProgramInterruption(boolean e) {
- allowInterrupt = e;
- }
-
- public void deleteFromDeferredList(Breakpoint bkpt) {
- List dList = (List)deferredMap.get(bkpt.getTarget());
- if (dList != null) {
- dList.remove(bkpt);
- }
- }
-
- /**
- * Use by the EventManager when checking for deferred breapoints.
- * @param bkpt
- */
- public void addToBreakpointList(Breakpoint bkpt) {
- List bList = getBreakpointsList(bkpt.getTarget());
- bList.add(bkpt);
- }
-
- public void deleteAllBreakpoints(Target target) throws CDIException {
- List bList = (List)breakMap.get(target);
- if (bList != null) {
- ICDIBreakpoint[] bps = new ICDIBreakpoint[bList.size()];
- bList.toArray(bps);
- deleteBreakpoints(target, bps);
- }
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#deleteBreakpoint(ICDIBreakpoint)
- */
- public void deleteBreakpoint(ICDIBreakpoint breakpoint) throws CDIException {
- deleteBreakpoints((Target)breakpoint.getTarget(), new ICDIBreakpoint[] { breakpoint });
- }
-
- public void deleteBreakpoints(Target target, ICDIBreakpoint[] breakpoints) throws CDIException {
- List bList = (List)breakMap.get(target);
- List dList = (List)deferredMap.get(target);
-
- // Do the sanity check first, we will accept all or none
- if (bList == null) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- for (int i = 0; i < breakpoints.length; i++) {
- if (!(breakpoints[i] instanceof Breakpoint && (bList.contains(breakpoints[i]) || (dList != null && dList.contains(breakpoints[i]))))) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
- }
- }
-
- MISession miSession = target.getMISession();
- List eventList = new ArrayList(breakpoints.length);
- for (int i = 0; i < breakpoints.length; i++) {
- if (!(dList != null && dList.remove(breakpoints[i]))) {
- MIBreakpoint[] miBreakpoints = ((Breakpoint)breakpoints[i]).getMIBreakpoints();
- if (miBreakpoints.length > 0) {
- deleteMIBreakpoints(target, miBreakpoints);
- eventList.add(new MIBreakpointDeletedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- miSession.fireEvents(events);
- }
-
- void deleteMIBreakpoints(Target target, MIBreakpoint[] miBreakpoints) throws CDIException {
- MISession miSession = target.getMISession();
- int[] numbers = new int[miBreakpoints.length];
- for (int i = 0; i < miBreakpoints.length; ++i) {
- numbers[i] = miBreakpoints[i].getNumber();
- }
- boolean restart = false;
- try {
- restart = suspendInferior(target);
- deleteMIBreakpoints(miSession, numbers);
- } finally {
- resumeInferior(target, restart);
- }
- }
-
- void deleteMIBreakpoints(MISession miSession, int[] numbers) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIBreakDelete breakDelete = factory.createMIBreakDelete(numbers);
- try {
- miSession.postCommand(breakDelete);
- MIInfo info = breakDelete.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIBreakpoint[] getBreakpoints(Target target) throws CDIException {
- List list = (List)breakMap.get(target);
- if (list != null) {
- ICDIBreakpoint[] bps = new ICDIBreakpoint[list.size()];
- list.toArray(bps);
- return bps;
- }
- return EMPTY_BREAKPOINTS;
- }
-
- public ICDIBreakpoint[] getDeferredBreakpoints(Target target) throws CDIException {
- List dlist = (List)deferredMap.get(target);
- if (dlist != null) {
- ICDIBreakpoint[] bps = new ICDIBreakpoint[dlist.size()];
- dlist.toArray(bps);
- return bps;
- }
- return EMPTY_BREAKPOINTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setLineBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDILineLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- public ICDILineBreakpoint setLineBreakpoint(Target target, int type, ICDILineLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- LineBreakpoint bkpt = new LineBreakpoint(target, type, location, condition, enabled);
- setNewLocationBreakpoint(bkpt, deferred);
- return bkpt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setFunctionBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- public ICDIFunctionBreakpoint setFunctionBreakpoint(Target target, int type, ICDIFunctionLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- FunctionBreakpoint bkpt = new FunctionBreakpoint(target, type, location, condition, enabled);
- setNewLocationBreakpoint(bkpt, deferred);
- return bkpt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setAddressBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- public ICDIAddressBreakpoint setAddressBreakpoint(Target target, int type, ICDIAddressLocation location,
- ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- AddressBreakpoint bkpt = new AddressBreakpoint(target, type, location, condition, enabled);
- setNewLocationBreakpoint(bkpt, deferred);
- return bkpt;
- }
-
-
- protected void setNewLocationBreakpoint(LocationBreakpoint bkpt, boolean deferred) throws CDIException {
- Target target = (Target)bkpt.getTarget();
- MISession miSession = target.getMISession();
- try {
- setLocationBreakpoint(bkpt);
- List blist = getBreakpointsList(target);
- blist.add(bkpt);
-
- // Fire a created Event.
- MIBreakpoint[] miBreakpoints = bkpt.getMIBreakpoints();
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- miSession.fireEvent(new MIBreakpointCreatedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- } catch (CDIException e) {
- if (!deferred) {
- throw e;
- }
- Session session = (Session)target.getSession();
- SharedLibraryManager sharedMgr = session.getSharedLibraryManager();
- if (sharedMgr.isDeferredBreakpoint(target)) {
- addDeferredBreakpoint(bkpt);
- } else {
- throw e;
- }
- }
- }
-
- private void addDeferredBreakpoint(Breakpoint breakpoint) {
- Target target = (Target)breakpoint.getTarget();
- List dList = (List)deferredMap.get(target);
- if (dList == null) {
- dList = Collections.synchronizedList(new ArrayList());
- deferredMap.put(target, dList);
- }
- dList.add(breakpoint);
- }
-
- public void setLocationBreakpoint (LocationBreakpoint bkpt) throws CDIException {
- Target target = (Target)bkpt.getTarget();
- MISession miSession = target.getMISession();
- MIBreakInsert[] breakInserts = createMIBreakInsert(bkpt, miSession.isBreakpointsWithFullName());
- List pointList = new ArrayList();
- boolean restart = false;
- try {
- restart = suspendInferior(target);
- CommandFactory factory = miSession.getCommandFactory();
- boolean enable = bkpt.isEnabled();
- for (int i = 0; i < breakInserts.length; i++) {
- miSession.postCommand(breakInserts[i]);
- MIBreakInsertInfo info = breakInserts[i].getMIBreakInsertInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MIBreakpoint[] points = info.getMIBreakpoints();
- if (points == null || points.length == 0) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Parsing_Error")); //$NON-NLS-1$
- }
- // Set
- if (bkpt.getFile() != null && bkpt.getFile().length() > 0)
- {
- for (int j = 0; j < points.length; j++) {
- points[j].setFile(bkpt.getFile());
- }
- }
- if (bkpt.getLineNumber()>0) {
- for (int j = 0; j < points.length; j++) {
- if (points[j].getLine() == 0)
- points[j].setLine(bkpt.getLineNumber());
- }
- }
- // Make sure that if the breakpoint was disable we create them disable.
- if (!enable) {
- int[] numbers = new int[points.length];
- for (int j = 0; j < points.length; j++) {
- numbers[j] = points[j].getNumber();
- }
- MIBreakDisable breakDisable = factory.createMIBreakDisable(numbers);
- try {
- miSession.postCommand(breakDisable);
- MIInfo disableInfo = breakDisable.getMIInfo();
- if (disableInfo == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- pointList.addAll(Arrays.asList(points));
- }
- } catch (MIException e) {
- try {
- // Things did not go well remove all the breakpoints we've set before.
- MIBreakpoint[] allPoints = (MIBreakpoint[]) pointList.toArray(new MIBreakpoint[pointList.size()]);
- if (allPoints != null && allPoints.length > 0) {
- deleteMIBreakpoints(target, allPoints);
- }
- } catch (CDIException cdie) {
- // ignore this one;
- }
- throw new MI2CDIException(e);
- } finally {
- resumeInferior(target, restart);
- }
- MIBreakpoint[] allPoints = (MIBreakpoint[]) pointList.toArray(new MIBreakpoint[pointList.size()]);
- bkpt.setMIBreakpoints(allPoints);
- }
-
- public void setWatchpoint(Watchpoint bkpt) throws CDIException {
- setWatchpoint(bkpt, true);
- }
-
- private void setWatchpoint(Watchpoint watchpoint, boolean isNew) throws CDIException {
- Target target = (Target)watchpoint.getTarget();
- boolean access = watchpoint.isReadType() && watchpoint.isWriteType();
- boolean read = ! watchpoint.isWriteType() && watchpoint.isReadType();
- String expression = watchpoint.getDerivedExpression();
- boolean enable = watchpoint.isEnabled();
-
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIBreakWatch breakWatch =
- factory.createMIBreakWatch(access, read, expression);
- MIBreakpoint[] points = null;
- boolean restart = false;
- try {
- restart = suspendInferior(target);
- miSession.postCommand(breakWatch);
- MIBreakWatchInfo winfo = breakWatch.getMIBreakWatchInfo();
- if (winfo == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- points = winfo.getMIBreakpoints();
- if (points == null || points.length == 0) {
- throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Parsing_Error")); //$NON-NLS-1$
- }
-
- int no = points[0].getNumber();
-
- // Put the condition now.
- String exprCond = null;
- int ignoreCount = 0;
-
- ICDICondition condition = watchpoint.getCondition();
- if (condition != null) {
- exprCond = condition.getExpression();
- ignoreCount = condition.getIgnoreCount();
- }
- if (exprCond != null && exprCond.length() > 0) {
- MIBreakCondition breakCondition = factory.createMIBreakCondition(no, exprCond);
- miSession.postCommand(breakCondition);
- MIInfo info = breakCondition.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- }
- if (ignoreCount > 0) {
- MIBreakAfter breakAfter = factory.createMIBreakAfter(no, ignoreCount);
- miSession.postCommand(breakAfter);
- MIInfo info = breakAfter.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- }
- if (!enable) {
- int[] numbers = new int[1];
- numbers[0] = no;
- MIBreakDisable breakDisable = factory.createMIBreakDisable(numbers);
- try {
- miSession.postCommand(breakDisable);
- MIInfo disableInfo = breakDisable.getMIInfo();
- if (disableInfo == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- // how to deal with threads ???
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- resumeInferior(target, restart);
- }
- watchpoint.setMIBreakpoints(points);
-
- if (isNew) {
- List bList = getBreakpointsList(target);
- bList.add(watchpoint);
-
- // Fire a created Event.
- MIBreakpoint[] miBreakpoints = watchpoint.getMIBreakpoints();
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- miSession.fireEvent(new MIBreakpointCreatedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- }
- }
-
- Breakpoint[] exceptionBps = new Breakpoint[2];
- final int EXCEPTION_THROW_IDX = 0;
- final int EXCEPTION_CATCH_IDX = 1;
- final static String[] EXCEPTION_FUNCS = new String[] {"__cxa_throw", "__cxa_begin_catch"}; //$NON-NLS-1$ //$NON-NLS-2$
-
-
- public ICDIExceptionpoint setExceptionpoint(Target target, String clazz, boolean stopOnThrow,
- boolean stopOnCatch, boolean enabled) throws CDIException {
-
- if (!stopOnThrow && !stopOnCatch) {
- throw new CDIException("Must suspend on throw or catch"); //$NON-NLS-1$
- }
-
- MIBreakpoint[] miBreakpoints = null;
-
- if (stopOnThrow) {
- synchronized(exceptionBps) {
- int id = EXCEPTION_THROW_IDX;
- if (exceptionBps[EXCEPTION_THROW_IDX] == null) {
- FunctionLocation location = new FunctionLocation(null, EXCEPTION_FUNCS[id]);
- FunctionBreakpoint bp = new FunctionBreakpoint(target, ICBreakpointType.REGULAR, location, null, enabled);
- setLocationBreakpoint(bp);
- exceptionBps[id] = bp;
- miBreakpoints = bp.getMIBreakpoints();
- }
- }
- }
- if (stopOnCatch) {
- synchronized(exceptionBps) {
- int id = EXCEPTION_THROW_IDX;
- if (exceptionBps[id] == null) {
- FunctionLocation location = new FunctionLocation(null, EXCEPTION_FUNCS[id]);
- FunctionBreakpoint bp = new FunctionBreakpoint(target, ICBreakpointType.REGULAR, location, null, enabled);
- setLocationBreakpoint(bp);
- exceptionBps[id] = bp;
- if (miBreakpoints != null) {
- MIBreakpoint[] mibp = bp.getMIBreakpoints();
- MIBreakpoint[] temp = new MIBreakpoint[miBreakpoints.length + mibp.length];
- System.arraycopy(miBreakpoints, 0, temp, 0, miBreakpoints.length);
- System.arraycopy(mibp, 0, temp, miBreakpoints.length, mibp.length);
- } else {
- miBreakpoints = bp.getMIBreakpoints();
- }
- }
- }
- }
-
- Exceptionpoint excp = new Exceptionpoint(target, clazz, stopOnThrow, stopOnCatch, null, enabled);
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- excp.setMIBreakpoints(miBreakpoints);
- List blist = getBreakpointsList(target);
- blist.add(excp);
-
- // Fire a created Event.
- MISession miSession = target.getMISession();
- miSession.fireEvent(new MIBreakpointCreatedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- return excp;
- }
-
- /**
- * Call -gdb-set breakpoint pending set
- * @param target
- * @param set
- * @throws CDIException
- */
- public void setBreakpointPending(Target target, boolean set) throws CDIException {
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIGDBSetBreakpointPending bpp = factory.createMIGDBSetBreakpointPending(set);
- try {
- miSession.postCommand(bpp);
- MIInfo info = bpp.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public Condition createCondition(int ignoreCount, String expression, String[] tids) {
- return new Condition(ignoreCount, expression, tids);
- }
-
- public LineLocation createLineLocation(String file, int line) {
- return new LineLocation(file, line);
- }
-
- public FunctionLocation createFunctionLocation(String file, String function) {
- return new FunctionLocation(file, function);
- }
-
- public AddressLocation createAddressLocation(BigInteger address) {
- return new AddressLocation(address);
- }
- MIBreakInsert[] createMIBreakInsert(LocationBreakpoint bkpt) throws CDIException {
- return createMIBreakInsert(bkpt, false);
- }
- MIBreakInsert[] createMIBreakInsert(LocationBreakpoint bkpt, boolean fullPath) throws CDIException {
- boolean hardware = bkpt.isHardware();
- boolean temporary = bkpt.isTemporary();
- String exprCond = null;
- int ignoreCount = 0;
- String[] threadIds = null;
- StringBuffer line = new StringBuffer();
-
- if (bkpt.getCondition() != null) {
- ICDICondition condition = bkpt.getCondition();
- exprCond = condition.getExpression();
- ignoreCount = condition.getIgnoreCount();
- threadIds = condition.getThreadIds();
- }
-
- if (bkpt.getLocator() != null) {
- ICDILocator locator = bkpt.getLocator();
- String file = locator.getFile();
- if (file != null) {
- if (fullPath==false) {
- file = new File(file).getName();
- }
- }
- String function = locator.getFunction();
- int no = locator.getLineNumber();
- if (bkpt instanceof LineBreakpoint) {
- if (file != null && file.length() > 0) {
- line.append(file).append(':');
- }
- line.append(no);
- } else if (bkpt instanceof FunctionBreakpoint) {
- if (function != null && function.length() > 0) {
- // if the function contains :: assume the user
- // knows the exact funciton
- int colon = function.indexOf("::"); //$NON-NLS-1$
- if (colon != -1) {
- line.append(function);
- } else {
- if (file != null && file.length() > 0) {
- line.append(file).append(':');
- }
- // GDB does not seem to accept function arguments when
- // we use file name:
- // (gdb) break file.c:Test(int)
- // Will fail, altought it can accept this
- // (gdb) break file.c:main
- // so fall back to the line number or
- // just the name of the function if lineno is invalid.
- int paren = function.indexOf('(');
- if (paren != -1) {
- if (no <= 0) {
- String func = function.substring(0, paren);
- line.append(func);
- } else {
- line.append(no);
- }
- } else {
- line.append(function);
- }
- }
- } else {
- // ???
- if (file != null && file.length() > 0) {
- line.append(file).append(':');
- }
- if (no > 0) {
- line.append(no);
- }
- }
- } else if (bkpt instanceof AddressBreakpoint) {
- line.append('*').append(locator.getAddress());
- } else {
- // ???
- if (file != null && file.length() > 0) {
- line.append(file).append(':');
- }
- line.append(no);
- }
- }
-
- MIBreakInsert[] miBreakInserts;
- MISession miSession = ((Target)bkpt.getTarget()).getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- if (threadIds == null || threadIds.length == 0) {
- MIBreakInsert bi = factory.createMIBreakInsert(temporary, hardware, exprCond, ignoreCount, line.toString(), 0);
- miBreakInserts = new MIBreakInsert[] { bi } ;
- } else {
- List list = new ArrayList(threadIds.length);
- for (int i = 0; i < threadIds.length; i++) {
- String threadId = threadIds[i];
- int tid = 0;
- if (threadId != null && threadId.length() > 0) {
- try {
- tid = Integer.parseInt(threadId);
- list.add(factory.createMIBreakInsert(temporary, hardware, exprCond, ignoreCount, line.toString(), tid));
- } catch (NumberFormatException e) {
- }
- }
- }
- miBreakInserts = (MIBreakInsert[]) list.toArray(new MIBreakInsert[list.size()]);
- }
- return miBreakInserts;
- }
- public ICDIEventBreakpoint setEventBreakpoint(Target target, String type, String arg, ICDICondition condition, boolean enabled) throws CDIException {
- EventBreakpoint eventBkpt = new EventBreakpoint(target,type,arg,condition,enabled);
- setEventBreakpoint(eventBkpt);
- return eventBkpt;
- }
- public void setEventBreakpoint(EventBreakpoint eventBkpt) throws CDIException {
- Target target = (Target) eventBkpt.getTarget();
-
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- CLICatch breakCatch = factory.createCLICatch(eventBkpt.getGdbEvent(), eventBkpt
- .getGdbArg());
-
- eventBkpt.setMIBreakpoints(new MIBreakpoint[0]); // initialize
- boolean restart = false;
- try {
- restart = suspendInferior(target);
- miSession.postCommand(breakCatch);
- int no;
- try {
- CLICatchInfo cinfo = (CLICatchInfo) breakCatch.getMIInfo();
- if (cinfo == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MIBreakpoint[] points = cinfo.getMIBreakpoints();
- if (points == null || points.length == 0) {
- throw new CDIException(CdiResources
- .getString("cdi.BreakpointManager.Parsing_Error")); //$NON-NLS-1$
- }
- no = points[0].getNumber();
- eventBkpt.setMIBreakpoints(points);
- } catch (MIException e) {
- if (!eventBkpt.isDeferred()) {
- throw e;
- }
- addDeferredBreakpoint(eventBkpt);
- return;
- }
-
- // Put the condition now.
- String exprCond = null;
- int ignoreCount = 0;
-
- ICDICondition condition = eventBkpt.getCondition();
- if (condition != null) {
- exprCond = condition.getExpression();
- ignoreCount = condition.getIgnoreCount();
- }
- if (exprCond != null && exprCond.length() > 0) {
- MIBreakCondition breakCondition = factory.createMIBreakCondition(no, exprCond);
- miSession.postCommand(breakCondition);
- MIInfo info = breakCondition.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- }
- if (ignoreCount > 0) {
- MIBreakAfter breakAfter = factory.createMIBreakAfter(no, ignoreCount);
- miSession.postCommand(breakAfter);
- MIInfo info = breakAfter.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- }
- // how to deal with threads ???
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- resumeInferior(target, restart);
- }
-
-
-
- List bList = getBreakpointsList(target);
- bList.add(eventBkpt);
-
- // Fire a created Event.
- MIBreakpoint[] miBreakpoints = eventBkpt.getMIBreakpoints();
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- miSession.fireEvent(new MIBreakpointCreatedEvent(miSession, miBreakpoints[0]
- .getNumber()));
- }
-
-
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.java
deleted file mode 100644
index 4f53848df86..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 12, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.cdt.debug.mi.core.cdi;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-/**
- * @author twolff
- *
- * To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-public class CdiResources {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.core.cdi.CdiResources";//$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
- /**
- *
- */
- private CdiResources() {
- // TODO Auto-generated constructor stub
- }
- /**
- * @param key
- * @return
- */
- public static String getString(String key) {
- // TODO Auto-generated method stub
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties
deleted file mode 100644
index 853458e607b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-# IBM Corporation
-###############################################################################
-
-cdi.Common.No_answer=No answer
-cdi.Common.Not_implemented=Not Implemented
-cdi.SourceManager.Unknown_type=Unknown type
-cdi.RegisterManager.Wrong_register_type=Wrong register type
-cdi.BreakpointManager.Not_a_CDT_breakpoint=Not a CDT breakpoint
-cdi.BreakpointManager.Not_Supported=Not Supported
-cdi.BreakpointManager.Parsing_Error=Parsing Error
-cdi.RuntimeOptions.Unable_to_set_args_target_not_responding=Unable to set arguments: target is not responding
-cdi.RuntimeOptions.Unable_to_set_args=Unable to set environment:
-cdi.RuntimeOptions.Unable_to_set_working_dir=Unable to set working directory:
-cdi.Session.Unknown_target=Unkown target
-cdi.VariableManager.Unknown_type=Unknown type
-cdi.VariableManager.Wrong_variable_type=Wrong variable type
-cdi.VariableManager.Unknown_variable_object=Unknown variable object
-cdi.model.VariableObject.Target_not_responding=Target is not responding
-cdi.model.Target.Unknown_thread=Unknown thread
-cdi.model.Target.Target_not_responding=Target is not responding
-cdi.model.Target.Cannot_switch_to_thread=Can not switch to thread
-cdi.model.Target.Inferior_already_running=Inferior is already running
-cdi.model.MemoryBlock.Bad_Offset=Bad Offset
-cdi.mode.Target.Bad_location=Bad location
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
deleted file mode 100644
index 4f27c0e1b03..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDICondition;
-
-/**
- */
-public class Condition implements ICDICondition {
-
- int ignoreCount;
- String expression;
- String[] tids;
-
- public Condition(int ignore, String exp, String[] ids) {
- ignoreCount = ignore;
- expression = (exp == null) ? new String() : exp;
- tids = (ids == null) ? new String[0] : ids;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDICondition#getIgnoreCount()
- */
- @Override
- public int getIgnoreCount() {
- return ignoreCount;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDICondition#getExpression()
- */
- @Override
- public String getExpression() {
- return expression;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDICondition#getThreadId()
- */
- @Override
- public String[] getThreadIds() {
- return tids;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(ICDICondition obj) {
- if (obj instanceof Condition) {
- Condition cond = (Condition)obj;
- if (cond.getIgnoreCount() != this.getIgnoreCount())
- return false;
- if (cond.getExpression().compareTo(this.getExpression()) != 0)
- return false;
- if (cond.getThreadIds().length != this.getThreadIds().length)
- return false;
- for (int i = 0; i < cond.getThreadIds().length; ++i) {
- if (cond.getThreadIds()[i].compareTo(this.getThreadIds()[i]) != 0) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EndSteppingRange.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EndSteppingRange.java
deleted file mode 100644
index 2c879f69fd5..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EndSteppingRange.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIEndSteppingRange;
-
-/**
- */
-public class EndSteppingRange extends SessionObject implements ICDIEndSteppingRange {
-
- public EndSteppingRange(Session session) {
- super(session);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ErrorInfo.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ErrorInfo.java
deleted file mode 100644
index 25526164303..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ErrorInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIErrorInfo;
-import org.eclipse.cdt.debug.mi.core.event.MIErrorEvent;
-
-/**
- */
-public class ErrorInfo extends SessionObject implements ICDIErrorInfo {
-
- MIErrorEvent event;
-
- public ErrorInfo(Session session, MIErrorEvent e) {
- super(session);
- event = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIErrorInfo#getMessage()
- */
- @Override
- public String getMessage() {
- return event.getMessage();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIErrorInfo#getDetailMessage()
- */
- @Override
- public String getDetailMessage() {
- return event.getLogMessage();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
deleted file mode 100644
index 60a709b89f0..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 Freescale Semiconductor and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Freescale Semiconductor - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import org.eclipse.cdt.debug.core.cdi.ICDIEventBreakpointHit;
-
-/**
- * @since 7.0
- */
-public class EventBreakpointHit extends SessionObject implements ICDIEventBreakpointHit {
-
- /**
- * See description of eventType param in constructor
- */
- private String fEventType;
-
- /**
- * @param session
- * @param eventType
- * the type of event breakpoint, in descriptive form (rather than
- * an ID). E.g., "signal", or "load". These are not standardized,
- * and can vary slightly from one gdb version to another, because
- * of difference in how catchpoint hits are reported. This string
- * should be used solely for display purposes.
- */
- public EventBreakpointHit(Session session, String eventType) {
- super(session);
- assert (eventType != null) && (eventType.length() > 0);
- fEventType = eventType;
- }
-
- @Override
- public String getEventBreakpointType() {
- return fEventType;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
deleted file mode 100644
index 11bdda88bb2..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
+++ /dev/null
@@ -1,542 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIEventManager;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.event.ChangedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.CreatedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.DestroyedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.DisconnectedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.ExitedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.MemoryChangedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.ResumedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.event.SuspendedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.model.MemoryBlock;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.command.Command;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIExecContinue;
-import org.eclipse.cdt.debug.mi.core.command.MIExecFinish;
-import org.eclipse.cdt.debug.mi.core.command.MIStackInfoDepth;
-import org.eclipse.cdt.debug.mi.core.command.MIStackSelectFrame;
-import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MICreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIDestroyedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIDetachedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIGDBExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorSignalExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRegisterChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRegisterCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRunningEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibUnloadedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISignalChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIStoppedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIStackInfoDepthInfo;
-
-/**
- */
-public class EventManager extends SessionObject implements ICDIEventManager, Observer {
-
- List list = Collections.synchronizedList(new ArrayList(1));
- MIRunningEvent lastRunningEvent;
- Command lastUserCommand = null;
- boolean fAllowProcessingEvents = true;
- /**
- * Process the event from MI, do any state work on the CDI,
- * and fire the corresponding CDI event.
- */
- @Override
- public void update(Observable o, Object arg) {
-
- MIEvent miEvent = (MIEvent)arg;
- Session session = (Session)getSession();
- Target currentTarget = session.getTarget(miEvent.getMISession());
- if (currentTarget == null) {
- return; // bailout; this no concern to us. But we should Assert.
- }
- List cdiList = new ArrayList(1);
-
- if (miEvent instanceof MIStoppedEvent) {
- if (processSuspendedEvent((MIStoppedEvent)miEvent)) {
- cdiList.add(new SuspendedEvent(session, miEvent));
- }
- } else if (miEvent instanceof MIRunningEvent) {
- if (processRunningEvent((MIRunningEvent)miEvent))
- cdiList.add(new ResumedEvent(session, (MIRunningEvent)miEvent));
- } else if (miEvent instanceof MIChangedEvent) {
- if (miEvent instanceof MIVarChangedEvent) {
- cdiList.add(new ChangedEvent(session, (MIVarChangedEvent)miEvent));
- } else if (miEvent instanceof MIRegisterChangedEvent) {
- cdiList.add(new ChangedEvent(session, (MIRegisterChangedEvent)miEvent));
- } else if (miEvent instanceof MIMemoryChangedEvent) {
- // We need to fire an event for all the register blocks
- // that may contain the modified addresses.
- MemoryManager mgr = session.getMemoryManager();
- MemoryBlock[] blocks = mgr.getMemoryBlocks(miEvent.getMISession());
- MIMemoryChangedEvent miMem = (MIMemoryChangedEvent)miEvent;
- BigInteger[] addresses = miMem.getAddresses();
- for (int i = 0; i < blocks.length; i++) {
- if (blocks[i].contains(addresses) &&
- (! blocks[i].isFrozen() || blocks[i].isDirty())) {
- cdiList.add(new MemoryChangedEvent(session, blocks[i], miMem));
- blocks[i].setDirty(false);
- }
- }
- } else if (miEvent instanceof MIBreakpointChangedEvent) {
- MIBreakpointChangedEvent bpoint = (MIBreakpointChangedEvent)miEvent;
- if (bpoint.getNumber() > 0) {
- cdiList.add(new ChangedEvent(session, bpoint));
- } else {
- try {
- // Pass the event to access to the event's hint
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=135250
- session.getBreakpointManager().update(currentTarget, miEvent);
- } catch (CDIException e) {
- }
- }
- } else if (miEvent instanceof MISharedLibChangedEvent) {
- cdiList.add(new ChangedEvent(session, (MISharedLibChangedEvent)miEvent));
- } else if (miEvent instanceof MISignalChangedEvent) {
- MISignalChangedEvent sig = (MISignalChangedEvent)miEvent;
- String name = sig.getName();
- if (name == null || name.length() == 0) {
- // Something change we do not know what
- // Let the signal manager handle it with an update().
- try {
- SignalManager sMgr = session.getSignalManager();
- sMgr.update(currentTarget);
- } catch (CDIException e) {
- }
- } else {
- cdiList.add(new ChangedEvent(session, sig));
- }
- }
- } else if (miEvent instanceof MIDestroyedEvent) {
- if (miEvent instanceof MIThreadExitEvent) {
- cdiList.add(new DestroyedEvent(session,(MIThreadExitEvent)miEvent));
- } else if (miEvent instanceof MIInferiorSignalExitEvent) {
- cdiList.add(new ExitedEvent(session, (MIInferiorSignalExitEvent)miEvent));
- } else if (miEvent instanceof MIInferiorExitEvent) {
- cdiList.add(new ExitedEvent(session, (MIInferiorExitEvent)miEvent));
- } else if (miEvent instanceof MIGDBExitEvent) {
- // Remove the target from the list.
- Target target = session.getTarget(miEvent.getMISession());
- if (target != null) {
- session.removeTargets(new Target[] { target });
- }
- cdiList.add(new ExitedEvent(session, (MIGDBExitEvent)miEvent));
- } else if (miEvent instanceof MIDetachedEvent) {
- cdiList.add(new DisconnectedEvent(session, (MIDetachedEvent)miEvent));
- } else if (miEvent instanceof MIBreakpointDeletedEvent) {
- MIBreakpointDeletedEvent bpoint = (MIBreakpointDeletedEvent)miEvent;
- if (bpoint.getNumber() > 0) {
- cdiList.add(new DestroyedEvent(session, bpoint));
- } else {
- // Something was deleted we do not know what
- // Let the breakpoint manager handle it with an update().
- try {
- session.getBreakpointManager().update(currentTarget);
- } catch (CDIException e) {
- }
- }
- } else if (miEvent instanceof MISharedLibUnloadedEvent) {
- processSharedLibUnloadedEvent((MISharedLibUnloadedEvent)miEvent);
- cdiList.add(new DestroyedEvent(session, (MISharedLibUnloadedEvent)miEvent));
- } else if (miEvent instanceof MIVarDeletedEvent) {
- cdiList.add(new DestroyedEvent(session, (MIVarDeletedEvent)miEvent));
- }
- } else if (miEvent instanceof MICreatedEvent) {
- if (miEvent instanceof MIBreakpointCreatedEvent) {
- MIBreakpointCreatedEvent bpoint = (MIBreakpointCreatedEvent)miEvent;
- if (bpoint.getNumber() > 0) {
- cdiList.add(new CreatedEvent(session, bpoint));
- } else {
- // Something created we do not know what
- // Let the breakpoint manager handle it with an update().
- try {
- session.getBreakpointManager().update(currentTarget);
- } catch (CDIException e) {
- }
- }
- } else if (miEvent instanceof MIVarCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MIVarCreatedEvent)miEvent));
- } else if (miEvent instanceof MIRegisterCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MIRegisterCreatedEvent)miEvent));
- } else if (miEvent instanceof MIThreadCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MIThreadCreatedEvent)miEvent));
- } else if (miEvent instanceof MIMemoryCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MIMemoryCreatedEvent)miEvent));
- } else if (miEvent instanceof MISharedLibCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MISharedLibCreatedEvent)miEvent));
- } else if (miEvent instanceof MIInferiorCreatedEvent) {
- cdiList.add(new CreatedEvent(session, (MIInferiorCreatedEvent)miEvent));
- }
- }
-
- // Fire the event;
- ICDIEvent[] cdiEvents = (ICDIEvent[])cdiList.toArray(new ICDIEvent[0]);
- fireEvents(cdiEvents);
- }
-
- public EventManager(Session session) {
- super(session);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIEventManager#addEventListener(ICDIEventListener)
- */
- @Override
- public void addEventListener(ICDIEventListener listener) {
- list.add(listener);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIEventManager#removeEventListener(ICDIEventListener)
- */
- @Override
- public void removeEventListener(ICDIEventListener listener) {
- list.remove(listener);
- }
-
- public void removeEventListeners() {
- list.clear();
- }
-
- /**
- * Send ICDIEvent to the listeners.
- */
- public void fireEvents(ICDIEvent[] cdiEvents) {
- if (cdiEvents != null && cdiEvents.length > 0) {
- ICDIEventListener[] listeners = (ICDIEventListener[])list.toArray(new ICDIEventListener[0]);
- for (int i = 0; i < listeners.length; i++) {
- listeners[i].handleDebugEvents(cdiEvents);
- }
- }
- }
-
- /**
- * When suspended arrives, reset managers and target.
- * Alse the variable and the memory needs to be updated and events
- * fired for changes.
- */
- boolean processSuspendedEvent(MIStoppedEvent stopped) {
- Session session = (Session)getSession();
- MISession miSession = stopped.getMISession();
- Target currentTarget = session.getTarget(miSession);
- currentTarget.setSupended(true);
-
- // Bailout early if we do not want to process any events.
- if (!isAllowingProcessingEvents()) {
- return false;
- }
-
-
- if (processSharedLibEvent(stopped)) {
- // Event was consumed by the shared lib processing bailout
- return false;
- }
-
- if (processBreakpointHitEvent(stopped)) {
- // Event was consumed, i.e. it was not the right exception.
- return false;
- }
-
- int threadId = stopped.getThreadId();
- currentTarget.updateState(threadId);
- try {
- Thread cthread = (Thread)currentTarget.getCurrentThread();
- if (cthread != null) {
- cthread.getCurrentStackFrame();
- } else {
- return true;
- }
- } catch (CDIException e1) {
- //e1.printStackTrace();
- return true;
- }
-
- // Update the managers.
- // For the Variable/Expression Managers call only the updateManager.
- VariableManager varMgr = session.getVariableManager();
- ExpressionManager expMgr = session.getExpressionManager();
- RegisterManager regMgr = session.getRegisterManager();
- MemoryManager memMgr = session.getMemoryManager();
- BreakpointManager bpMgr = session.getBreakpointManager();
- SignalManager sigMgr = session.getSignalManager();
- SourceManager srcMgr = session.getSourceManager();
- SharedLibraryManager libMgr = session.getSharedLibraryManager();
- try {
- if (varMgr.isAutoUpdate()) {
- varMgr.update(currentTarget);
- }
- if (expMgr.isAutoUpdate()) {
- expMgr.update(currentTarget);
- }
- if (regMgr.isAutoUpdate()) {
- regMgr.update(currentTarget);
- }
- if (memMgr.isAutoUpdate()) {
- memMgr.update(currentTarget);
- }
- if (bpMgr.isAutoUpdate()) {
- bpMgr.update(currentTarget);
- }
- if (sigMgr.isAutoUpdate()) {
- sigMgr.update(currentTarget);
- }
- if (libMgr.isAutoUpdate()) {
- libMgr.update(currentTarget);
- }
- if (srcMgr.isAutoUpdate()) {
- srcMgr.update(currentTarget);
- }
- } catch (CDIException e) {
- // Something went wrong => preventing updates to the model, this is serious
- MIPlugin.log(e);
- }
- return true;
- }
-
- /**
- * When a shared library is unloading we could possibly have stale libraries.
- * GDB does no react well to this: see PR
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=74496
- * @param unLoaded
- * @return
- */
- boolean processSharedLibUnloadedEvent(MISharedLibUnloadedEvent unLoaded) {
- Session session = (Session)getSession();
- MISession miSession = unLoaded.getMISession();
- Target target = session.getTarget(miSession);
-
- // We do not need to do fancy checking we can just delete all
- // the expression variable and let UI recreate them by reevaluating.
- ExpressionManager expMgr = session.getExpressionManager();
- try {
- expMgr.deleteAllVariables(target);
- } catch (CDIException e) {
- }
-
- return false;
- }
-
- /**
- * If the deferredBreakpoint processing is set
- * catch the shared-lib-event go to the last known
- * stackframe and try to finish.
- * Save the last user command and issue it again.
- * @param stopped
- * @return
- */
- boolean processSharedLibEvent(MIStoppedEvent stopped) {
- Session session = (Session)getSession();
- MISession miSession = stopped.getMISession();
-
- Target currentTarget = session.getTarget(miSession);
- SharedLibraryManager mgr = session.getSharedLibraryManager();
-
- if (mgr.isDeferredBreakpoint(currentTarget)) {
- if (stopped instanceof MISharedLibEvent) {
- // Check if we have a new library loaded
- try {
- mgr.update(currentTarget);
- } catch (CDIException e3) {
- }
- CommandFactory factory = miSession.getCommandFactory();
- int type = (lastRunningEvent == null) ? MIRunningEvent.CONTINUE : lastRunningEvent.getType();
- if (lastUserCommand == null) {
- switch (type) {
- case MIRunningEvent.NEXT:
- lastUserCommand = factory.createMIExecNext(1);
- break;
- case MIRunningEvent.NEXTI:
- lastUserCommand = factory.createMIExecNextInstruction(1);
- break;
- case MIRunningEvent.STEP:
- lastUserCommand = factory.createMIExecStep(1);
- break;
- case MIRunningEvent.STEPI:
- lastUserCommand = factory.createMIExecStepInstruction(1);
- break;
- case MIRunningEvent.FINISH:
- lastUserCommand = factory.createMIExecFinish();
- break;
- case MIRunningEvent.RETURN:
- lastUserCommand = factory.createMIExecReturn();
- break;
- case MIRunningEvent.CONTINUE: {
- MIExecContinue cont = factory.createMIExecContinue();
- cont.setQuiet(true);
- try {
- miSession.postCommand(cont);
- MIInfo info = cont.getMIInfo();
- if (info == null) {
- // throw new CDIException("Target is not responding");
- }
- } catch (MIException e) {
- // throw new MI2CDIException(e);
- }
- return true; // for the continue bailout early no need to the stuff below
- }
- }
- }
-
- int miLevel = 0;
- int tid = 0;
- Thread currentThread = null;
- try {
- currentThread = (Thread)currentTarget.getCurrentThread();
- } catch (CDIException e1) {
- }
- tid = currentThread.getId();
- // Select the old thread now.
- if (tid > 0) {
- MIThreadSelect selectThread = factory.createMIThreadSelect(tid);
- try {
- miSession.postCommand(selectThread);
- } catch (MIException e) {
- // ignore
- }
- }
- ICDIStackFrame frame = null;
- try {
- frame = currentThread.getCurrentStackFrame();
- } catch (CDIException e2) {
- }
- int count = 0;
- try {
- MIStackInfoDepth depth = factory.createMIStackInfoDepth();
- miSession.postCommand(depth);
- MIStackInfoDepthInfo info = depth.getMIStackInfoDepthInfo();
- if (info == null) {
- //throw new CDIException("No answer");
- }
- count = info.getDepth();
- } catch (MIException e) {
- //throw new MI2CDIException(e);
- //System.out.println(e);
- }
- if (frame != null) {
- // Fortunately the ICDIStackFrame store the level
- // in ascending level the higher the stack the higher the level
- // GDB does the opposite the highest stack is 0.
- // This allow us to do some calculation, in figure out the
- // level of the old stack. The -1 is because gdb level is zero-based
- miLevel = count - frame.getLevel() - 1;
- }
- if (miLevel >= 0) {
- MIStackSelectFrame selectFrame = factory.createMIStackSelectFrame(miLevel);
- MIExecFinish finish = factory.createMIExecFinish();
- finish.setQuiet(true);
- try {
- miSession.postCommand(selectFrame);
- miSession.postCommand(finish);
- } catch (MIException e) {
- // ignore
- }
- } else {
- // if we are still at the same level in the backtrace
- // for example the StopEventLib was on a different thread
- // redo the last command.
- Command cmd = lastUserCommand;
- cmd.setQuiet(true);
- lastUserCommand = null;
- try {
- miSession.postCommand(cmd);
- } catch (MIException e) {
- // ignore
- }
- }
- return true;
- } else if (lastUserCommand != null) {
- Command cmd = lastUserCommand;
- cmd.setQuiet(true);
- lastUserCommand = null;
- try {
- miSession.postCommand(cmd);
- } catch (MIException e) {
- }
- return true;
- }
- }
- return false;
- }
-
- boolean processBreakpointHitEvent(MIStoppedEvent stopped) {
-// Session session = (Session)getSession();
-// if (stopped instanceof MIBreakpointHitEvent) {
-// MIBreakpointHitEvent bpEvent = (MIBreakpointHitEvent)stopped;
-// BreakpointManager bpMgr = session.getBreakpointManager();
-// int bpNo = bpEvent.getNumber();
-// }
- return false;
- }
-
- /**
- * Do any processing of before a running event.
- */
- boolean processRunningEvent(MIRunningEvent running) {
- lastRunningEvent = running;
-
- Session session = (Session)getSession();
- MISession miSession = running.getMISession();
- Target currentTarget = session.getTarget(miSession);
- currentTarget.setSupended(false);
-
- // Bailout early if we do not want to process any events.
- if (!isAllowingProcessingEvents() || !running.propagate()) {
- return false;
- }
-
- return true;
- }
-
- public boolean isAllowingProcessingEvents() {
- return fAllowProcessingEvents;
- }
-
- public void allowProcessingEvents(boolean allowed) {
- fAllowProcessingEvents = allowed;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExitInfo.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExitInfo.java
deleted file mode 100644
index 961ce4b0a8f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExitInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIExitInfo;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
-
-/**.
- */
-public class ExitInfo extends SessionObject implements ICDIExitInfo {
-
- MIInferiorExitEvent event;
-
- public ExitInfo(Session session, MIInferiorExitEvent e) {
- super(session);
- event = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIExitInfo#getCode()
- */
- @Override
- public int getCode() {
- return event.getExitCode();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
deleted file mode 100644
index 121a9138428..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Alena Laskavaia (QNX) - Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Expression;
-import org.eclipse.cdt.debug.mi.core.cdi.model.LocalVariable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.command.MIVarDelete;
-import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
-import org.eclipse.cdt.debug.mi.core.output.MIVarCreateInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarUpdateInfo;
-
-/**
- */
-public class ExpressionManager extends Manager {
-
- final static ICDIExpression[] EMPTY_EXPRESSIONS = {};
- Map expMap;
- Map varMap;
- MIVarChange[] noChanges = new MIVarChange[0];
-
- public ExpressionManager(Session session) {
- super(session, true);
- expMap = new Hashtable();
- varMap = new Hashtable();
- }
-
- synchronized List getExpressionList(Target target) {
- List expList = (List)expMap.get(target);
- if (expList == null) {
- expList = Collections.synchronizedList(new ArrayList());
- expMap.put(target, expList);
- }
- return expList;
- }
-
- synchronized List getVariableList(Target target) {
- List varList = (List)varMap.get(target);
- if (varList == null) {
- varList = Collections.synchronizedList(new ArrayList());
- varMap.put(target, varList);
- }
- return varList;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#createExpression(String)
- */
- public ICDIExpression createExpression(Target target, String name) throws CDIException {
- Expression expression = new Expression(target, name);
- List exprList = getExpressionList(target);
- exprList.add(expression);
- return expression;
- }
-
- public ICDIExpression[] getExpressions(Target target) throws CDIException {
- List expList = (List) expMap.get(target);
- if (expList != null) {
- return (ICDIExpression[])expList.toArray(EMPTY_EXPRESSIONS);
- }
- return EMPTY_EXPRESSIONS;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#removeExpression(ICDIExpression)
- */
- public void destroyExpressions(Target target, ICDIExpression[] expressions) throws CDIException {
- List expList = getExpressionList(target);
- for (int i = 0; i < expressions.length; ++i) {
- expList.remove(expressions[i]);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#removeExpression(ICDIExpression)
- */
- public void destroyAllExpressions(Target target) throws CDIException {
- ICDIExpression[] expressions = getExpressions(target);
- destroyExpressions(target, expressions);
- }
-
- @Override
- public void update(Target target) throws CDIException {
-// deleteAllVariables(target);
- List eventList = new ArrayList();
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- List varList = getVariableList(target);
- Variable[] variables = (Variable[]) varList.toArray(new Variable[varList.size()]);
- for (int i = 0; i < variables.length; i++) {
- Variable variable = variables[i];
- String varName = variable.getMIVar().getVarName();
- MIVarChange[] changes = noChanges;
- MIVarUpdate update = factory.createMIVarUpdate(varName);
- MIVarUpdateInfo info = null;
- try {
- mi.postCommand(update);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- boolean timedout = false;
- try {
- info = update.getMIVarUpdateInfo();
- if (info == null) {
- timedout = true;
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- changes = info.getMIVarChanges();
- } catch (MIException e) {
- if (timedout) {
- throw new MI2CDIException(e);
- }
- eventList.add(new MIVarDeletedEvent(mi, varName));
- }
- for (int j = 0; j < changes.length; j++) {
- String n = changes[j].getVarName();
- if (changes[j].isInScope()) {
- eventList.add(new MIVarChangedEvent(mi, n));
- } else {
- deleteVariable(variable);
- eventList.add(new MIVarDeletedEvent(mi, n));
- }
- }
- }
- MIEvent[] events = (MIEvent[]) eventList.toArray(new MIEvent[0]);
- mi.fireEvents(events);
- }
-
- /**
- * @param miSession
- * @param varName
- * @return
- */
- public Variable getVariable(MISession miSession, String varName) {
- Session session = (Session)getSession();
- Target target = session.getTarget(miSession);
- List varList = getVariableList(target);
- Variable[] vars = (Variable[])varList.toArray(new Variable[0]);
- for (int i = 0; i < vars.length; i++) {
- try {
- if (vars[i].getMIVar().getVarName().equals(varName)) {
- return vars[i];
- }
- Variable v = vars[i].getChild(varName);
- if (v != null) {
- return v;
- }
- } catch (CDIException e) {
- // ignore
- }
- }
- return null;
- }
-
- public Variable createVariable(StackFrame frame, String code) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(code);
- mi.postCommand(var);
- MIVarCreateInfo info = var.getMIVarCreateInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- Variable variable = new LocalVariable(target, null, frame, code, null, 0, 0, info.getMIVar());
- List varList = getVariableList(target);
- varList.add(variable);
- return variable;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
-
- /**
- * Remove variable form the maintained cache list.
- * @param miSession
- * @param varName
- * @return
- */
- public Variable removeVariableFromList(MISession miSession, String varName) {
- Variable var = getVariable(miSession, varName);
- if (var != null) {
- Target target = ((Session)getSession()).getTarget(miSession);
- List varList = getVariableList(target);
- varList.remove(var);
- return var;
- }
- return null;
- }
-
- public void deleteAllVariables(Target target) throws CDIException {
- List varList = getVariableList(target);
- Variable[] variables = (Variable[]) varList.toArray(new Variable[varList.size()]);
- for (int i = 0; i < variables.length; ++i) {
- deleteVariable(variables[i]);
- }
- }
- /**
- * Get rid of the underlying variable.
- */
- public void deleteVariable(Variable variable) throws CDIException {
- Target target = (Target)variable.getTarget();
- MISession miSession = target.getMISession();
- MIVar miVar = variable.getMIVar();
- //remove the underlying var-object now.
- CommandFactory factory = miSession.getCommandFactory();
- MIVarDelete var = factory.createMIVarDelete(miVar.getVarName());
- try {
- miSession.postCommand(var);
- var.getMIInfo();
- } catch (MIException e) {
- //throw new MI2CDIException(e);
- }
- List varList = getVariableList(target);
- varList.remove(variable);
-
- // remove any children
- ICDIVariable[] children = variable.children;
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- if (children[0] instanceof Variable) {
- Variable child = (Variable)children[i];
- MIVarDeletedEvent event = new MIVarDeletedEvent(miSession, child.getMIVar().getVarName());
- miSession.fireEvent(event);
- }
- }
- }
- miSession.fireEvent(new MIVarDeletedEvent(miSession, variable.getMIVar().getVarName()));
- }
-
-}
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
deleted file mode 100644
index abcde577f79..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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/Format.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Format.java
deleted file mode 100644
index 7875a602636..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Format.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIFormat;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-
-/**
- */
-public class Format {
-
- private Format() {
- }
-
- public static int toMIFormat(int format) {
- int fmt = MIFormat.NATURAL;
- switch (format) {
- case ICDIFormat.NATURAL:
- fmt = MIFormat.NATURAL;
- break;
-
- case ICDIFormat.DECIMAL:
- fmt = MIFormat.DECIMAL;
- break;
-
- case ICDIFormat.BINARY:
- fmt = MIFormat.BINARY;
- break;
-
- case ICDIFormat.OCTAL:
- fmt = MIFormat.OCTAL;
- break;
-
- case ICDIFormat.HEXADECIMAL:
- fmt = MIFormat.HEXADECIMAL;
- break;
- }
- return fmt;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java
deleted file mode 100644
index 4b59142950d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionFinished;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.LocalVariableDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.event.MIFunctionFinishedEvent;
-
-/*
- * FunctionFinished
- */
-public class FunctionFinished extends EndSteppingRange implements ICDIFunctionFinished {
-
- MIFunctionFinishedEvent fMIEvent;
-
- /**
- * @param session
- */
- public FunctionFinished(Session session, MIFunctionFinishedEvent event) {
- super(session);
- fMIEvent = event;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDIFunctionFinished#getReturnType()
- */
- @Override
- public ICDIType getReturnType() throws CDIException {
- Session session = (Session)getSession();
- Target target = session.getTarget(fMIEvent.getMISession());
- String rType = fMIEvent.getReturnType();
- if (rType == null || rType.length() == 0) {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_type")); //$NON-NLS-1$
- }
- SourceManager srcMgr = session.getSourceManager();
- return srcMgr.getType(target, rType);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDIFunctionFinished#getReturnValue()
- */
- @Override
- public ICDIValue getReturnValue() throws CDIException {
- Session session = (Session)getSession();
- Target target = session.getTarget(fMIEvent.getMISession());
- Thread thread = (Thread)target.getCurrentThread();
- StackFrame frame = thread.getCurrentStackFrame();
- String gdbVariable = fMIEvent.getGDBResultVar();
- if (gdbVariable == null || gdbVariable.length() == 0) {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_type")); //$NON-NLS-1$
- }
- LocalVariableDescriptor varDesc = new LocalVariableDescriptor(target, thread, frame, gdbVariable, null, 0, 0);
- VariableManager varMgr = session.getVariableManager();
- Variable var = varMgr.createVariable(varDesc);
- return var.getValue();
- }
-
-}
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
deleted file mode 100644
index 18954dcd147..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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
deleted file mode 100644
index c9d282043da..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDIFileLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-
-/**
- */
-public abstract class Location {
-
- BigInteger fAddress = null;
- String fFile = null;
- String fFunction = null;
- int fLine;
-
- /**
- * File location
- * @param file
- */
- public Location(String file) {
- this(file, null, 0, null);
- }
-
- /**
- * File:function location
- * @param file
- * @param function
- */
- public Location(String file, String function) {
- this(file, function, 0, null);
- }
-
- /**
- * File:line location
- * @param file
- * @param line
- */
- public Location(String file, int line) {
- this (file, null, line, null);
- }
-
- /**
- * Address location
- * @param address
- */
- public Location(BigInteger address) {
- this (null, null, 0, address);
- }
-
- protected Location(String file, String function, int line, BigInteger address) {
- fFile = file;
- fFunction = function;
- fLine = line;
- fAddress = address;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDILocation#getAddress()
- */
- public BigInteger getAddress() {
- return fAddress;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDILocation#getFile()
- */
- public String getFile() {
- return fFile;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDILocation#getFunction()
- */
- public String getFunction() {
- return fFunction;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDILocation#getLineNumber()
- */
- public int getLineNumber() {
- return fLine;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDILocation#equals(ICDILocation)
- */
- public boolean equals(ICDILocation location) {
- if (location == this) {
- return true;
- }
- if (location instanceof ICDILineLocation) {
- ICDILineLocation lineLocation = (ICDILineLocation)location;
- String oFile = lineLocation.getFile();
- if (oFile != null && oFile.length() > 0 && fFile != null && fFile.length() > 0 && oFile.equals(fFile)) {
- if (lineLocation.getLineNumber() == fLine) {
- return true;
- }
- } else if ((fFile == null || fFile.length() == 0) && (oFile == null || oFile.length() == 0)) {
- if (lineLocation.getLineNumber() == fLine) {
- return true;
- }
- }
- } else if (location instanceof ICDIFunctionLocation) {
- ICDIFunctionLocation funcLocation = (ICDIFunctionLocation)location;
- String oFile = funcLocation.getFile();
- String oFunction = funcLocation.getFunction();
- if (oFile != null && oFile.length() > 0 && fFile != null && fFile.length() > 0 && oFile.equals(fFile)) {
- if (oFunction != null && oFunction.length() > 0 && fFunction != null && fFunction.length() > 0 && oFunction.equals(fFunction)) {
- return true;
- } else if ((oFunction == null || oFunction.length() == 0) && (fFunction == null || fFunction.length() == 0)) {
- return true;
- }
- } else if ((fFile == null || fFile.length() == 0) && (oFile == null || oFile.length() == 0)) {
- if (oFunction != null && oFunction.length() > 0 && fFunction != null && fFunction.length() > 0 && oFunction.equals(fFunction)) {
- return true;
- } else if ((oFunction == null || oFunction.length() == 0) && (fFunction == null || fFunction.length() == 0)) {
- return true;
- }
- }
- } else if (location instanceof ICDIAddressLocation) {
- ICDIAddressLocation addrLocation = (ICDIAddressLocation)location;
- BigInteger oAddr = addrLocation.getAddress();
- if (oAddr != null && oAddr.equals(fAddress)) {
- return true;
- } else if (oAddr == null && fAddress == null) {
- return true;
- }
- } else if (location instanceof ICDIFileLocation) {
- ICDIFileLocation fileLocation = (ICDIFileLocation)location;
- String oFile = fileLocation.getFile();
- if (oFile != null && oFile.length() > 0 && fFile != null && fFile.length() > 0 && oFile.equals(fFile)) {
- return true;
- } else if ((fFile == null || fFile.length() == 0) && (oFile == null || oFile.length() == 0)) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java
deleted file mode 100644
index 53a19daf91b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-
-public class Locator extends Location implements ICDILocator {
-
- public Locator(String file, String function, int line, BigInteger address) {
- super(file, function, line, address);
- }
-
- boolean equalFile(String oFile) {
- return equalString(oFile, getFile());
- }
-
- boolean equalFunction(String oFunction) {
- return equalString(oFunction, getFunction());
- }
-
- boolean equalLine(int oLine) {
- return oLine == getLineNumber();
- }
-
- boolean equalAddress(BigInteger oAddress) {
- if (oAddress == null && getAddress() == null) {
- return true;
- }
- if (oAddress != null && oAddress.equals(getAddress())) {
- return true;
- }
- return false;
- }
-
- 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)) {
- return true;
- }
- return false;
- }
-
- public boolean equals(ICDILocator locator) {
-
- if (locator == this) {
- return true;
- }
- String oFile = locator.getFile();
- String oFunction = locator.getFunction();
- int oLine = locator.getLineNumber();
- BigInteger oAddress = locator.getAddress();
-
- if (equalFile(oFile) && equalFunction(oFunction) &&
- equalLine(oLine) && equalAddress(oAddress)) {
- return true;
- }
- return false;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MI2CDIException.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MI2CDIException.java
deleted file mode 100644
index f14bd8ec788..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MI2CDIException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.mi.core.MIException;
-
-/**
- */
-public class MI2CDIException extends CDIException {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public MI2CDIException(MIException e) {
- super(e.getMessage(), e.getLogMessage());
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
deleted file mode 100644
index c0c0749cd49..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- * Manager
- *
- */
-public abstract class Manager extends SessionObject {
-
- boolean autoUpdate;
-
- public Manager(Session session, boolean update) {
- super(session);
- autoUpdate = update;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDIUpdateManager#setAutoUpdate(boolean)
- */
- public void setAutoUpdate(boolean update) {
- autoUpdate = update;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDIUpdateManager#isAutoUpdate()
- */
- public boolean isAutoUpdate() {
- return autoUpdate;
- }
-
- protected abstract void update (Target target) throws CDIException;
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.impl.Manager#update()
- */
- public void update() throws CDIException {
- ICDITarget[] targets = getSession().getTargets();
- for (int i = 0; i < targets.length; ++i) {
- if (targets[i] instanceof Target) {
- update((Target)targets[i]);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
- */
- public void handleDebugEvents(ICDIEvent[] events) {
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
deleted file mode 100644
index f808b3e510e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
-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.MemoryBlock;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataReadMemory;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.output.MIDataReadMemoryInfo;
-
-
-/**
- */
-public class MemoryManager extends Manager {
-
- ICDIMemoryBlock[] EMPTY_MEMORY_BLOCKS = {};
- Map blockMap;
-
- public MemoryManager(Session session) {
- super(session, true);
- blockMap = new Hashtable();
- }
-
- synchronized List getMemoryBlockList(Target target) {
- List blockList = (List)blockMap.get(target);
- if (blockList == null) {
- blockList = Collections.synchronizedList(new ArrayList());
- blockMap.put(target, blockList);
- }
- return blockList;
- }
-
- /**
- * This method will be call by the eventManager.processSuspended() every time the
- * inferior comes to a Stop/Suspended. It will allow to look at the blocks that
- * are registered and fired any event if changed.
- * Note: Frozen blocks are not updated.
- *
- */
- @Override
- public void update(Target target) {
- MISession miSession = target.getMISession();
- List blockList = getMemoryBlockList(target);
- MemoryBlock[] blocks = (MemoryBlock[]) blockList.toArray(new MemoryBlock[blockList.size()]);
- List eventList = new ArrayList(blocks.length);
- for (int i = 0; i < blocks.length; i++) {
- if (! blocks[i].isFrozen()) {
- try {
- update(blocks[i], eventList);
- } catch (CDIException e) {
- }
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- miSession.fireEvents(events);
- }
-
- /**
- * update one Block.
- */
- public BigInteger[] update(MemoryBlock block, List aList) throws CDIException {
- Target target = (Target)block.getTarget();
- MISession miSession = target.getMISession();
- MemoryBlock newBlock = cloneBlock(block);
- boolean newAddress = ! newBlock.getStartAddress().equals(block.getStartAddress());
- BigInteger[] array = compareBlocks(block, newBlock);
- // Update the block MIDataReadMemoryInfo.
- block.setMIDataReadMemoryInfo(newBlock.getMIDataReadMemoryInfo());
- if (array.length > 0 || newAddress) {
- if (aList != null) {
- aList.add(new MIMemoryChangedEvent(miSession, array));
- } else {
- // fire right away.
- miSession.fireEvent(new MIMemoryChangedEvent(miSession, array));
- }
- }
- return array;
- }
-
- /**
- * Compare two blocks and return an array of all _addresses_ that are different.
- * This method is not smart it always assume that:
- * oldBlock.getStartAddress() == newBlock.getStartAddress;
- * oldBlock.getLength() == newBlock.getLength();
- * @return Long[] array of modified addresses.
- */
- BigInteger[] compareBlocks (MemoryBlock oldBlock, MemoryBlock newBlock) throws CDIException {
- byte[] oldBytes = oldBlock.getBytes();
- byte[] newBytes = newBlock.getBytes();
- List aList = new ArrayList(newBytes.length);
- BigInteger distance = newBlock.getStartAddress().subtract(oldBlock.getStartAddress());
- //IPF_TODO enshure it is OK here
- int diff = distance.intValue();
- if ( Math.abs(diff) < newBytes.length) {
- for (int i = 0; i < newBytes.length; i++) {
- if (i + diff < oldBytes.length && i + diff >= 0) {
- if (oldBytes[i + diff] != newBytes[i]) {
- aList.add(newBlock.getStartAddress().add(BigInteger.valueOf(i)));
- }
- }
- }
- }
- return (BigInteger[]) aList.toArray(new BigInteger[aList.size()]);
- }
-
- /**
- * Use the same expression and length of the original block
- * to create a new MemoryBlock. The new block is not register
- * with the MemoryManager.
- */
- MemoryBlock cloneBlock(MemoryBlock block) throws CDIException {
- Target target = (Target)block.getTarget();
- String exp = block.getExpression();
- int wordSize = block.getWordSize();
- boolean little = target.isLittleEndian();
- MIDataReadMemoryInfo info = createMIDataReadMemoryInfo(target.getMISession(), exp, (int)block.getLength(), wordSize);
- return new MemoryBlock(target, exp, wordSize, little, info);
- }
-
- /**
- * Post a -data-read-memory to gdb/mi.
- */
- MIDataReadMemoryInfo createMIDataReadMemoryInfo(MISession miSession, String exp, int units, int wordSize) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIDataReadMemory mem = factory.createMIDataReadMemory(0, exp, MIFormat.HEXADECIMAL, wordSize, 1, units, null);
- try {
- miSession.postCommand(mem);
- MIDataReadMemoryInfo info = mem.getMIDataReadMemoryInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIMemoryBlock createMemoryBlock(Target target, String address, int units, int wordSize) throws CDIException {
- boolean little = target.isLittleEndian();
- MIDataReadMemoryInfo info = createMIDataReadMemoryInfo(target.getMISession(), address, units, wordSize);
- ICDIMemoryBlock block = new MemoryBlock(target, address, wordSize, little, info);
- List blockList = getMemoryBlockList(target);
- blockList.add(block);
- MISession miSession = target.getMISession();
- miSession.fireEvent(new MIMemoryCreatedEvent(miSession, block.getStartAddress(), block.getLength()));
- return block;
- }
-
- public MemoryBlock[] getMemoryBlocks(MISession miSession) {
- Session session = (Session)getSession();
- Target target = session.getTarget(miSession);
- List blockList = getMemoryBlockList(target);
- return (MemoryBlock[]) blockList.toArray(new MemoryBlock[blockList.size()]);
- }
- public ICDIMemoryBlock[] getMemoryBlocks(Target target) throws CDIException {
- List blockList = getMemoryBlockList(target);
- return (ICDIMemoryBlock[]) blockList.toArray(new ICDIMemoryBlock[blockList.size()]);
- }
-
- public void removeAllBlocks(Target target) throws CDIException {
- ICDIMemoryBlock[] blocks = getMemoryBlocks(target);
- removeBlocks(target, blocks);
- }
-
- public void removeBlocks(Target target, ICDIMemoryBlock[] memoryBlocks) throws CDIException {
- List blockList = (List)blockMap.get(target);
- if (blockList != null) {
- blockList.removeAll(Arrays.asList(memoryBlocks));
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java
deleted file mode 100644
index 390e32336e8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.Vector;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorCreatedEvent;
-
-/**
- */
-public class ProcessManager extends Manager {
-
- static final Target[] EMPTY_TARGETS = new Target[0];
- Vector debugTargetList;
-
- public ProcessManager(Session session) {
- super(session, true);
- debugTargetList = new Vector(1);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIProcessManager#getProcesses()
- */
- public Target[] getTargets() {
- return (Target[]) debugTargetList.toArray(new Target[debugTargetList.size()]);
- }
-
- public ICDITarget[] getCDITargets() {
- return (ICDITarget[]) debugTargetList.toArray(new ICDITarget[debugTargetList.size()]);
- }
-
- public void addTargets(Target[] targets) {
- EventManager eventManager = (EventManager)getSession().getEventManager();
- for (int i = 0; i < targets.length; ++i) {
- Target target = targets[i];
- MISession miSession = target.getMISession();
- if (miSession != null) {
- miSession.addObserver(eventManager);
- miSession.fireEvent(new MIInferiorCreatedEvent(miSession, 0));
- if (!debugTargetList.contains(target)) {
- debugTargetList.add(target);
- }
- }
- }
- debugTargetList.trimToSize();
- }
-
- public void removeTargets(Target[] targets) {
- EventManager eventManager = (EventManager)getSession().getEventManager();
- for (int i = 0; i < targets.length; ++i) {
- Target target = targets[i];
- MISession miSession = target.getMISession();
- if (miSession != null) {
- miSession.deleteObserver(eventManager);
- }
- debugTargetList.remove(target);
- }
- debugTargetList.trimToSize();
- }
-
- public Target getTarget(MISession miSession) {
- synchronized(debugTargetList) {
- for (int i = 0; i < debugTargetList.size(); ++i) {
- Target target = (Target)debugTargetList.get(i);
- MISession mi = target.getMISession();
- if (mi.equals(miSession)) {
- return target;
- }
- }
- }
- // ASSERT: it should not happen.
- return null;
- }
-
- @Override
- public void update(Target target) throws CDIException {
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
deleted file mode 100644
index e825d864166..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Giuseppe Montalto, STMicroelectronics - bug 174988
- * Alena Laskavaia (QNX) - Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
-import org.eclipse.cdt.debug.mi.core.cdi.model.RegisterDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.RegisterGroup;
-import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.VariableDescriptor;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataListChangedRegisters;
-import org.eclipse.cdt.debug.mi.core.command.MIDataListRegisterNames;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.command.MIVarDelete;
-import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRegisterChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-import org.eclipse.cdt.debug.mi.core.output.MIDataListChangedRegistersInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIDataListRegisterNamesInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
-import org.eclipse.cdt.debug.mi.core.output.MIVarCreateInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarUpdateInfo;
-
-/**
- */
-public class RegisterManager extends Manager {
-
- final int MAX_ENTRIES = 150;
-
- /**
- *
- * LRUMap.
- * Simple LRU cache using a LinkedHashMap
- */
- class LRUMap extends LinkedHashMap {
- private static final long serialVersionUID = 1L;
- LRUMap() {
- super(MAX_ENTRIES+1, .75F, true);
- }
- /* (non-Javadoc)
- * @see java.util.LinkedHashMap#removeEldestEntry(java.util.Map.Entry)
- */
- @Override
- protected boolean removeEldestEntry(Map.Entry eldest) {
- boolean toRemove = size() > MAX_ENTRIES;
- if (toRemove) {
- ShadowRegister v = (ShadowRegister)eldest.getValue();
- try {
- Target target = (Target)v.getTarget();
- removeMIVar(target.getMISession(), v.getMIVar());
- } catch (Exception e) {
- // ignore all
- }
- v.setMIVar(null);
- }
- return toRemove;
- }
- }
-
- /**
- *
- * ShadowRegister.
- * To keep track of the register value we can a shadow variable. If the
- * the variable MIVar was destroy by the LRUCache we try to recreate it.
- */
- class ShadowRegister extends Register {
-
- public ShadowRegister(Register reg, StackFrame frame, String n, MIVar v) {
- super((Target)reg.getTarget(), (Thread)frame.getThread(), frame, n, null, 0, 0, v);
- try {
- fTypename = reg.getTypeName();
- } catch (CDIException e) {
- // ignore
- }
- try {
- fType = reg.getType();
- } catch (CDIException e) {
- // ignore
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#getMIVar()
- */
- @Override
- public MIVar getMIVar() throws CDIException {
- if (fMIVar == null) {
- fMIVar = createMiVar((StackFrame)getStackFrame(), getName());
- }
- return fMIVar;
- }
-
- public void setMIVar(MIVar newMIVar) {
- fMIVar = newMIVar;
- }
- }
-
- Map regsMap;
- Map varsMap;
- MIVarChange[] noChanges = new MIVarChange[0];
- HashMap fTypeCache;
-
- public RegisterManager(Session session) {
- super(session, true);
- regsMap = new Hashtable();
- varsMap = new Hashtable();
- // The register bookkeeping provides better update control.
- setAutoUpdate( true );
- fTypeCache = new HashMap();
- }
-
- public ICDIType getFromTypeCache(String typeName) {
- return (ICDIType)fTypeCache.get(typeName);
- }
- public void addToTypeCache(String typeName, ICDIType type) {
- fTypeCache.put(typeName, type);
- }
-
-
- synchronized List getRegistersList(Target target) {
- List regsList = (List)regsMap.get(target);
- if (regsList == null) {
- regsList = Collections.synchronizedList(new ArrayList());
- regsMap.put(target, regsList);
- }
- return regsList;
- }
-
- synchronized Map getVariableMap(Target target) {
- Map varMap = (Map)varsMap.get(target);
- if (varMap == null) {
- varMap = Collections.synchronizedMap(new LRUMap());
- varsMap.put(target, varMap);
- }
- return varMap;
- }
-
- public ICDIRegisterGroup[] getRegisterGroups(Target target) throws CDIException {
- RegisterGroup group = new RegisterGroup(target, "Main"); //$NON-NLS-1$
- return new ICDIRegisterGroup[] { group };
- }
-
- public ICDIRegisterDescriptor[] getRegisterDescriptors(RegisterGroup group) throws CDIException {
- Target target = (Target)group.getTarget();
- return getRegisterDescriptors(target);
- }
- public ICDIRegisterDescriptor[] getRegisterDescriptors(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIDataListRegisterNames registers = factory.createMIDataListRegisterNames();
- try {
- mi.postCommand(registers);
- MIDataListRegisterNamesInfo info =
- registers.getMIDataListRegisterNamesInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- String[] names = info.getRegisterNames();
- List regsList = new ArrayList(names.length);
- for (int i = 0; i < names.length; i++) {
- if (names[i].length() > 0) {
- regsList.add(new RegisterDescriptor(target, null, null, names[i], null, i, 0));
- }
- }
- return (ICDIRegisterDescriptor[])regsList.toArray(new ICDIRegisterDescriptor[0]);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- }
- }
-
- public Register createRegister(RegisterDescriptor regDesc) throws CDIException {
- Register reg = findRegister(regDesc);
- if (reg == null) {
- try {
- String name = regDesc.getQualifiedName();
- Target target = (Target)regDesc.getTarget();
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(name);
- mi.postCommand(var, -1);
-// mi.postCommand(var);
-// MIVarCreateInfo info = var.getMIVarCreateInfo();
-// if (info == null) {
-// throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
-// }
-// reg = new Register(regDesc, info.getMIVar());
- reg = new Register(regDesc, var);
- List regList = getRegistersList(target);
- regList.add(reg);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return reg;
- }
-
- public void destroyRegister(Register reg) {
- Target target = (Target)reg.getTarget();
- List regList = (List)regsMap.get(target);
- if (regList != null) {
- if (regList.remove(reg)) {
- MISession miSession = target.getMISession();
- try {
- removeMIVar(miSession, reg.getMIVar());
- } catch (CDIException e) {
- //
- }
- }
- }
- }
-
- /**
- * Tell gdb to remove the underlying var-object also.
- */
- void removeMIVar(MISession miSession, MIVar miVar) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIVarDelete var = factory.createMIVarDelete(miVar.getVarName());
- try {
- miSession.postCommand(var);
- var.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public MIVar createMiVar(StackFrame frame, String regName) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(regName);
- mi.postCommand(var);
- MIVarCreateInfo info = var.getMIVarCreateInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info.getMIVar();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
-
- public MIVarChange[] updateMiVar(StackFrame frame, String varName) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
-
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarUpdate var = factory.createMIVarUpdate(varName);
- mi.postCommand(var);
- MIVarUpdateInfo info = var.getMIVarUpdateInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info.getMIVarChanges();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
-
- public Variable createShadowRegister(Register register, StackFrame frame, String regName) throws CDIException {
- Target target = (Target)frame.getTarget();
- Map varMap = getVariableMap(target);
- ShadowRegister variable = null;
-
- if(varMap.containsKey(regName)) {
- variable = (ShadowRegister)varMap.get(regName);
- updateMiVar(frame,variable.getMIVar().getVarName());
- }
- else {
- MIVar miVar = createMiVar(frame, regName);
- variable = new ShadowRegister(register, frame, regName, miVar);
- /* varMap seems to be unused, so I changed it...
- * now it helds the register name, instead of the variable name;
- * it now can be used to retrieve existing variables, thus avoiding
- * variable prolification and also reducing the number of mi commands
- * to be sent to the target.
- */
- varMap.put(regName, variable);
- }
-
- return variable;
- }
-
- /**
- * Use by the eventManager to find the Register;
- */
- public Register getRegister(MISession miSession, String varName) {
- Target target = ((Session)getSession()).getTarget(miSession);
- Register[] regs = getRegisters(target);
- for (int i = 0; i < regs.length; i++) {
- try {
- if (regs[i].getMIVar().getVarName().equals(varName)) {
- return regs[i];
- }
- try {
- Register r = (Register)regs[i].getChild(varName);
- if (r != null) {
- return r;
- }
- } catch (ClassCastException e) {
- // ignore ???
- }
- } catch (CDIException e1) {
- // ignore;
- }
- }
- return null;
- }
-
- /**
- * Use by the eventManager to find the Register;
- */
- public Register getRegister(MISession miSession, int regno) {
- Target target = ((Session)getSession()).getTarget(miSession);
- return getRegister(target, regno);
- }
- public Register getRegister(Target target, int regno) {
- Register[] regs = getRegisters(target);
- for (int i = 0; i < regs.length; i++) {
- if (regs[i].getPosition() == regno) {
- return regs[i];
- }
- }
- return null;
- }
-
- @Override
- public void update(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIDataListChangedRegisters changed = factory.createMIDataListChangedRegisters();
- try {
- mi.postCommand(changed);
- MIDataListChangedRegistersInfo info =
- changed.getMIDataListChangedRegistersInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- int[] regnos = info.getRegisterNumbers();
- List eventList = new ArrayList(regnos.length);
- // Now that we know the registers changed
- // call -var-update to update the value in gdb.
- // And send the notification.
- for (int i = 0 ; i < regnos.length; i++) {
- Register reg = getRegister(target, regnos[i]);
- if (reg != null) {
- String varName = reg.getMIVar().getVarName();
- MIVarChange[] changes = noChanges;
- MIVarUpdate update = factory.createMIVarUpdate(varName);
- try {
- mi.postCommand(update);
- MIVarUpdateInfo updateInfo = update.getMIVarUpdateInfo();
- if (updateInfo == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- changes = updateInfo.getMIVarChanges();
- } catch (MIException e) {
- //throw new MI2CDIException(e);
- //eventList.add(new MIVarDeletedEvent(varName));
- }
- if (changes.length != 0) {
- for (int j = 0 ; j < changes.length; j++) {
- String n = changes[j].getVarName();
- if (changes[j].isInScope()) {
- eventList.add(new MIVarChangedEvent(mi, n));
- }
- }
- } else {
- // Fall back to the register number.
- eventList.add(new MIRegisterChangedEvent(mi, update.getToken(), reg.getName(), regnos[i]));
- }
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- mi.fireEvents(events);
- } catch (MIException e) {
- if (!target.isTerminated())
- throw new MI2CDIException(e);
- }
- }
-
- private Register[] getRegisters(Target target) {
- List regsList = (List)regsMap.get(target);
- if (regsList != null) {
- return (Register[]) regsList.toArray(new Register[regsList.size()]);
- }
- return new Register[0];
- }
-
-// private Variable[] getVariables(Target target) {
-// List varList = (List)varsMap.get(target);
-// if (varList != null) {
-// return (Variable[]) varList.toArray(new Variable[varList.size()]);
-// }
-// return new Register[0];
-// }
-
- /**
- * Return the Element with this thread/stackframe, and with this name.
- * null is return if the element is not in the cache.
- */
- private Register findRegister(RegisterDescriptor rd) throws CDIException {
- Target target = (Target)rd.getTarget();
- String name = rd.getName();
- String fullName = rd.getFullName();
- int position = rd.getPosition();
- Register[] regs = getRegisters(target);
- for (int i = 0; i < regs.length; i++) {
- if (regs[i].getName().equals(name)
- && regs[i].getFullName().equals(fullName)
- && regs[i].getCastingArrayStart() == rd.getCastingArrayStart()
- && regs[i].getCastingArrayEnd() == rd.getCastingArrayEnd()
- && VariableDescriptor.equalsCasting(regs[i], rd)) {
- // check threads
- if (regs[i].getPosition() == position) {
- return regs[i];
- }
- }
- }
- return null;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
deleted file mode 100644
index c6888c2a8d6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.Properties;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionConfiguration;
-import org.eclipse.cdt.debug.core.cdi.ICDIEventManager;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.event.DestroyedEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession
- */
-public class Session implements ICDISession, ICDISessionObject {
-
- public final static Target[] EMPTY_TARGETS = {};
- Properties props;
- ProcessManager processManager;
- EventManager eventManager;
- BreakpointManager breakpointManager;
- ExpressionManager expressionManager;
- VariableManager variableManager;
- RegisterManager registerManager;
- MemoryManager memoryManager;
- SharedLibraryManager sharedLibraryManager;
- SignalManager signalManager;
- SourceManager sourceManager;
- ICDISessionConfiguration configuration;
-
- public Session(MISession miSession, ICDISessionConfiguration configuration) {
- commonSetup();
- Target target = new Target(this, miSession);
- addTargets(new Target[] { target });
- setConfiguration(configuration);
- }
-
- // Why do we need this?
- public Session(MISession miSession, boolean attach) {
- this(miSession);
- }
-
- public Session(MISession miSession) {
- commonSetup();
- Target target = new Target(this, miSession);
- addTargets(new Target[] { target });
- setConfiguration(new SessionConfiguration(this));
- }
-
- private void commonSetup() {
- props = new Properties();
- processManager = new ProcessManager(this);
- breakpointManager = new BreakpointManager(this);
- eventManager = new EventManager(this);
- expressionManager = new ExpressionManager(this);
- variableManager = new VariableManager(this);
- registerManager = new RegisterManager(this);
- memoryManager = new MemoryManager(this);
- signalManager = new SignalManager(this);
- sourceManager = new SourceManager(this);
- sharedLibraryManager = new SharedLibraryManager(this);
- }
-
- public void addTargets(Target[] targets) {
- ProcessManager pMgr = getProcessManager();
- pMgr.addTargets(targets);
- }
-
- public void removeTargets(Target[] targets) {
- ProcessManager pMgr = getProcessManager();
- pMgr.removeTargets(targets);
- }
-
- public Target getTarget(MISession miSession) {
- ProcessManager pMgr = getProcessManager();
- return pMgr.getTarget(miSession);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#getAttribute(String)
- */
- @Override
- public String getAttribute(String key) {
- return props.getProperty(key);
- }
-
- public ProcessManager getProcessManager() {
- return processManager;
- }
-
- public BreakpointManager getBreakpointManager() {
- return breakpointManager;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#getEventManager()
- */
- @Override
- public ICDIEventManager getEventManager() {
- return eventManager;
- }
-
- public ExpressionManager getExpressionManager() {
- return expressionManager;
- }
-
- public VariableManager getVariableManager() {
- return variableManager;
- }
-
- public RegisterManager getRegisterManager() {
- return registerManager;
- }
-
- public SharedLibraryManager getSharedLibraryManager() {
- return sharedLibraryManager;
- }
-
- public MemoryManager getMemoryManager() {
- return memoryManager;
- }
-
- public SignalManager getSignalManager() {
- return signalManager;
- }
-
- public SourceManager getSourceManager() {
- return sourceManager;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#getTargets()
- */
- @Override
- public ICDITarget[] getTargets() {
- ProcessManager pMgr = getProcessManager();
- return pMgr.getCDITargets();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#setAttribute(String, String)
- */
- @Override
- public void setAttribute(String key, String value) {
- props.setProperty(key, value);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#getConfiguration()
- */
- @Override
- public ICDISessionConfiguration getConfiguration() {
- return configuration;
- }
-
- public void setConfiguration(ICDISessionConfiguration conf) {
- configuration = conf;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISessionObject#getSession()
- */
- @Override
- public ICDISession getSession() {
- return this;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#terminate(ICDITarget)
- */
- @Override
- public void terminate() throws CDIException {
- ProcessManager pMgr = getProcessManager();
- Target[] targets = pMgr.getTargets();
- for (int i = 0; i < targets.length; ++i) {
- if (!targets[i].getMISession().isTerminated()) {
- targets[i].getMISession().terminate();
- }
- }
- // Do not do the removeTargets(), Target.getMISession().terminate() will do it
- // via an event, MIGDBExitEvent of the mi session
- //removeTargets(targets);
-
- // wait ~2 seconds for the targets to be terminated.
- for (int i = 0; i < 2; ++i) {
- targets = pMgr.getTargets();
- if (targets.length == 0) {
- break;
- }
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- //
- }
- }
- // send our goodbyes.
- EventManager eMgr = (EventManager)getEventManager();
- eMgr.fireEvents(new ICDIEvent[] { new DestroyedEvent(this) });
- eMgr.removeEventListeners();
- }
-
- /**
- * @deprecated
- * @see org.eclipse.cdt.debug.core.cdi.ICDISession#getSessionProcess()
- */
- @Deprecated
- @Override
- public Process getSessionProcess() throws CDIException {
- ICDITarget[] targets = getTargets();
- if (targets != null && targets.length > 0) {
- return getSessionProcess(targets[0]);
- }
- return null;
- }
-
- public Process getSessionProcess(ICDITarget target) {
- MISession miSession = ((Target)target).getMISession();
- return miSession.getSessionProcess();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionConfiguration.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionConfiguration.java
deleted file mode 100644
index 6a071ac1da1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionConfiguration.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDISessionConfiguration;
-
-/**
- * @author User
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class SessionConfiguration extends SessionObject implements
- ICDISessionConfiguration {
-
- /**
- * @param session
- */
- public SessionConfiguration(Session session) {
- super(session);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.ICDISessionConfiguration#terminateSessionOnExit()
- */
- @Override
- public boolean terminateSessionOnExit() {
- return true;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionObject.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionObject.java
deleted file mode 100644
index 08435085090..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionObject.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-
-/**
- */
-public class SessionObject implements ICDISessionObject {
-
- private Session fSession;
-
- public SessionObject (Session session) {
- fSession = session;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISessionObject#getSession()
- */
- @Override
- public ICDISession getSession() {
- return fSession;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryEvent.java
deleted file mode 100644
index 97d8ebe4c7a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryEvent.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDISharedLibraryEvent;
-
-public class SharedLibraryEvent extends SessionObject implements ICDISharedLibraryEvent {
-
- public SharedLibraryEvent(Session session) {
- super(session);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
deleted file mode 100644
index c34c06b86b2..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.mi.core.IMIConstants;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.RxThread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Breakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.EventBreakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.LocationBreakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.SharedLibrary;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Watchpoint;
-import org.eclipse.cdt.debug.mi.core.command.CLIInfoSharedLibrary;
-import org.eclipse.cdt.debug.mi.core.command.CLISharedLibrary;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetAutoSolib;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetSolibSearchPath;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetStopOnSolibEvents;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBShow;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
-import org.eclipse.cdt.debug.mi.core.command.MIInfoSharedLibrary;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibUnloadedEvent;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoSharedLibraryInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
-import org.eclipse.cdt.debug.mi.core.output.MIGDBShowInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIGDBShowSolibSearchPathInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIInfoSharedLibraryInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIShared;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Manager of the CDI shared libraries.
- */
-public class SharedLibraryManager extends Manager {
-
- ICDISharedLibrary[] EMPTY_SHAREDLIB = {};
- Map sharedMap;
- Set autoLoadSet;
- boolean isDeferred = true;
-
- public SharedLibraryManager (Session session) {
- super(session, true);
- sharedMap = new Hashtable();
- autoLoadSet = new HashSet();
- setAutoUpdate( MIPlugin.getDefault().getPluginPreferences().getBoolean( IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
- }
-
- synchronized List getSharedList(Target target) {
- List sharedList = (List)sharedMap.get(target);
- if (sharedList == null) {
- sharedList = Collections.synchronizedList(new ArrayList());
- sharedMap.put(target, sharedList);
- }
- return sharedList;
- }
-
- MIShared[] getMIShareds(MISession miSession) throws CDIException {
- MIShared[] miLibs = new MIShared[0];
- CommandFactory factory = miSession.getCommandFactory();
- MIInfoSharedLibrary infoSharedMI = factory.createMIInfoSharedLibrary();
-
- if (infoSharedMI != null)
- {
- try {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- miSession.postCommand(infoSharedMI);
- MIInfoSharedLibraryInfo info = infoSharedMI.getMIInfoSharedLibraryInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- miLibs = info.getMIShared();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- else
- {
-
- CLIInfoSharedLibrary infoShared = factory.createCLIInfoSharedLibrary();
- try {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- miSession.postCommand(infoShared);
- CLIInfoSharedLibraryInfo info = infoShared.getMIInfoSharedLibraryInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- miLibs = info.getMIShared();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(true);
- }
-
- }
- return miLibs;
- }
-
- @Override
- public void update(Target target) throws CDIException {
- MISession miSession = target.getMISession();
- Session session = (Session)target.getSession();
- List eventList = updateState(target);
- // A new Libraries loaded or something change, try to set the breakpoints.
- if (eventList.size() > 0) {
- BreakpointManager bpMgr = session.getBreakpointManager();
- ICDIBreakpoint bpoints[] = null;
- try {
- bpoints = bpMgr.getDeferredBreakpoints(target);
- } catch (CDIException e) {
- bpoints = new ICDIBreakpoint[0];
- }
- for (int i = 0; i < bpoints.length; i++) {
- if (bpoints[i] instanceof Breakpoint) {
- Breakpoint bkpt = (Breakpoint)bpoints[i];
- try {
- boolean enable = bkpt.isEnabled();
- if (bkpt instanceof LocationBreakpoint) {
- bpMgr.setLocationBreakpoint((LocationBreakpoint)bkpt);
- } else if (bkpt instanceof Watchpoint) {
- bpMgr.setWatchpoint((Watchpoint)bkpt);
- } else if (bkpt instanceof EventBreakpoint) {
- bpMgr.setEventBreakpoint((EventBreakpoint)bkpt);
- } else {
- throw new CDIException();
- }
- bpMgr.deleteFromDeferredList(bkpt);
- bpMgr.addToBreakpointList(bkpt);
- // If the breakpoint was disable in the IDE
- // install it but keep it disable
- if (!enable) {
- bpMgr.disableBreakpoint(bkpt);
- }
- MIBreakpoint[] miBreakpoints = bkpt.getMIBreakpoints();
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- eventList.add(new MIBreakpointCreatedEvent(miSession, miBreakpoints[0].getNumber()));
- }
- } catch (CDIException e) {
- // ignore
- }
- }
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- miSession.fireEvents(events);
- }
-
- private List updateState(Target target) throws CDIException {
- MISession miSession = target.getMISession();
- ICDITargetConfiguration conf = target.getConfiguration();
- if (!conf.supportsSharedLibrary()) {
- return Collections.EMPTY_LIST; // Bail out early;
- }
-
- MIShared[] miLibs = getMIShareds(miSession);
- ArrayList newLibList = new ArrayList();
- ArrayList eventList = new ArrayList(miLibs.length);
- for (int i = 0; i < miLibs.length; i++) {
- SharedLibrary sharedlib = getSharedLibrary(target, miLibs[i].getName());
- if (sharedlib != null) {
- if (hasSharedLibChanged(sharedlib, miLibs[i])) {
- // Fire ChangedEvent
- sharedlib.setMIShared(miLibs[i]);
- eventList.add(new MISharedLibChangedEvent(miSession, miLibs[i].getName()));
- }
- } else {
- // add the new breakpoint and fire CreatedEvent
- List sharedList = getSharedList(target);
- SharedLibrary lib = new SharedLibrary(target, miLibs[i]);
- sharedList.add(lib);
- newLibList.add(lib);
- eventList.add(new MISharedLibCreatedEvent(miSession, miLibs[i].getName()));
- }
- }
- // Check if any libraries was unloaded.
- List sharedList = (List)sharedMap.get(target);
- if (sharedList != null) {
- SharedLibrary[] oldlibs = (SharedLibrary[]) sharedList.toArray(new SharedLibrary[sharedList.size()]);
- for (int i = 0; i < oldlibs.length; i++) {
- boolean found = false;
- for (int j = 0; j < miLibs.length; j++) {
- if (miLibs[j].getName().equals(oldlibs[i].getFileName())) {
- found = true;
- break;
- }
- }
- if (!found) {
- // Fire destroyed Events.
- eventList.add(new MISharedLibUnloadedEvent(miSession, oldlibs[i].getFileName()));
- }
- }
- }
- eventList.addAll(autoLoadSymbols(target, (SharedLibrary[])newLibList.toArray(new SharedLibrary[newLibList.size()])));
- return eventList;
- }
-
- public boolean hasSharedLibChanged(SharedLibrary lib, MIShared miLib) {
- return !miLib.getName().equals(lib.getFileName()) ||
- !MIFormat.getBigInteger(miLib.getFrom()).equals(lib.getStartAddress()) ||
- !MIFormat.getBigInteger(miLib.getTo()).equals(lib.getEndAddress()) ||
- miLib.isRead() != lib.areSymbolsLoaded();
- }
-
- /*
- * this for the events
- */
- public void deleteSharedLibrary(MISession miSession, SharedLibrary lib) {
- Target target = ((Session)getSession()).getTarget(miSession);
- List sharedList = (List)sharedMap.get(target);
- if (sharedList != null) {
- sharedList.remove(lib);
- }
- }
-
- public SharedLibrary getSharedLibrary(MISession miSession, String name) {
- Target target = ((Session)getSession()).getTarget(miSession);
- return getSharedLibrary(target, name);
- }
- public SharedLibrary getSharedLibrary(Target target, String name) {
- List sharedList = (List)sharedMap.get(target);
- if (sharedList != null) {
- SharedLibrary[] libs = (SharedLibrary[]) sharedList.toArray(new SharedLibrary[sharedList.size()]);
- for (int i = 0; i < libs.length; i++) {
- if (name.equals(libs[i].getFileName())) {
- return libs[i];
- }
- }
- }
- return null;
- }
-
- public void setDeferredBreakpoint(Target target, boolean set) {
- target.deferBreakpoints( set );
- }
-
- public boolean isDeferredBreakpoint(Target target) {
- return target.areBreakpointsDeferred();
- }
-
- public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBSetAutoSolib solib = factory.createMIGDBSetAutoSolib(set);
- try {
- mi.postCommand(solib);
- solib.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public boolean isAutoLoadSymbols(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBShow show = factory.createMIGDBShow(new String[]{"auto-solib-add"}); //$NON-NLS-1$
- try {
- mi.postCommand(show);
- MIGDBShowInfo info = show.getMIGDBShowInfo();
- String value = info.getValue();
- if (value != null) {
- return value.equalsIgnoreCase("on"); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- return false;
- }
-
- public void setStopOnSolibEvents(Target target, boolean set) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBSetStopOnSolibEvents stop = factory.createMIGDBSetStopOnSolibEvents(set);
- try {
- mi.postCommand(stop);
- stop.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public boolean isStopOnSolibEvents(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBShow show = factory.createMIGDBShow(new String[]{"stop-on-solib-events"}); //$NON-NLS-1$
- try {
- mi.postCommand(show);
- MIGDBShowInfo info = show.getMIGDBShowInfo();
- String value = info.getValue();
- if (value != null) {
- return value.equalsIgnoreCase("1"); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- return false;
- }
-
- public void setSharedLibraryPaths(Target target, String[] libPaths) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBSetSolibSearchPath solib = factory.createMIGDBSetSolibSearchPath(libPaths);
- try {
- mi.postCommand(solib);
- solib.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public String[] getSharedLibraryPaths(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBShowSolibSearchPath dir = factory.createMIGDBShowSolibSearchPath();
- try {
- mi.postCommand(dir);
- MIGDBShowSolibSearchPathInfo info = dir.getMIGDBShowSolibSearchPathInfo();
- return info.getDirectories();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDISharedLibrary[] getSharedLibraries(Target target) throws CDIException {
- List sharedList = (List)sharedMap.get(target);
- if (sharedList != null) {
- return (ICDISharedLibrary[]) sharedList.toArray(new ICDISharedLibrary[sharedList.size()]);
- }
- return EMPTY_SHAREDLIB;
- }
-
- public void loadSymbols(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- CLISharedLibrary sharedlibrary = factory.createCLISharedLibrary();
- try {
- mi.postCommand(sharedlibrary);
- MIInfo info = sharedlibrary.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- update(target);
- }
-
- public void loadSymbols(Target target, ICDISharedLibrary[] libs) throws CDIException {
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- for (int i = 0; i < libs.length; i++) {
- if (libs[i].areSymbolsLoaded()) {
- continue;
- }
- CLISharedLibrary sharedlibrary = factory.createCLISharedLibrary(libs[i].getFileName());
- try {
- miSession.postCommand(sharedlibrary);
- MIInfo info = sharedlibrary.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- // Do not do this, error are not propagate by the CLI "shared command
- // So we have to manually recheck all the shared with "info shared"
- //((SharedLibrary)libs[i]).getMIShared().setSymbolsRead(true);
- //mi.fireEvent(new MISharedLibChangedEvent(libs[i].getFileName()));
- update(target);
- }
- }
-
- public boolean supportsAutoLoadSymbols() {
- return true;
- }
-
- public boolean supportsStopOnSolibEvents() {
- return true;
- }
-
- public void autoLoadSymbols( File[] libs ) {
- autoLoadSet.addAll( Arrays.asList( libs ) );
- }
-
- private List autoLoadSymbols(Target target, SharedLibrary[] libs) throws CDIException {
- ArrayList eventList = new ArrayList(libs.length);
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- for (int i = 0; i < libs.length; i++) {
- IPath path = new Path( libs[i].getFileName() );
- File file = new File( path.lastSegment() );
- if (libs[i].areSymbolsLoaded() || !autoLoadSet.contains(file)) {
- continue;
- }
- CLISharedLibrary sharedlibrary = factory.createCLISharedLibrary(libs[i].getFileName());
- try {
- miSession.postCommand(sharedlibrary);
- MIInfo info = sharedlibrary.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- libs[i].getMIShared().setSymbolsRead( true );
- eventList.add(new MISharedLibChangedEvent(miSession, libs[i].getFileName()));
- }
- return eventList;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java
deleted file mode 100644
index 89a6512b169..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDISignalExitInfo;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorSignalExitEvent;
-
-/**.
- */
-public class SignalExitInfo extends SessionObject implements ICDISignalExitInfo {
-
- MIInferiorSignalExitEvent event;
-
- public SignalExitInfo(Session session, MIInferiorSignalExitEvent e) {
- super(session);
- event = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignalExitInfo#getName()
- */
- @Override
- public String getName() {
- return event.getName();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignalExitInfo#getDescription()
- */
- @Override
- public String getDescription() {
- return event.getMeaning();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
deleted file mode 100644
index 12a8273ccf1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.RxThread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Signal;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.CLIHandle;
-import org.eclipse.cdt.debug.mi.core.command.CLIInfoSignals;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISignalChangedEvent;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoSignalsInfo;
-import org.eclipse.cdt.debug.mi.core.output.MISigHandle;
-
-/**
- */
-public class SignalManager extends Manager {
-
- ICDISignal[] EMPTY_SIGNALS = {};
- MISigHandle[] noSigs = new MISigHandle[0];
- Map signalsMap;
-
- public SignalManager(Session session) {
- super(session, false);
- signalsMap = new Hashtable();
- }
-
- synchronized List getSignalsList(Target target) {
- List signalsList = (List)signalsMap.get(target);
- if (signalsList == null) {
- signalsList = Collections.synchronizedList(new ArrayList());
- signalsMap.put(target, signalsList);
- }
- return signalsList;
- }
-
- MISigHandle[] getMISignals(MISession miSession) throws CDIException {
- MISigHandle[] miSigs;
- CommandFactory factory = miSession.getCommandFactory();
- CLIInfoSignals sigs = factory.createCLIInfoSignals();
- try {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- miSession.postCommand(sigs);
- CLIInfoSignalsInfo info = sigs.getMIInfoSignalsInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- miSigs = info.getMISignals();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(true);
- }
- return miSigs;
- }
-
- MISigHandle getMISignal(MISession miSession, String name) throws CDIException {
- MISigHandle sig = null;
- CommandFactory factory = miSession.getCommandFactory();
- CLIInfoSignals sigs = factory.createCLIInfoSignals(name);
- try {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- miSession.postCommand(sigs);
- CLIInfoSignalsInfo info = sigs.getMIInfoSignalsInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MISigHandle[] miSigs = info.getMISignals();
- if (miSigs.length > 0) {
- sig = miSigs[0];
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(true);
- }
- return sig;
- }
-
- /**
- * Method hasSignalChanged.
- * @param sig
- * @param mISignal
- * @return boolean
- */
- private boolean hasSignalChanged(ICDISignal sig, MISigHandle miSignal) {
- return !sig.getName().equals(miSignal.getName()) ||
- sig.isStopSet() != miSignal.isStop() ||
- sig.isIgnore() != !miSignal.isPass();
- }
-
- protected ICDISignal findSignal(Target target, String name) {
- ICDISignal sig = null;
- List signalsList = (List) signalsMap.get(target);
- if (signalsList != null) {
- ICDISignal[] sigs = (ICDISignal[])signalsList.toArray(new ICDISignal[0]);
- for (int i = 0; i < sigs.length; i++) {
- if (sigs[i].getName().equals(name)) {
- sig = sigs[i];
- break;
- }
- }
- }
- return sig;
- }
-
- public ICDISignal getSignal(MISession miSession, String name) {
- Session session = (Session)getSession();
- Target target = session.getTarget(miSession);
- return getSignal(target, name);
- }
- public ICDISignal getSignal(Target target, String name) {
- ICDISignal sig = findSignal(target, name);
- if (sig == null) {
- MISigHandle miSig = null;
- try {
- miSig = getMISignal(target.getMISession(), name);
- sig = new Signal(target, miSig);
- List signalsList = getSignalsList(target);
- signalsList.add(sig);
- } catch (CDIException e) {
- // The session maybe terminated because of the signal.
- miSig = new MISigHandle(name, false, false, false, name);
- sig = new Signal(target, miSig);
- }
- }
- return sig;
- }
-
- public void handle(Signal sig, boolean isIgnore, boolean isStop) throws CDIException {
- Target target = (Target)sig.getTarget();
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- StringBuffer buffer = new StringBuffer(sig.getName());
- buffer.append(" "); //$NON-NLS-1$
- if (isIgnore) {
- buffer.append("ignore"); //$NON-NLS-1$
- } else {
- buffer.append("noignore"); //$NON-NLS-1$
- }
- buffer.append(" "); //$NON-NLS-1$
- if (isStop) {
- buffer.append("stop"); //$NON-NLS-1$
- } else {
- buffer.append("nostop"); //$NON-NLS-1$
- }
- CLIHandle handle = factory.createCLIHandle(buffer.toString());
- try {
- miSession.postCommand(handle);
- handle.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- sig.getMISignal().handle(isIgnore, isStop);
- miSession.fireEvent(new MISignalChangedEvent(miSession, sig.getName()));
- }
-
- public ICDISignal[] getSignals(Target target) throws CDIException {
- List signalsList = (List)signalsMap.get(target);
- if (signalsList == null) {
- update(target);
- }
- signalsList = (List)signalsMap.get(target);
- if (signalsList != null) {
- return (ICDISignal[])signalsList.toArray(new ICDISignal[0]);
- }
- return EMPTY_SIGNALS;
- }
-
- @Override
- public void update(Target target) throws CDIException {
- MISession miSession = target.getMISession();
- MISigHandle[] miSigs = getMISignals(miSession);
- List eventList = new ArrayList(miSigs.length);
- List signalsList = getSignalsList(target);
- for (int i = 0; i < miSigs.length; i++) {
- ICDISignal sig = findSignal(target, miSigs[i].getName());
- if (sig != null) {
- if (hasSignalChanged(sig, miSigs[i])) {
- // Fire ChangedEvent
- ((Signal)sig).setMISignal(miSigs[i]);
- eventList.add(new MISignalChangedEvent(miSession, miSigs[i].getName()));
- }
- } else {
- // add the new breakpoint and fire CreatedEvent
- signalsList.add(new Signal(target, miSigs[i]));
- //eventList.add(new MISignCreatedEvent(miSession, miSigs[i].getName()));
- }
- }
- MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
- miSession.fireEvents(events);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java
deleted file mode 100644
index ddefd728a2b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDISignalReceived;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.mi.core.event.MISignalEvent;
-
-/**
- */
-public class SignalReceived extends SessionObject implements ICDISignalReceived {
-
- ICDISignal signal;
- public SignalReceived(Session session, MISignalEvent event) {
- super(session);
- SignalManager mgr = session.getSignalManager();
- signal = mgr.getSignal(event.getMISession(), event.getName());
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignalReceived#getSignal()
- */
- @Override
- public ICDISignal getSignal() {
- return signal;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
deleted file mode 100644
index af376136422..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Alena Laskavaia (QNX) - Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.math.BigInteger;
-import java.util.StringTokenizer;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.mi.core.GDBTypeParser;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.RxThread;
-import org.eclipse.cdt.debug.mi.core.GDBTypeParser.GDBDerivedType;
-import org.eclipse.cdt.debug.mi.core.GDBTypeParser.GDBType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Instruction;
-import org.eclipse.cdt.debug.mi.core.cdi.model.MixedInstruction;
-import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ArrayType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.DerivedType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.DoubleType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.EnumType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.FloatType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.FunctionType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.IntType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.LongLongType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.LongType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.PointerType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ReferenceType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ShortType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.StructType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.Type;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.VoidType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.WCharType;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataDisassemble;
-import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentDirectory;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBShowDirectories;
-import org.eclipse.cdt.debug.mi.core.command.CLIPType;
-import org.eclipse.cdt.debug.mi.core.command.CLIWhatis;
-import org.eclipse.cdt.debug.mi.core.output.MIAsm;
-import org.eclipse.cdt.debug.mi.core.output.MIDataDisassembleInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIGDBShowDirectoriesInfo;
-import org.eclipse.cdt.debug.mi.core.output.CLIPTypeInfo;
-import org.eclipse.cdt.debug.mi.core.output.MISrcAsm;
-import org.eclipse.cdt.debug.mi.core.output.CLIWhatisInfo;
-
-
-/**
- */
-public class SourceManager extends Manager {
-
- GDBTypeParser gdbTypeParser;
-
- public SourceManager(Session session) {
- super(session, false);
- gdbTypeParser = new GDBTypeParser();
- }
-
- public void setSourcePaths(Target target, String[] dirs) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIEnvironmentDirectory dir = factory.createMIEnvironmentDirectory(true, dirs);
- try {
- mi.postCommand(dir);
- dir.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public String[] getSourcePaths(Target target) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBShowDirectories dir = factory.createMIGDBShowDirectories();
- try {
- mi.postCommand(dir);
- MIGDBShowDirectoriesInfo info = dir.getMIGDBShowDirectoriesInfo();
- return info.getDirectories();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIInstruction[] getInstructions(Target target, String filename, int linenum) throws CDIException {
- return getInstructions(target, filename, linenum, -1);
- }
-
- public ICDIInstruction[] getInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIDataDisassemble dis = factory.createMIDataDisassemble(filename, linenum, lines, false);
- try {
- mi.postCommand(dis);
- MIDataDisassembleInfo info = dis.getMIDataDisassembleInfo();
- MIAsm[] asm = info.getMIAsms();
- Instruction[] instructions = new Instruction[asm.length];
- for (int i = 0; i < instructions.length; i++) {
- instructions[i] = new Instruction(target, asm[i]);
- }
- return instructions;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIInstruction[] getInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- String hex = "0x"; //$NON-NLS-1$
- String sa = hex + start.toString(16);
- String ea = hex + end.toString(16);
- MIDataDisassemble dis = factory.createMIDataDisassemble(sa, ea, false);
- try {
- mi.postCommand(dis);
- MIDataDisassembleInfo info = dis.getMIDataDisassembleInfo();
- MIAsm[] asm = info.getMIAsms();
- Instruction[] instructions = new Instruction[asm.length];
- for (int i = 0; i < instructions.length; i++) {
- instructions[i] = new Instruction(target, asm[i]);
- }
- return instructions;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum) throws CDIException {
- return getMixedInstructions(target, filename, linenum, -1);
- }
-
- public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIDataDisassemble dis = factory.createMIDataDisassemble(filename, linenum, lines, true);
- try {
- mi.postCommand(dis);
- MIDataDisassembleInfo info = dis.getMIDataDisassembleInfo();
- MISrcAsm[] srcAsm = info.getMISrcAsms();
- ICDIMixedInstruction[] mixed = new ICDIMixedInstruction[srcAsm.length];
- for (int i = 0; i < mixed.length; i++) {
- mixed[i] = new MixedInstruction(target, srcAsm[i]);
- }
- return mixed;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public ICDIMixedInstruction[] getMixedInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- String hex = "0x"; //$NON-NLS-1$
- String sa = hex + start.toString(16);
- String ea = hex + end.toString(16);
- MIDataDisassemble dis = factory.createMIDataDisassemble(sa, ea, true);
- try {
- mi.postCommand(dis);
- MIDataDisassembleInfo info = dis.getMIDataDisassembleInfo();
- MISrcAsm[] srcAsm = info.getMISrcAsms();
- ICDIMixedInstruction[] mixed = new ICDIMixedInstruction[srcAsm.length];
- for (int i = 0; i < mixed.length; i++) {
- mixed[i] = new MixedInstruction(target, srcAsm[i]);
- }
- return mixed;
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- @Override
- public void update(Target target) throws CDIException {
- }
-
- public Type getType(Target target, String name) throws CDIException {
- if (name == null) {
- name = new String();
- }
- String typename = name.trim();
-
- // Parse the string.
- GDBType gdbType = gdbTypeParser.parse(typename);
- Type headType = null;
- Type type = null;
-
- // Convert the GDBType to an ICDIType.
- // So we go through the gdbType tree and reconstruct an ICDIType tree
- for (Type aType = null; gdbType != null; type = aType) {
- if (gdbType instanceof GDBDerivedType) {
- switch(gdbType.getType()) {
- case GDBType.ARRAY:
- int d = ((GDBDerivedType)gdbType).getDimension();
- aType = new ArrayType(target, gdbType.toString(), d);
- break;
- case GDBType.FUNCTION:
- aType = new FunctionType(target, gdbType.toString());
- break;
- case GDBType.POINTER:
- aType = new PointerType(target, gdbType.toString());
- break;
- case GDBType.REFERENCE:
- aType = new ReferenceType(target, gdbType.toString());
- break;
- }
- gdbType = ((GDBDerivedType)gdbType).getChild();
- } else {
- aType = toCDIType(target, gdbType.toString());
- gdbType = null;
- }
- if (type instanceof DerivedType) {
- ((DerivedType)type).setComponentType(aType);
- }
- // Save the head to returning it.
- if (headType == null) {
- headType = aType;
- }
- }
-
- if (headType != null) {
- return headType;
- }
- throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
- }
-
- Type toCDIType(Target target, String name) throws CDIException {
- // Check the derived types and agregate types
- if (name == null) {
- name = new String();
- }
- String typename = name.trim();
-
- // Check the primitives.
- if (typename.equals("char")) { //$NON-NLS-1$
- return new CharType(target, typename);
- } else if (typename.equals("wchar_t")) { //$NON-NLS-1$
- return new WCharType(target, typename);
- } else if (typename.equals("short")) { //$NON-NLS-1$
- return new ShortType(target, typename);
- } else if (typename.equals("int")) { //$NON-NLS-1$
- return new IntType(target, typename);
- } else if (typename.equals("long")) { //$NON-NLS-1$
- return new LongType(target, typename);
- } else if (typename.equals("unsigned")) { //$NON-NLS-1$
- return new IntType(target, typename, true);
- } else if (typename.equals("signed")) { //$NON-NLS-1$
- return new IntType(target, typename);
- } else if (typename.equals("bool")) { //$NON-NLS-1$
- return new BoolType(target, typename);
- } else if (typename.equals("_Bool")) { //$NON-NLS-1$
- return new BoolType(target, typename);
- } else if (typename.equals("float")) { //$NON-NLS-1$
- return new FloatType(target, typename);
- } else if (typename.equals("double")) { //$NON-NLS-1$
- return new DoubleType(target, typename);
- } else if (typename.equals("void")) { //$NON-NLS-1$
- return new VoidType(target, typename);
- } else if (typename.equals("enum")) { //$NON-NLS-1$
- return new EnumType(target, typename);
- } else if (typename.equals("union")) { //$NON-NLS-1$
- return new StructType(target, typename);
- } else if (typename.equals("struct")) { //$NON-NLS-1$
- return new StructType(target, typename);
- } else if (typename.equals("class")) { //$NON-NLS-1$
- return new StructType(target, typename);
- }
-
- // GDB has some special types for int
- if (typename.equals("int8_t")) { //$NON-NLS-1$
- return new CharType(target, typename);
- } else if (typename.equals("int16_t")) { //$NON-NLS-1$
- return new ShortType(target, typename);
- } else if (typename.equals("int32_t")) { //$NON-NLS-1$
- return new IntType(target, typename);
- } else if (typename.equals("int64_t")) { //$NON-NLS-1$
- return new LongLongType(target, typename);
- } else if (typename.equals("int128_t")) { //$NON-NLS-1$
- return new IntType(target, typename); // ????
- }
-
- if (typename.equals("int8_t")) { //$NON-NLS-1$
- return new CharType(target, typename);
- } else if (typename.equals("uint8_t")) { //$NON-NLS-1$
- return new CharType(target, typename, true);
- } else if (typename.equals("int16_t")) { //$NON-NLS-1$
- return new ShortType(target, typename);
- } else if (typename.equals("uint16_t")) { //$NON-NLS-1$
- return new ShortType(target, typename, true);
- } else if (typename.equals("int32_t")) { //$NON-NLS-1$
- return new LongType(target, typename);
- } else if (typename.equals("uint32_t")) { //$NON-NLS-1$
- return new LongType(target, typename, true);
- } else if (typename.equals("int64_t")) { //$NON-NLS-1$
- return new LongLongType(target, typename);
- } else if (typename.equals("uint64_t")) { //$NON-NLS-1$
- return new LongLongType(target, typename, true);
- } else if (typename.equals("int128_t")) { //$NON-NLS-1$
- return new IntType(target, typename); // ????
- } else if (typename.equals("uint128_t")) { //$NON-NLS-1$
- return new IntType(target, typename, true); // ????
- }
-
- StringTokenizer st = new StringTokenizer(typename);
- int count = st.countTokens();
-
- if (count == 2) {
- String first = st.nextToken();
- String second = st.nextToken();
-
- // ISOC allows permutations:
- // "signed int" and "int signed" are equivalent
- boolean isUnsigned = (first.equals("unsigned") || second.equals("unsigned")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isSigned = (first.equals("signed") || second.equals("signed")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isChar = (first.equals("char") || second.equals("char")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isInt = (first.equals("int") || second.equals("int")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isLong = (first.equals("long") || second.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isShort = (first.equals("short") || second.equals("short")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isLongLong = (first.equals("long") && second.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
-
- boolean isDouble = (first.equals("double") || second.equals("double")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isFloat = (first.equals("float") || second.equals("float")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isComplex = (first.equals("complex") || second.equals("complex") || //$NON-NLS-1$ //$NON-NLS-2$
- first.equals("_Complex") || second.equals("_Complex")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isImaginery = (first.equals("_Imaginary") || second.equals("_Imaginary")); //$NON-NLS-1$ //$NON-NLS-2$
-
- boolean isStruct = first.equals("struct"); //$NON-NLS-1$
- boolean isClass = first.equals("class"); //$NON-NLS-1$
- boolean isUnion = first.equals("union"); //$NON-NLS-1$
- boolean isEnum = first.equals("enum"); //$NON-NLS-1$
-
- if (isChar && (isSigned || isUnsigned)) {
- return new CharType(target, typename, isUnsigned);
- } else if (isShort && (isInt || isSigned || isUnsigned)) {
- return new ShortType(target, typename, isUnsigned);
- } else if (isInt && (isSigned || isUnsigned)) {
- return new IntType(target, typename, isUnsigned);
- } else if (isLong && (isInt || isSigned || isUnsigned)) {
- return new LongType(target, typename, isUnsigned);
- } else if (isLongLong) {
- return new LongLongType(target, typename);
- } else if (isDouble && (isLong || isComplex || isImaginery)) {
- return new DoubleType(target, typename, isComplex, isImaginery, isLong);
- } else if (isFloat && (isComplex || isImaginery)) {
- return new FloatType(target, typename, isComplex, isImaginery);
- } else if (isStruct) {
- return new StructType(target, typename);
- } else if (isClass) {
- return new StructType(target, typename);
- } else if (isUnion) {
- return new StructType(target, typename);
- } else if (isEnum) {
- return new EnumType(target, typename);
- }
- } else if (count == 3) {
- // ISOC allows permutation. replace short by: long or short
- // "unsigned short int", "unsigned int short"
- // "short unsigned int". "short int unsigned"
- // "int unsinged short". "int short unsigned"
- //
- // "unsigned long long", "long long unsigned"
- // "signed long long", "long long signed"
- String first = st.nextToken();
- String second = st.nextToken();
- String third = st.nextToken();
-
- boolean isSigned = (first.equals("signed") || second.equals("signed") || third.equals("signed")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean unSigned = (first.equals("unsigned") || second.equals("unsigned") || third.equals("unsigned")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isInt = (first.equals("int") || second.equals("int") || third.equals("int")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isLong = (first.equals("long") || second.equals("long") || third.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isShort = (first.equals("short") || second.equals("short") || third.equals("short")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isLongLong = (first.equals("long") && second.equals("long")) || //$NON-NLS-1$ //$NON-NLS-2$
- (second.equals("long") && third.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isDouble = (first.equals("double") || second.equals("double") || third.equals("double")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isComplex = (first.equals("complex") || second.equals("complex") || third.equals("complex") || //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- first.equals("_Complex") || second.equals("_Complex") || third.equals("_Complex")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean isImaginery = (first.equals("_Imaginary") || second.equals("_Imaginary") || third.equals("_Imaginary")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-
- if (isSigned == false && unSigned==false) {
- isSigned = true; // otherwise long long int would not work
- }
- if (isShort && isInt && (isSigned || unSigned)) {
- return new ShortType(target, typename, unSigned);
- } else if (isLongLong && (isSigned || unSigned)) {
- return new LongLongType(target, typename, unSigned);
- } else if (isLong && isInt && (isSigned || unSigned)) {
- return new LongType(target, typename, unSigned);
- } else if (isDouble && isLong && (isComplex || isImaginery)) {
- return new DoubleType(target, typename, isComplex, isImaginery, isLong);
- }
- } else if (count == 4) {
- // ISOC allows permutation:
- // "unsigned long long int", "unsigned int long long"
- // "long long unsigned int". "long long int unsigned"
- // "int unsigned long long". "int long long unsigned"
- String first = st.nextToken();
- String second = st.nextToken();
- String third = st.nextToken();
- String fourth = st.nextToken();
-
- boolean unSigned = (first.equals("unsigned") || second.equals("unsigned") || third.equals("unsigned") || fourth.equals("unsigned")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- boolean isSigned = (first.equals("signed") || second.equals("signed") || third.equals("signed") || fourth.equals("signed")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- boolean isInt = (first.equals("int") || second.equals("int") || third.equals("int") || fourth.equals("int")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- boolean isLongLong = (first.equals("long") && second.equals("long")) //$NON-NLS-1$ //$NON-NLS-2$
- || (second.equals("long") && third.equals("long")) //$NON-NLS-1$ //$NON-NLS-2$
- || (third.equals("long") && fourth.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (isLongLong && isInt && (isSigned || unSigned)) {
- return new LongLongType(target, typename, unSigned);
- }
- }
- throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
- }
-
- public String getDetailTypeNameFromVariable(StackFrame frame, String variable) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- return getDetailTypeName(target, variable);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
- public String getDetailTypeName(Target target, String typename) throws CDIException {
- try {
- MISession mi = target.getMISession();
- RxThread rxThread = mi.getRxThread();
- rxThread.setEnableConsole(false);
- CommandFactory factory = mi.getCommandFactory();
- CLIPType ptype = factory.createCLIPType(typename);
- mi.postCommand(ptype);
- CLIPTypeInfo info = ptype.getMIPtypeInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info.getType();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- MISession mi = target.getMISession();
- RxThread rxThread = mi.getRxThread();
- rxThread.setEnableConsole(true);
-
- }
- }
-
- public String getTypeNameFromVariable(StackFrame frame, String variable) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- return getTypeName(target, variable);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
-
- public String getTypeName(Target target, String variable) throws CDIException {
- MISession miSession = target.getMISession();
- try {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- CommandFactory factory = miSession.getCommandFactory();
- CLIWhatis whatis = factory.createCLIWhatis(variable);
- miSession.postCommand(whatis);
- CLIWhatisInfo info = whatis.getMIWhatisInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- return info.getType();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(true);
- }
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java
deleted file mode 100644
index 3483ccf8b5c..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.HashMap;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.CLIInfoThreads;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoThreadsInfo;
-
-
-/**
- */
-public class ThreadManager extends Manager { //implements ICDIThreadManager {
-
- static final Thread[] noThreads = new Thread[0];
- HashMap threadMap;
-
- class ThreadSet {
- ICDIThread[] currentThreads;
- int currentThreadId;
- ThreadSet(ICDIThread[] threads, int id) {
- currentThreads = threads;
- currentThreadId = id;
- }
- }
-
- public ThreadManager(Session session) {
- super(session, true);
- threadMap = new HashMap();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIThreadManager#getThreads()
- */
- public ICDIThread[] getThreads() throws CDIException {
- return new ICDIThread[] {};
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIThreadManager#getThreads()
- */
- public ICDIThread[] getThreads(Target process) throws CDIException {
- ThreadSet set = (ThreadSet)threadMap.get(process);
- if (set == null) {
- set = getCThreads(process);
- threadMap.put(process, set);
- }
- return set.currentThreads;
- }
-
- public ThreadSet getCThreads(Target process) throws CDIException {
- Thread[] cthreads = noThreads;
- int currentThreadId = 0;
- MISession mi = process.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- try {
- // HACK/FIXME: gdb/mi thread-list-ids does not
- // show any newly create thread, we workaround by
- // issuing "info threads" instead.
- //MIThreadListIds tids = factory.createMIThreadListIds();
- //MIThreadListIdsInfo info = tids.getMIThreadListIdsInfo();
-
- CLIInfoThreads tids = factory.createCLIInfoThreads();
- mi.postCommand(tids);
- CLIInfoThreadsInfo info = tids.getMIInfoThreadsInfo();
- int [] ids;
- if (info == null) {
- ids = new int[0];
- } else {
- ids = info.getThreadIds();
- }
- if (ids != null && ids.length > 0) {
- cthreads = new Thread[ids.length];
- // Ok that means it is a multiThreaded.
- for (int i = 0; i < ids.length; i++) {
- cthreads[i] = new Thread(process, ids[i]);
- }
- } else {
- // Provide a dummy.
- cthreads = new Thread[]{new Thread(process, 0)};
- }
- currentThreadId = info.getCurrentThread();
- //FIX: When attaching there is no thread selected
- // We will choose the first one as a workaround.
- if (currentThreadId == 0 && cthreads.length > 0) {
- currentThreadId = cthreads[0].getId();
- }
- } catch (MIException e) {
- throw new CDIException(e.getMessage());
- }
- return new ThreadSet(cthreads, currentThreadId);
- }
-
- @Override
- public void update(Target target) throws CDIException {
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
deleted file mode 100644
index 8b3e936c14d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
+++ /dev/null
@@ -1,756 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Alena Laskavaia (QNX) - Bug 197986, Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThreadStorageDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.RxThread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Argument;
-import org.eclipse.cdt.debug.mi.core.cdi.model.ArgumentDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.GlobalVariable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.GlobalVariableDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.LocalVariable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.LocalVariableDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
-import org.eclipse.cdt.debug.mi.core.cdi.model.RegisterDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.ThreadStorage;
-import org.eclipse.cdt.debug.mi.core.cdi.model.ThreadStorageDescriptor;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.VariableDescriptor;
-import org.eclipse.cdt.debug.mi.core.command.CLIPType;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIStackListArguments;
-import org.eclipse.cdt.debug.mi.core.command.MIStackListLocals;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.command.MIVarDelete;
-import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.output.CLIPTypeInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIArg;
-import org.eclipse.cdt.debug.mi.core.output.MIFrame;
-import org.eclipse.cdt.debug.mi.core.output.MIStackListArgumentsInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIStackListLocalsInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
-import org.eclipse.cdt.debug.mi.core.output.MIVarCreateInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarUpdateInfo;
-
-/**
- */
-public class VariableManager extends Manager {
-
- static final ICDIVariable[] EMPTY_VARIABLES = {};
- // We put a restriction on how deep we want to
- // go when doing update of the variables.
- // If the number is to high, gdb will just hang.
- int MAX_STACK_DEPTH = Thread.STACKFRAME_DEFAULT_DEPTH;
- Map variablesMap;
- MIVarChange[] noChanges = new MIVarChange[0];
-
- public VariableManager(Session session) {
- super(session, true);
- variablesMap = new Hashtable();
- }
-
- synchronized List getVariablesList(Target target) {
- List variablesList = (List) variablesMap.get(target);
- if (variablesList == null) {
- variablesList = Collections.synchronizedList(new ArrayList());
- variablesMap.put(target, variablesList);
- }
- return variablesList;
- }
-
- /**
- * Return the element that have the uniq varName.
- * null is return if the element is not in the cache.
- */
- public Variable getVariable(MISession miSession, String varName) {
- Target target = ((Session)getSession()).getTarget(miSession);
- return getVariable(target, varName);
- }
-
- /**
- * Return the element that have the uniq varName.
- * null is return if the element is not in the cache.
- */
- public Variable getVariable(Target target, String varName) {
- Variable[] vars = getVariables(target);
- for (int i = 0; i < vars.length; i++) {
- try {
- if (vars[i].getMIVar().getVarName().equals(varName)) {
- return vars[i];
- }
- Variable v = vars[i].getChild(varName);
- if (v != null) {
- return v;
- }
- } catch (CDIException e) {
- //
- }
- }
- return null;
- }
-
- /**
- * Return the Element with this thread/stackframe, and with this name.
- * null is return if the element is not in the cache.
- */
- Variable findVariable(VariableDescriptor v) throws CDIException {
- Target target = (Target)v.getTarget();
- ICDIStackFrame vstack = v.getStackFrame();
- ICDIThread vthread = v.getThread();
- int position = v.getPosition();
- int depth = v.getStackDepth();
- Variable[] vars = getVariables(target);
- for (int i = 0; i < vars.length; i++) {
- if (vars[i].getFullName().equals(v.getFullName())
- && vars[i].getName().equals(v.getName()) // see bug #113364
- && vars[i].getCastingArrayStart() == v.getCastingArrayStart()
- && vars[i].getCastingArrayEnd() == v.getCastingArrayEnd()
- && VariableDescriptor.equalsCasting(vars[i], v)) {
- // check threads
- ICDIThread thread = vars[i].getThread();
- if ((vthread == null && thread == null) ||
- (vthread != null && thread != null && thread.equals(vthread))) {
- // check stackframes
- ICDIStackFrame frame = vars[i].getStackFrame();
- if (vstack == null && frame == null) {
- return vars[i];
- } else if (frame != null && vstack != null && frame.equals(vstack)) {
- if (vars[i].getPosition() == position) {
- if (vars[i].getStackDepth() == depth) {
- return vars[i];
- }
- }
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Returns all the elements that are in the cache.
- */
- Variable[] getVariables(Target target) {
- List variableList = (List)variablesMap.get(target);
- if (variableList != null) {
- return (Variable[]) variableList.toArray(new Variable[variableList.size()]);
- }
- return new Variable[0];
- }
-
- /**
- * Check the type
- */
- public void checkType(StackFrame frame, String type) throws CDIException {
- if (type != null && type.length() > 0) {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- MISession miSession = target.getMISession();
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- CommandFactory factory = miSession.getCommandFactory();
- CLIPType ptype = factory.createCLIPType(type);
- miSession.postCommand(ptype);
- CLIPTypeInfo info = ptype.getMIPtypeInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- MISession miSession = target.getMISession();
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(true);
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- } else {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_type")); //$NON-NLS-1$
- }
- }
-
- /**
- * Tell gdb to remove the underlying var-object also.
- */
- void removeMIVar(MISession miSession, MIVar miVar) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIVarDelete var = factory.createMIVarDelete(miVar.getVarName());
- try {
- miSession.postCommand(var);
- var.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * Remove variable form the maintained cache list.
- * @param miSession
- * @param varName
- * @return
- */
- public Variable removeVariableFromList(MISession miSession, String varName) {
- Target target = ((Session)getSession()).getTarget(miSession);
- List varList = getVariablesList(target);
- synchronized (varList) {
- for (Iterator iterator = varList.iterator(); iterator.hasNext();) {
- Variable variable = (Variable)iterator.next();
- try {
- if (variable.getMIVar().getVarName().equals(varName)) {
- iterator.remove();
- return variable;
- }
- } catch (CDIException e) {
- //
- }
- }
- }
- return null;
- }
-
- /**
- * Encode the variableDescriptor as an array
- * @param varDesc
- * @param start
- * @param length
- * @return
- * @throws CDIException
- */
- public VariableDescriptor getVariableDescriptorAsArray(VariableDescriptor varDesc, int start, int length)
- throws CDIException {
- Target target = (Target)varDesc.getTarget();
- Thread thread = (Thread)varDesc.getThread();
- StackFrame frame = (StackFrame)varDesc.getStackFrame();
- String name = varDesc.getName();
- String fullName = varDesc.getFullName();
- int pos = varDesc.getPosition();
- int depth = varDesc.getStackDepth();
- VariableDescriptor vo = null;
-
- if (varDesc instanceof ArgumentDescriptor || varDesc instanceof Argument) {
- vo = new ArgumentDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof LocalVariableDescriptor || varDesc instanceof LocalVariable) {
- vo = new LocalVariableDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof GlobalVariableDescriptor || varDesc instanceof GlobalVariable) {
- vo = new GlobalVariableDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof RegisterDescriptor || varDesc instanceof Register) {
- vo = new RegisterDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof ThreadStorageDescriptor || varDesc instanceof ThreadStorage) {
- vo = new ThreadStorageDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_variable_object")); //$NON-NLS-1$
- }
-
- vo.setCastingArrayStart(varDesc.getCastingArrayStart() + start);
- vo.setCastingArrayEnd(length);
- return vo;
- }
-
- /**
- * Encode the variableDescriptor in a typecasting.
- * @param varDesc
- * @param type
- * @return
- * @throws CDIException
- */
- public VariableDescriptor getVariableDescriptorAsType(VariableDescriptor varDesc, String type) throws CDIException {
- // throw an exception if not a good type.
- Target target = (Target)varDesc.getTarget();
- Thread thread = (Thread)varDesc.getThread();
- StackFrame frame = (StackFrame)varDesc.getStackFrame();
- String name = varDesc.getName();
- String fullName = varDesc.getFullName();
- int pos = varDesc.getPosition();
- int depth = varDesc.getStackDepth();
-
- // Check the type validity.
- {
- StackFrame f = frame;
- if (f == null) {
- if (thread != null) {
- f = thread.getCurrentStackFrame();
- } else {
- Thread t = (Thread)target.getCurrentThread();
- f = t.getCurrentStackFrame();
- }
- }
- checkType(f, type);
- }
-
- VariableDescriptor vo = null;
-
- if (varDesc instanceof ArgumentDescriptor || varDesc instanceof Argument) {
- vo = new ArgumentDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof LocalVariableDescriptor || varDesc instanceof LocalVariable) {
- vo = new LocalVariableDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof GlobalVariableDescriptor || varDesc instanceof GlobalVariable) {
- vo = new GlobalVariableDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof ThreadStorageDescriptor || varDesc instanceof ThreadStorage) {
- vo = new ThreadStorageDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else if (varDesc instanceof RegisterDescriptor || varDesc instanceof Register) {
- vo = new RegisterDescriptor(target, thread, frame, name, fullName, pos, depth);
- } else {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_variable_object")); //$NON-NLS-1$
- }
-
- String[] castings = varDesc.getCastingTypes();
- if (castings == null) {
- castings = new String[] { type };
- } else {
- String[] temp = new String[castings.length + 1];
- System.arraycopy(castings, 0, temp, 0, castings.length);
- temp[castings.length] = type;
- castings = temp;
- }
- vo.setCastingTypes(castings);
- return vo;
- }
-
- public Variable createVariable(VariableDescriptor varDesc) throws CDIException {
- if (varDesc instanceof ArgumentDescriptor) {
- return createArgument((ArgumentDescriptor)varDesc);
- } else if (varDesc instanceof LocalVariableDescriptor) {
- return createLocalVariable((LocalVariableDescriptor)varDesc);
- } else if (varDesc instanceof GlobalVariableDescriptor) {
- return createGlobalVariable((GlobalVariableDescriptor)varDesc);
- } else if (varDesc instanceof RegisterDescriptor) {
- RegisterManager regMgr = ((Session)getSession()).getRegisterManager();
- return regMgr.createRegister((RegisterDescriptor)varDesc);
- } else if (varDesc instanceof ThreadStorageDescriptor) {
- return createThreadStorage((ThreadStorageDescriptor)varDesc);
- }
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_variable_object")); //$NON-NLS-1$
- }
-
- public Argument createArgument(ArgumentDescriptor argDesc) throws CDIException {
- Variable variable = findVariable(argDesc);
- Argument argument = null;
- if (variable != null && variable instanceof Argument) {
- argument = (Argument) variable;
- }
- if (argument == null) {
- String name = argDesc.getQualifiedName();
- StackFrame stack = (StackFrame)argDesc.getStackFrame();
- Target target = (Target)argDesc.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(stack.getThread(), false);
- ((Thread)stack.getThread()).setCurrentStackFrame(stack, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(name);
- mi.postCommand(var, -1);
- argument = new Argument(argDesc, var);
-// mi.postCommand(var);
-// MIVarCreateInfo info = var.getMIVarCreateInfo();
-// if (info == null) {
-// throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
-// }
-// argument = new Argument(argDesc, info.getMIVar());
- List variablesList = getVariablesList(target);
- variablesList.add(argument);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
- return argument;
- }
-
- public ICDIArgumentDescriptor[] getArgumentDescriptors(StackFrame frame) throws CDIException {
- List argObjects = new ArrayList();
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- int depth = frame.getThread().getStackFrameCount();
- int level = frame.getLevel();
- // Need the GDB/MI view of level which the reverse i.e. Highest frame is 0
- int miLevel = depth - level;
- MIStackListArguments listArgs = factory.createMIStackListArguments(false, miLevel, miLevel);
- MIArg[] args = null;
- mi.postCommand(listArgs);
- MIStackListArgumentsInfo info = listArgs.getMIStackListArgumentsInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MIFrame[] miFrames = info.getMIFrames();
- if (miFrames != null && miFrames.length == 1) {
- args = miFrames[0].getArgs();
- }
- if (args != null) {
- for (int i = 0; i < args.length; i++) {
- ArgumentDescriptor arg = new ArgumentDescriptor(target, null, frame, args[i].getName(), null, args.length - i, level);
- argObjects.add(arg);
- }
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- return (ICDIArgumentDescriptor[]) argObjects.toArray(new ICDIArgumentDescriptor[0]);
- }
-
- public GlobalVariableDescriptor getGlobalVariableDescriptor(Target target, String filename, String function, String name) throws CDIException {
- if (filename == null) {
- filename = new String();
- }
- if (function == null) {
- function = new String();
- }
- if (name == null) {
- name = new String();
- }
- StringBuffer buffer = new StringBuffer();
- if (filename.length() > 0) {
- buffer.append('\'').append(filename).append('\'').append("::"); //$NON-NLS-1$
- }
- if (function.length() > 0) {
- buffer.append(function).append("::"); //$NON-NLS-1$
- }
- buffer.append(name);
- return new GlobalVariableDescriptor(target, null, null, buffer.toString(), null, 0, 0);
- }
-
- public GlobalVariable createGlobalVariable(GlobalVariableDescriptor varDesc) throws CDIException {
- Variable variable = findVariable(varDesc);
- GlobalVariable global = null;
- if (variable instanceof GlobalVariable) {
- global = (GlobalVariable)variable;
- }
- if (global == null) {
- String name = varDesc.getQualifiedName();
- Target target = (Target)varDesc.getTarget();
- try {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(name);
- mi.postCommand(var, -1);
- global = new GlobalVariable(varDesc, var);
-// mi.postCommand(var;
-// MIVarCreateInfo info = var.getMIVarCreateInfo();
-// if (info == null) {
-// throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
-// }
-// global = new GlobalVariable(varDesc, info.getMIVar());
- List variablesList = getVariablesList(target);
- variablesList.add(global);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return global;
- }
-
- public ICDILocalVariableDescriptor[] getLocalVariableDescriptors(StackFrame frame) throws CDIException {
- List varObjects = new ArrayList();
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- int level = frame.getLevel();
- MIArg[] args = null;
- MIStackListLocals locals = factory.createMIStackListLocals(false);
- mi.postCommand(locals);
- MIStackListLocalsInfo info = locals.getMIStackListLocalsInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- args = info.getLocals();
- if (args != null) {
- for (int i = 0; i < args.length; i++) {
- LocalVariableDescriptor varObj = new LocalVariableDescriptor(target, null, frame, args[i].getName(), null, args.length - i, level);
- varObjects.add(varObj);
- }
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- return (ICDILocalVariableDescriptor[]) varObjects.toArray(new ICDILocalVariableDescriptor[0]);
- }
-
- public LocalVariable createLocalVariable(LocalVariableDescriptor varDesc) throws CDIException {
- Variable variable = findVariable(varDesc);
- LocalVariable local = null;
- if (variable instanceof LocalVariable) {
- local = (LocalVariable)variable;
- }
- if (local == null) {
- String name = varDesc.getQualifiedName();
- StackFrame stack = (StackFrame)varDesc.getStackFrame();
- Target target = (Target)varDesc.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- synchronized(target.getLock()) {
- try {
- target.setCurrentThread(stack.getThread(), false);
- ((Thread)stack.getThread()).setCurrentStackFrame(stack, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarCreate var = factory.createMIVarCreate(name);
- mi.postCommand(var, -1);
- local = new LocalVariable(varDesc, var);
-// mi.postCommand(var);
-// MIVarCreateInfo info = var.getMIVarCreateInfo();
-// if (info == null) {
-// throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
-// }
-// local = new LocalVariable(varDesc, info.getMIVar());
- List variablesList = getVariablesList(target);
- variablesList.add(local);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
- }
- return local;
- }
-
- public ICDIThreadStorageDescriptor[] getThreadStorageDescriptors(Thread thread) throws CDIException {
- return new ICDIThreadStorageDescriptor[0];
- }
-
- public ThreadStorage createThreadStorage(ThreadStorageDescriptor desc) throws CDIException {
- throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_variable_object")); //$NON-NLS-1$
- }
-
- public void destroyVariable(Variable variable) throws CDIException {
- // Fire a destroyEvent ?
- Target target = (Target)variable.getTarget();
- MISession mi = target.getMISession();
- // no need to call -var-delete for variable that are not in
- // the list most probaby they are children of other variables and in this case
- // we should not delete them
- List varList = getVariablesList(target);
- if (varList.contains(variable)) {
- removeMIVar(mi, variable.getMIVar());
- }
- MIVarDeletedEvent del = new MIVarDeletedEvent(mi, variable.getMIVar().getVarName());
- mi.fireEvent(del);
- }
-
- public void destroyAllVariables(Target target) throws CDIException {
- Variable[] variables = getVariables(target);
- MISession mi = target.getMISession();
- for (int i = 0; i < variables.length; ++i) {
- removeMIVar(mi, variables[i].getMIVar());
- MIVarDeletedEvent del = new MIVarDeletedEvent(mi, variables[i].getMIVar().getVarName());
- mi.fireEvent(del);
- }
- }
-
- /**
- * Update the elements in the cache, from the response of the "-var-update"
- * mi/command. Althought tempting we do not use the "-var-update *" command, since
- * for some reason on gdb-5.2.1 it starts to misbehave until it hangs ... sigh
- * We take the approach of updating the variables ourselfs. But we do it a smart
- * way by only updating the variables visible in the current stackframe but not
- * the other locals in different frames. The downside if any side effects we loose,
- * This ok, since the IDE only a frame at a time.
- *
- */
- @Override
- public void update(Target target) throws CDIException {
- int highLevel = 0;
- int lowLevel = 0;
- List eventList = new ArrayList();
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- Variable[] vars = getVariables(target);
- ICDIStackFrame[] frames = null;
- StackFrame currentStack = null;
- Thread currentThread = (Thread)target.getCurrentThread();
- if (currentThread != null) {
- currentStack = currentThread.getCurrentStackFrame();
- if (currentStack != null) {
- highLevel = currentStack.getLevel();
- }
- if (highLevel > MAX_STACK_DEPTH) {
- highLevel = MAX_STACK_DEPTH;
- }
- lowLevel = highLevel - MAX_STACK_DEPTH;
- if (lowLevel < 0) {
- lowLevel = 0;
- }
- frames = currentThread.getStackFrames(0, highLevel);
- }
- for (int i = 0; i < vars.length; i++) {
- Variable variable = vars[i];
- if (isVariableNeedsToBeUpdate(variable, currentStack, frames, lowLevel)) {
- update(target, variable, eventList);
- } else {
- variable.setUpdated(false);
- }
- }
- MIEvent[] events = (MIEvent[]) eventList.toArray(new MIEvent[0]);
- mi.fireEvents(events);
- }
-
- public void update(Variable variable) throws CDIException {
- Target target = (Target)variable.getTarget();
- MISession mi = target.getMISession();
- List eventList = new ArrayList();
- update(target, variable, eventList);
- MIEvent[] events = (MIEvent[]) eventList.toArray(new MIEvent[0]);
- mi.fireEvents(events);
- }
-
- public void update(Target target, Variable variable, List eventList) throws CDIException {
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarChange[] changes = noChanges;
- try {
- String miVarName = variable.getMIVar().getVarName();
- MIVarUpdate update = factory.createMIVarUpdate(miVarName);
- try {
- mi.postCommand(update);
- MIVarUpdateInfo info = update.getMIVarUpdateInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- changes = info.getMIVarChanges();
- } catch (MIException e) {
- //throw new MI2CDIException(e);
- eventList.add(new MIVarDeletedEvent(mi, miVarName));
- }
- } catch (CDIException exc) {
- // When the variable was out of scope the fisrt time, the getMIVar() generates an exception.
- // Then create again the variable, set the fVarCreateCMD of Variable class and try again the update command.
- try {
- MIVarCreate var = factory.createMIVarCreate(variable.getName());
- mi.postCommand(var);
- MIVarCreateInfo info = var.getMIVarCreateInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- variable.setMIVarCreate(var);
- update(target, variable, eventList);
- } catch (MIException e) {
- // Creating failed, variable not in scope => remove
- // No events to fire as the variable isn't backed by a MIVar
- getVariablesList(target).remove(variable);
- variable.setUpdated(false);
- return;
- } catch (CDIException e) {
- throw e;
- }
- }
- variable.setUpdated(true);
- for (int j = 0; j < changes.length; j++) {
- String n = changes[j].getVarName();
- if (changes[j].isInScope()) {
- eventList.add(new MIVarChangedEvent(mi, n));
- } else {
- destroyVariable(variable);
- eventList.add(new MIVarDeletedEvent(mi, n));
- }
- }
- }
-
- /**
- * We are trying to minimize the impact of the updates, this can be very long and unncessary if we
- * have a very deep stack and lots of local variables. We can assume here that the local variables
- * in the other non-selected stackframe will not change and only update the selected frame variables.
- *
- * @param variable
- * @param current
- * @param frames
- * @return
- */
- boolean isVariableNeedsToBeUpdate(Variable variable, ICDIStackFrame current, ICDIStackFrame[] frames, int lowLevel)
- throws CDIException {
- ICDIStackFrame varStack = variable.getStackFrame();
- boolean inScope = false;
-
- // Something wrong and the program terminated bail out here.
- if (current == null || frames == null) {
- return false;
- }
-
- // If the variable Stack is null, it means this is a global variable we should update
- if (varStack == null) {
- return true;
- } else if (varStack.equals(current)) {
- // The variable is in the current selected frame it should be updated
- return true;
- } else {
- if (varStack.getLevel() >= lowLevel) {
- // Check if the Variable is still in Scope
- // if it is no longer in scope so update() can call "-var-delete".
- for (int i = 0; i < frames.length; i++) {
- if (varStack.equals(frames[i])) {
- inScope = true;
- }
- }
- } else {
- inScope = true;
- }
- }
- // return true if the variable is no longer in scope we
- // need to call -var-delete.
- return !inScope;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java
deleted file mode 100644
index ea0a92a9f94..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIWatchpointScope;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Watchpoint;
-import org.eclipse.cdt.debug.mi.core.event.MIWatchpointScopeEvent;
-
-/**
- */
-public class WatchpointScope extends SessionObject implements ICDIWatchpointScope {
-
- MIWatchpointScopeEvent watchEvent;
-
- public WatchpointScope(Session session, MIWatchpointScopeEvent e) {
- super(session);
- watchEvent = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpointScope#getWatchpoint()
- */
- @Override
- public ICDIWatchpoint getWatchpoint() {
- int number = watchEvent.getNumber();
- // Ask the breakpointManager for the breakpoint
- BreakpointManager mgr = ((Session)getSession()).getBreakpointManager();
- // We need to return the same object as the reason.
- Watchpoint point = mgr.getWatchpoint(watchEvent.getMISession(), number);
- // FIXME: if point ==null ??? Create a new breakpoint ?
- return point;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java
deleted file mode 100644
index 36eb17b2713..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDIWatchpointTrigger;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Watchpoint;
-import org.eclipse.cdt.debug.mi.core.event.MIWatchpointTriggerEvent;
-
-/**
- */
-public class WatchpointTrigger extends SessionObject implements ICDIWatchpointTrigger {
-
- MIWatchpointTriggerEvent watchEvent;
-
- public WatchpointTrigger(Session session, MIWatchpointTriggerEvent e) {
- super(session);
- watchEvent = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger#getNewValue()
- */
- @Override
- public String getNewValue() {
- return watchEvent.getNewValue();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger#getOldValue()
- */
- @Override
- public String getOldValue() {
- return watchEvent.getOldValue();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger#getWatchpoint()
- */
- @Override
- public ICDIWatchpoint getWatchpoint() {
- int number = watchEvent.getNumber();
- // Ask the breakpointManager for the breakpoint
- BreakpointManager mgr = ((Session)getSession()).getBreakpointManager();
- // We need to return the same object as the reason.
- Watchpoint point = mgr.getWatchpoint(watchEvent.getMISession(), number);
- // FIXME: if point ==null ??? Create a new breakpoint ?
- return point;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java
deleted file mode 100644
index 64c2df86031..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.SignalManager;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.CObject;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRegisterChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISignalChangedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-
-/**
- */
-public class ChangedEvent implements ICDIChangedEvent {
-
- Session session;
- ICDIObject source;
-
- public ChangedEvent(Session s, MIVarChangedEvent var) {
- session = s;
-
- // Try the Variable manager.
- VariableManager mgr = session.getVariableManager();
- String varName = var.getVarName();
- MISession miSession = var.getMISession();
- source = mgr.getVariable(miSession, varName);
-
- // Try the Expression manager
- if (source == null) {
- ExpressionManager expMgr = session.getExpressionManager();
- source = expMgr.getVariable(miSession, varName);
- }
-
- // Try the Register manager
- if (source == null) {
- RegisterManager regMgr = session.getRegisterManager();
- source = regMgr.getRegister(miSession, varName);
- }
-
- // Fall back
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public ChangedEvent(Session s, MIRegisterChangedEvent reg) {
- session = s;
- RegisterManager mgr = session.getRegisterManager();
- MISession miSession = reg.getMISession();
- int regno = reg.getNumber();
- source = mgr.getRegister(miSession, regno);
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public ChangedEvent(Session s, MIBreakpointChangedEvent bpoint) {
- session = s;
- BreakpointManager mgr = session.getBreakpointManager();
- MISession miSession = bpoint.getMISession();
- int number = bpoint.getNumber();
- ICDIBreakpoint breakpoint = mgr.getBreakpoint(miSession, number);
- if (breakpoint != null) {
- source = breakpoint;
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public ChangedEvent(Session s, MISharedLibChangedEvent slib) {
- session = s;
- SharedLibraryManager mgr = session.getSharedLibraryManager();
- MISession miSession = slib.getMISession();
- String name = slib.getName();
- ICDISharedLibrary lib = mgr.getSharedLibrary(miSession, name);
- if (lib != null) {
- source = lib;
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public ChangedEvent(Session s, MISignalChangedEvent sig) {
- session = s;
- SignalManager mgr = session.getSignalManager();
- MISession miSession = sig.getMISession();
- String name = sig.getName();
- ICDISignal signal = mgr.getSignal(miSession, name);
- if (signal != null) {
- source = signal;
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public ChangedEvent(Session s, ICDIObject src) {
- session = s;
- source = src;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- return source;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java
deleted file mode 100644
index 847c54a6580..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDICreatedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.CObject;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIRegisterCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarCreatedEvent;
-
-/**
- */
-public class CreatedEvent implements ICDICreatedEvent {
-
- Session session;
- ICDIObject source;
-
- public CreatedEvent(Session s, MIBreakpointCreatedEvent bpoint) {
- session = s;
- BreakpointManager mgr = session.getBreakpointManager();
- MISession miSession = bpoint.getMISession();
- int number = bpoint.getNumber();
- source = mgr.getBreakpoint(miSession, number);
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, MIVarCreatedEvent var) {
- session = s;
- VariableManager mgr = session.getVariableManager();
- MISession miSession = var.getMISession();
- String varName = var.getVarName();
- source = mgr.getVariable(miSession, varName);
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, MIRegisterCreatedEvent reg) {
- session = s;
- RegisterManager mgr = session.getRegisterManager();
- MISession miSession = reg.getMISession();
- int regno = reg.getNumber();
- source = mgr.getRegister(miSession, regno);
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, MIThreadCreatedEvent cthread) {
- session = s;
- MISession miSession = cthread.getMISession();
- Target target = session.getTarget(miSession);
- source = target.getThread(cthread.getId());
- if (source == null) {
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, MIInferiorCreatedEvent inferior) {
- session = s;
- MISession miSession = inferior.getMISession();
- source = session.getTarget(miSession);
- }
-
- public CreatedEvent(Session s, MIMemoryCreatedEvent mblock) {
- session = s;
- MemoryManager mgr = session.getMemoryManager();
- MISession miSession = mblock.getMISession();
- ICDIMemoryBlock[] blocks = mgr.getMemoryBlocks(miSession);
- for (int i = 0; i < blocks.length; i++) {
- if (blocks[i].getStartAddress().equals(mblock.getAddress()) &&
- blocks[i].getLength() == mblock.getLength()) {
- source = blocks[i];
- break;
- }
- }
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, MISharedLibCreatedEvent slib) {
- session = s;
- SharedLibraryManager mgr = session.getSharedLibraryManager();
- MISession miSession = slib.getMISession();
- String name = slib.getName();
- source = mgr.getSharedLibrary(miSession, name);
- if (source == null) {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public CreatedEvent(Session s, ICDIObject src) {
- session = s;
- source = src;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- return source;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java
deleted file mode 100644
index 6cc91079c91..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Breakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.CObject;
-import org.eclipse.cdt.debug.mi.core.cdi.model.SharedLibrary;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Thread;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointDeletedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibUnloadedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIVarDeletedEvent;
-
-/**
- */
-public class DestroyedEvent implements ICDIDestroyedEvent {
-
- Session session;
- ICDIObject source;
-
- public DestroyedEvent(Session s, MIThreadExitEvent cthread) {
- session = s;
- Target target = session.getTarget(cthread.getMISession());
- source = new Thread(target, cthread.getId());
- }
-
- public DestroyedEvent(Session s, MIVarDeletedEvent var) {
- session = s;
- VariableManager varMgr = session.getVariableManager();
- MISession miSession = var.getMISession();
- String varName = var.getVarName();
- Variable variable = varMgr.removeVariableFromList(miSession, varName);
- if (variable != null) {
- source = variable;
- } else {
- ExpressionManager expMgr = session.getExpressionManager();
- variable = expMgr.removeVariableFromList(miSession, varName);
- if (variable != null) {
- source = variable;
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
- }
-
- public DestroyedEvent(Session s, MIBreakpointDeletedEvent bpoint) {
- session = s;
- BreakpointManager mgr = session.getBreakpointManager();
- MISession miSession = bpoint.getMISession();
- int number = bpoint.getNumber();
- Breakpoint breakpoint = mgr.getBreakpoint(miSession, number);
- if (breakpoint != null) {
- source = breakpoint;
- mgr.deleteBreakpoint(miSession, number);
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public DestroyedEvent(Session s, MISharedLibUnloadedEvent slib) {
- session = s;
- SharedLibraryManager mgr = session.getSharedLibraryManager();
- MISession miSession = slib.getMISession();
- String name = slib.getName();
- SharedLibrary lib = mgr.getSharedLibrary(miSession, name);
- if (lib != null) {
- mgr.deleteSharedLibrary(miSession, lib);
- source = lib;
- } else {
- Target target = session.getTarget(miSession);
- source = new CObject(target);
- }
- }
-
- public DestroyedEvent(Session s, ICDIObject src) {
- session = s;
- source = src;
- }
-
- public DestroyedEvent(Session s) {
- session = s;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- return source;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DisconnectedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DisconnectedEvent.java
deleted file mode 100644
index 65b8d3f1dae..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DisconnectedEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIDisconnectedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIDetachedEvent;
-
-/**
- */
-public class DisconnectedEvent implements ICDIDisconnectedEvent {
-
- ICDIObject source;
-
- public DisconnectedEvent(Session session, MIDetachedEvent detach) {
- Target target = session.getTarget(detach.getMISession());
- source = target;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core..ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- return source;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java
deleted file mode 100644
index 8821d46877e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-import org.eclipse.cdt.debug.core.cdi.event.ICDIExitedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.cdi.ExitInfo;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SignalExitInfo;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIGDBExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIInferiorSignalExitEvent;
-
-/**
- */
-public class ExitedEvent implements ICDIExitedEvent {
-
- MIEvent event;
- Session session;
-
- public ExitedEvent(Session s, MIInferiorExitEvent e) {
- session = s;
- event = e;
- }
-
- public ExitedEvent(Session s, MIInferiorSignalExitEvent e) {
- session = s;
- event = e;
- }
-
- public ExitedEvent(Session s, MIGDBExitEvent e) {
- session = s;
- event = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIExitedEvent#getExitInfo()
- */
- @Override
- public ICDISessionObject getReason() {
- if (event instanceof MIInferiorExitEvent) {
- return new ExitInfo(session, (MIInferiorExitEvent)event);
- } else if (event instanceof MIInferiorSignalExitEvent) {
- return new SignalExitInfo(session, (MIInferiorSignalExitEvent)event);
- }
- return session;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- Target target = session.getTarget(event.getMISession());
- return target;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/MemoryChangedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/MemoryChangedEvent.java
deleted file mode 100644
index bc396f8cba4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/MemoryChangedEvent.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.model.MemoryBlock;
-import org.eclipse.cdt.debug.mi.core.event.MIMemoryChangedEvent;
-
-/**
- */
-public class MemoryChangedEvent implements ICDIMemoryChangedEvent {
-
- Session session;
- MemoryBlock source;
- MIMemoryChangedEvent miMem;
-
- public MemoryChangedEvent(Session s, MemoryBlock block, MIMemoryChangedEvent mem) {
- session = s;
- source = block;
- miMem = mem;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getAddresses()
- */
- @Override
- public BigInteger[] getAddresses() {
- /* But only returns the address that are in the block. */
- BigInteger[] mi_addresses = miMem.getAddresses();
- List aList = new ArrayList(mi_addresses.length);
- for (int i = 0; i < mi_addresses.length; i++) {
- if (source.contains(mi_addresses[i])) {
- aList.add(mi_addresses[i]);
- }
- }
- return (BigInteger[]) aList.toArray(new BigInteger[aList.size()]);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- return source;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java
deleted file mode 100644
index b17e5bc8127..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIRunningEvent;
-
-/**
- */
-public class ResumedEvent implements ICDIResumedEvent {
-
- Session session;
- MIRunningEvent event;
-
- public ResumedEvent(Session s, MIRunningEvent e) {
- session = s;
- event = e;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- // We can send the target as the Source. CDI
- // Will assume that all threads are supended for this.
- // This is true for gdb when it suspend the inferior
- // all threads are suspended.
- Target target = session.getTarget(event.getMISession());
- return target;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent#getType()
- */
- @Override
- public int getType() {
- MIRunningEvent running = event;
- int type = running.getType();
- int cdiType = 0;
- switch (type) {
- case MIRunningEvent.CONTINUE:
- cdiType = ICDIResumedEvent.CONTINUE;
- break;
-
- case MIRunningEvent.UNTIL:
- case MIRunningEvent.NEXT:
- cdiType = ICDIResumedEvent.STEP_OVER;
- break;
-
- case MIRunningEvent.NEXTI:
- cdiType = ICDIResumedEvent.STEP_OVER_INSTRUCTION;
- break;
-
- case MIRunningEvent.STEP:
- cdiType = ICDIResumedEvent.STEP_INTO;
- break;
-
- case MIRunningEvent.STEPI:
- cdiType = ICDIResumedEvent.STEP_INTO_INSTRUCTION;
- break;
-
- case MIRunningEvent.RETURN:
- case MIRunningEvent.FINISH:
- cdiType = ICDIResumedEvent.STEP_RETURN;
- break;
-
- }
- return cdiType;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java
deleted file mode 100644
index 22540949746..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.event;
-
-import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
-import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointHit;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.EndSteppingRange;
-import org.eclipse.cdt.debug.mi.core.cdi.ErrorInfo;
-import org.eclipse.cdt.debug.mi.core.cdi.EventBreakpointHit;
-import org.eclipse.cdt.debug.mi.core.cdi.FunctionFinished;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryEvent;
-import org.eclipse.cdt.debug.mi.core.cdi.SignalReceived;
-import org.eclipse.cdt.debug.mi.core.cdi.WatchpointScope;
-import org.eclipse.cdt.debug.mi.core.cdi.WatchpointTrigger;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Breakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.EventBreakpoint;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.core.event.MIBreakpointHitEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIErrorEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIFunctionFinishedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MILocationReachedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISharedLibEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISignalEvent;
-import org.eclipse.cdt.debug.mi.core.event.MISteppingRangeEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIWatchpointScopeEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIWatchpointTriggerEvent;
-import org.eclipse.cdt.gdb.internal.eventbkpts.GdbCatchpoints;
-
-/**
- *
- */
-public class SuspendedEvent implements ICDISuspendedEvent {
-
- MIEvent event;
- Session session;
-
- public SuspendedEvent(Session s, MIEvent e) {
- session = s;
- event = e;
- }
-
- @Override
- public ICDISessionObject getReason() {
- if (event instanceof MIBreakpointHitEvent) {
- // A Catchpoint hit is reported by gdb as a breakpoint hit. We can
- // tell it's a catchpoint by looking at why kind of CDT-created
- // platform breakpoint is associated with it
- BreakpointManager bkptMgr = session.getBreakpointManager();
- Breakpoint bkpt = bkptMgr.getBreakpoint(event.getMISession(), ((MIBreakpointHitEvent)event).getNumber());
- if (bkpt instanceof EventBreakpoint) {
- return new EventBreakpointHit(session, GdbCatchpoints.eventToGdbCatchpointKeyword(((EventBreakpoint)bkpt).getEventType()));
- }
- else {
- return new BreakpointHit(session, (MIBreakpointHitEvent)event);
- }
- } else if (event instanceof MIWatchpointTriggerEvent) {
- return new WatchpointTrigger(session, (MIWatchpointTriggerEvent)event);
- } else if (event instanceof MIWatchpointScopeEvent) {
- return new WatchpointScope(session, (MIWatchpointScopeEvent)event);
- } else if (event instanceof MISteppingRangeEvent) {
- return new EndSteppingRange(session);
- } else if (event instanceof MISignalEvent) {
- return new SignalReceived(session, (MISignalEvent)event);
- } else if (event instanceof MILocationReachedEvent) {
- return new EndSteppingRange(session);
- } else if (event instanceof MIFunctionFinishedEvent) {
- return new FunctionFinished(session, (MIFunctionFinishedEvent)event);
- } else if (event instanceof MIErrorEvent) {
- return new ErrorInfo(session, (MIErrorEvent)event);
- } else if (event instanceof MISharedLibEvent) {
- return new SharedLibraryEvent(session);
- }
- return session;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
- */
- @Override
- public ICDIObject getSource() {
- Target target = session.getTarget(event.getMISession());
- // We can send the target as the Source. CDI
- // Will assume that all threads are supended for this.
- // This is true for gdb when it suspend the inferior
- // all threads are suspended.
- return target;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java
deleted file mode 100644
index 3abd32bb719..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressBreakpoint;
-
-public class AddressBreakpoint extends LocationBreakpoint implements
- ICDIAddressBreakpoint {
-
- public AddressBreakpoint(Target target, int kind, ICDILocation loc,
- ICDICondition cond, boolean enabled) {
- super(target, kind, loc, cond, enabled);
- }
-
-}
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
deleted file mode 100644
index 182662dd983..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java
deleted file mode 100644
index fe12e7b1d27..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIArgument;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-
-/**
- */
-public class Argument extends Variable implements ICDIArgument {
-
- public Argument(Target target, Thread thread, StackFrame frame,
- String n, String q, int pos, int depth, MIVar v) {
- super(target, thread, frame, n, q, pos, depth, v);
- }
-
- public Argument(ArgumentDescriptor obj, MIVarCreate var) {
- super(obj, var);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createVariable(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.core.cdi.model.ICDIThread, org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame, java.lang.String, java.lang.String, int, int, org.eclipse.cdt.debug.mi.core.output.MIVar)
- */
- @Override
- protected Variable createVariable(Target target, Thread thread, StackFrame frame, String name, String fullName, int pos, int depth, MIVar miVar) {
- return new Argument(target, thread, frame, name, fullName, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createDescriptor(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int)
- */
- @Override
- protected VariableDescriptor createDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth) {
- return new ArgumentDescriptor(target, thread, frame, n, fn, pos, depth);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentDescriptor.java
deleted file mode 100644
index ae1787bc789..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentDescriptor.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIArgumentDescriptor;
-
-/**
- */
-public class ArgumentDescriptor extends LocalVariableDescriptor implements ICDIArgumentDescriptor {
-
- public ArgumentDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn,
- int pos, int depth) {
- super(target, thread, frame, n, fn, pos, depth);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
deleted file mode 100644
index 721686fe782..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint2;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Condition;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
-
-/**
- */
-public abstract class Breakpoint extends CObject implements ICDIBreakpoint2 {
-
- ICDICondition condition;
- MIBreakpoint[] miBreakpoints;
-
- /**
- * One of the type constants in ICBreakpointType
- */
- int type;
-
- boolean enabled;
-
- public Breakpoint(Target target, int type, ICDICondition condition, boolean enabled) {
- super(target);
- this.type = type;
- this.condition = condition;
- this.enabled = enabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint2#getType()
- */
- @Override
- public int getType() {
- return type;
- }
-
- public MIBreakpoint[] getMIBreakpoints() {
- return miBreakpoints;
- }
-
- public void setMIBreakpoints(MIBreakpoint[] newMIBreakpoints) {
- miBreakpoints = newMIBreakpoints;
- }
-
- public boolean isDeferred() {
- return (miBreakpoints == null || miBreakpoints.length == 0);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpoint#getCondition()
- */
- @Override
- public ICDICondition getCondition() throws CDIException {
- if (condition == null) {
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- List list = new ArrayList(miBreakpoints.length);
- for (int i = 0; i < miBreakpoints.length; i++) {
- String tid = miBreakpoints[i].getThreadId();
- if (tid != null && tid.length() > 0) {
- list.add(miBreakpoints[i].getThreadId());
- }
- }
- String[] tids = (String[]) list.toArray(new String[list.size()]);
- int icount = miBreakpoints[0].getIgnoreCount();
- String exp = miBreakpoints[0].getCondition();
- condition = new Condition(icount, exp, tids);
- } else {
- condition = new Condition(0, new String(), null);
- }
- }
- return condition;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpoint#isEnabled()
- */
- @Override
- public boolean isEnabled() throws CDIException {
- return enabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint#isHardware()
- *
- * CDT 5.0 won't call this deprecated method (since we implement
- * ICDIBreakpoint2), but we use it ourselves.
- */
- @Override
- public boolean isHardware() {
- // ignore the TEMPORARY bit qualifier
- return ((type & ~ICBreakpointType.TEMPORARY) == ICBreakpointType.HARDWARE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint#isTemporary()
- *
- * CDT 5.0 won't call this deprecated method (since we implement
- * ICDIBreakpoint2), but we use it ourselves.
- */
- @Override
- public boolean isTemporary() {
- return (type & ICBreakpointType.TEMPORARY) != 0;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpoint#setCondition(ICDICondition)
- */
- @Override
- public void setCondition(ICDICondition newCondition) throws CDIException {
- Session session = (Session)getTarget().getSession();
- BreakpointManager mgr = session.getBreakpointManager();
- mgr.setCondition(this, newCondition);
- setCondition0(newCondition);
- }
-
- public void setCondition0(ICDICondition newCondition) {
- condition = newCondition;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpoint#setEnabled(boolean)
- */
- @Override
- public void setEnabled(boolean on) throws CDIException {
- Session session = (Session)getTarget().getSession();
- BreakpointManager mgr = session.getBreakpointManager();
- if (on == false && isEnabled() == true) {
- mgr.disableBreakpoint(this);
- } else if (on == true && isEnabled() == false) {
- mgr.enableBreakpoint(this);
- }
- }
-
- public void setEnabled0(boolean on) {
- enabled = on;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CObject.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CObject.java
deleted file mode 100644
index e5f129c3cf7..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CObject.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIObject;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-
-/**
- */
-public class CObject implements ICDIObject {
-
- protected Target fTarget;
-
- public CObject(Target t) {
- fTarget = t;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIObject#getTarget()
- */
- @Override
- public ICDITarget getTarget() {
- return fTarget;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CoreFileConfiguration.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CoreFileConfiguration.java
deleted file mode 100644
index 952b4b2d2eb..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CoreFileConfiguration.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDITargetConfiguration;
-
-public class CoreFileConfiguration extends CObject implements ICDITargetConfiguration {
-
- /**
- * @param t
- */
- public CoreFileConfiguration(Target t) {
- super(t);
- }
-
- @Override
- public boolean supportsTerminate() {
- return true;
- }
-
- @Override
- public boolean supportsDisconnect() {
- return false;
- }
-
- @Override
- public boolean supportsRestart() {
- return false;
- }
-
- @Override
- public boolean supportsStepping() {
- return false;
- }
-
- @Override
- public boolean supportsInstructionStepping() {
- return false;
- }
-
- @Override
- public boolean supportsBreakpoints() {
- return false;
- }
-
- @Override
- public boolean supportsRegisters() {
- return true;
- }
-
- @Override
- public boolean supportsRegisterModification() {
- return false;
- }
-
- @Override
- public boolean supportsMemoryRetrieval() {
- return true;
- }
-
- @Override
- public boolean supportsMemoryModification() {
- return false;
- }
-
- @Override
- public boolean supportsExpressionEvaluation() {
- return true;
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsResume()
- */
- @Override
- public boolean supportsResume() {
- return false;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSuspend()
- */
- @Override
- public boolean supportsSuspend() {
- return false;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSharedLibrary()
- */
- @Override
- public boolean supportsSharedLibrary() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#terminateSessionOnExit()
- */
- public boolean terminateSessionOnExit() {
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
deleted file mode 100644
index 5aa8177aff8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.util.Arrays;
-
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
-import org.eclipse.cdt.gdb.eventbkpts.IEventBreakpointConstants;
-import org.eclipse.cdt.gdb.internal.eventbkpts.GdbCatchpoints;
-
-/**
- * @since 6.0
- */
-public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
-
-
- private String eventType;
- private String arg;
-
- public EventBreakpoint(Target target, String event, String arg, ICDICondition cond, boolean enabled) {
- super(target, ICBreakpointType.REGULAR, cond, enabled);
- this.eventType = event;
- this.arg = arg==null?"":arg; //$NON-NLS-1$
- }
-
- @Override
- public String getEventType() {
- return eventType;
- }
-
- @Override
- public String getExtraArgument() {
- return arg;
- }
-
- /**
- * Returns the gdb catchpoint keyword associated with this event breakpoint
- * (e.g., "signal", "throw")
- */
- public String getGdbEvent() {
- return GdbCatchpoints.eventToGdbCatchpointKeyword(getEventType());
- }
-
- public String getGdbArg() {
- return getExtraArgument();
- }
-
- @Override
- public int hashCode() {
- return eventType.hashCode();
- }
- @Override
- public boolean equals(Object arg0) {
- if (this == arg0) return true;
- if (!(arg0 instanceof EventBreakpoint)) return false;
- MIBreakpoint[] breakpoints = getMIBreakpoints();
- if (breakpoints==null || breakpoints.length==0) {
- return super.equals(arg0);
- }
- return Arrays.equals(breakpoints, ((EventBreakpoint)arg0).getMIBreakpoints());
- }
- /**
- * Returns event type by using miBreakpoint parameters
- * @param miBreakpoint
- * @return null if unknown type, null cannot be used to create valid EventBreakpoint
- */
- public static String getEventTypeFromMI(MIBreakpoint miBreakpoint) {
- // Two exceptions to how the message is typically formatted
- if (miBreakpoint.getWhat().equals("exception catch")) { //$NON-NLS-1$
- return IEventBreakpointConstants.EVENT_TYPE_CATCH;
- } else if (miBreakpoint.getWhat().equals("exception throw")) { //$NON-NLS-1$
- return IEventBreakpointConstants.EVENT_TYPE_THROW;
- }
-
- String miType = miBreakpoint.getType();
- final String PREFIX = "catch "; //$NON-NLS-1$
- if (miType.startsWith(PREFIX)) {
- String keyword = miType.substring(PREFIX.length());
- return GdbCatchpoints.gdbCatchpointKeywordToEvent(keyword);
- }
- return null; // not known/supported
- }
-
- public static String getEventArgumentFromMI(MIBreakpoint miBreakpoint) {
- // need a working gdb command command that support catch event argument test test
- return ""; //$NON-NLS-1$
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java
deleted file mode 100644
index 020908b5bf9..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-
-/**
- * Exceptionpoint
- */
-public class Exceptionpoint extends Breakpoint implements ICDIExceptionpoint {
-
- String fClazz;
- boolean fStopOnThrow;
- boolean fStopOnCatch;
-
- /**
- */
- public Exceptionpoint(Target target, String clazz, boolean stopOnThrow, boolean stopOnCatch, ICDICondition cond, boolean enabled) {
- super(target, ICBreakpointType.REGULAR, cond, enabled);
- fClazz = clazz;
- fStopOnThrow = stopOnThrow;
- fStopOnCatch = stopOnCatch;
- }
-
- public String getExceptionName() {
- return fClazz;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint#isStopOnThrow()
- */
- @Override
- public boolean isStopOnThrow() {
- return fStopOnThrow;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint#isStopOnCatch()
- */
- @Override
- public boolean isStopOnCatch() {
- return fStopOnCatch;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Expression.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Expression.java
deleted file mode 100644
index 3be6d86a5b9..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Expression.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.IncompleteType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.Type;
-
-
-/**
- */
-public class Expression extends CObject implements ICDIExpression {
-
- private static int ID_COUNT = 0;
- private int id;
- String fExpression;
- Type fType;
- Variable fVariable;
- ICDIStackFrame fContext;
-
- public Expression(Target target, String ex) {
- super(target);
- fExpression = ex;
- id = ++ID_COUNT;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpression#getExpressionText()
- */
- @Override
- public String getExpressionText() {
- return fExpression;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpression#equals(org.eclipse.cdt.debug.core.cdi.model.ICDIExpression)
- */
- @Override
- public boolean equals(ICDIExpression obj) {
- if (obj instanceof Expression) {
- Expression other = (Expression)obj;
- return other.id == id;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#getType()
- */
- public ICDIType getType(ICDIStackFrame frame) throws CDIException {
- Type type = null;
- Target target = (Target)getTarget();
- Session session = (Session) (target.getSession());
- SourceManager sourceMgr = session.getSourceManager();
- String nametype = sourceMgr.getTypeNameFromVariable((StackFrame)frame, getExpressionText());
- try {
- type = sourceMgr.getType(target, nametype);
- } catch (CDIException e) {
- // Try with ptype.
- try {
- String ptype = sourceMgr.getDetailTypeName(target, nametype);
- type = sourceMgr.getType(target, ptype);
- } catch (CDIException ex) {
- // Some version of gdb does not work with the name of the class
- // ex: class data foo --> ptype data --> fails
- // ex: class data foo --> ptype foo --> succeed
- try {
- String ptype = sourceMgr.getDetailTypeNameFromVariable((StackFrame)frame, getExpressionText());
- type = sourceMgr.getType(target, ptype);
- } catch (CDIException e2) {
- // give up.
- }
- }
- }
- if (type == null) {
- type = new IncompleteType(target, nametype);
- }
-
- return type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpression#getValue(org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame)
- */
- @Override
- public ICDIValue getValue(ICDIStackFrame context) throws CDIException {
- Session session = (Session)getTarget().getSession();
- ExpressionManager mgr = session.getExpressionManager();
- if (fVariable != null && fContext != null && !context.equals(fContext))
- { // Get rid of the underlying variable if the context has changed.
- // This is defensive, in practice each stack frame has it's own
- // list of expressions.
- mgr.deleteVariable(fVariable);
- fVariable = null;
- }
- fContext = context;
- if (fVariable != null) {
- // Reuse the variable so we don't have to ask gdb to create another one. Bug 150565.
- try {
- // It's possible this variable is no longer valid... (Bug 296006)
- fVariable.getValue().getValueString();
- } catch (CDIException e) {
- fVariable = null;
- }
- }
- if (fVariable == null)
- fVariable = mgr.createVariable((StackFrame)context, getExpressionText());
- return fVariable.getValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpression#dispose()
- */
- @Override
- public void dispose() throws CDIException {
- Session session = (Session)getTarget().getSession();
- ExpressionManager mgr = session.getExpressionManager();
- mgr.destroyExpressions((Target)getTarget(), new Expression[] {this});
- if (fVariable != null)
- mgr.deleteVariable(fVariable);
- fVariable = null;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java
deleted file mode 100644
index 73d2ca9e71f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIFunctionBreakpoint;
-
-public class FunctionBreakpoint extends LocationBreakpoint implements
- ICDIFunctionBreakpoint {
-
- public FunctionBreakpoint(Target target, int kind, ICDILocation loc,
- ICDICondition cond, boolean enabled) {
- super(target, kind, loc, cond, enabled);
- }
-
-}
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
deleted file mode 100644
index 3d0eee9c3fe..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java
deleted file mode 100644
index 43831601a14..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIGlobalVariable;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-
-/**
- * GlobalVariable
- */
-public class GlobalVariable extends Variable implements ICDIGlobalVariable {
-
-
- /**
- * @param obj
- * @param v
- */
- public GlobalVariable(VariableDescriptor obj, MIVarCreate v) {
- super(obj, v);
- }
-
- /**
- * @param target
- * @param n
- * @param q
- * @param thread
- * @param stack
- * @param pos
- * @param depth
- * @param v
- */
- public GlobalVariable(Target target, Thread thread, StackFrame frame, String n, String q, int pos, int depth, MIVar miVar) {
- super(target, thread, frame, n, q, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createVariable(org.eclipse.cdt.debug.mi.core.cdi.model.Target, java.lang.String, java.lang.String, org.eclipse.cdt.debug.core.cdi.model.ICDIThread, org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame, int, int, org.eclipse.cdt.debug.mi.core.output.MIVar)
- */
- @Override
- protected Variable createVariable(Target target, Thread thread, StackFrame frame, String name, String fullName, int pos, int depth, MIVar miVar) {
- return new GlobalVariable(target, thread, frame, name, fullName, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createDescriptor(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int)
- */
- @Override
- protected VariableDescriptor createDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth) {
- return new GlobalVariableDescriptor(target, thread, frame, n, fn, pos, depth);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariableDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariableDescriptor.java
deleted file mode 100644
index 62fde45a0d4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariableDescriptor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIGlobalVariableDescriptor;
-
-/**
- * GlobalVariableDescriptor
- */
-public class GlobalVariableDescriptor extends VariableDescriptor implements ICDIGlobalVariableDescriptor {
-
- /**
- * @param target
- * @param thread
- * @param stack
- * @param n
- * @param fn
- * @param pos
- * @param depth
- */
- public GlobalVariableDescriptor(Target target, Thread thread,
- StackFrame stack, String n, String fn, int pos, int depth) {
- super(target, thread, stack, n, fn, pos, depth);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Instruction.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Instruction.java
deleted file mode 100644
index 86f840add63..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Instruction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIInstruction;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.output.MIAsm;
-
-/**
- */
-public class Instruction extends CObject implements ICDIInstruction {
-
- MIAsm asm;
-
- public Instruction(Target target, MIAsm a) {
- super(target);
- asm = a;
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getAdress()
- */
- @Override
- public BigInteger getAdress() {
- return MIFormat.getBigInteger(asm.getAddress());
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getFuntionName()
- */
- @Override
- public String getFuntionName() {
- return asm.getFunction();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getInstruction()
- */
- @Override
- public String getInstruction() {
- return asm.getInstruction();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getOffset()
- */
- @Override
- public long getOffset() {
- return asm.getOffset();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getArgs()
- */
- @Override
- public String getArgs() {
- return asm.getArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction#getOpcode()
- */
- @Override
- public String getOpcode() {
- return asm.getOpcode();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java
deleted file mode 100644
index f986ac43d0e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint;
-
-public class LineBreakpoint extends LocationBreakpoint implements ICDILineBreakpoint {
-
- public LineBreakpoint(Target target, int kind, ICDILineLocation loc, ICDICondition cond, boolean enabled) {
- super(target, kind, loc, cond, enabled);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java
deleted file mode 100644
index 3062adce851..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDILocalVariable;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-
-/**
- * LocalVariable
- */
-public class LocalVariable extends Variable implements ICDILocalVariable {
-
- /**
- * @param obj
- * @param v
- */
- public LocalVariable(LocalVariableDescriptor obj, MIVarCreate v) {
- super(obj, v);
- }
-
- public LocalVariable(Target target, Thread thread, StackFrame frame, String n, String q,
- int pos, int depth, MIVar miVar) {
- super(target, thread, frame, n, q, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createVariable(org.eclipse.cdt.debug.mi.core.cdi.model.Target, java.lang.String, java.lang.String, org.eclipse.cdt.debug.core.cdi.model.ICDIThread, org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame, int, int, org.eclipse.cdt.debug.mi.core.output.MIVar)
- */
- @Override
- protected Variable createVariable(Target target, Thread thread, StackFrame frame, String name,
- String fullName, int pos, int depth, MIVar miVar) {
- return new LocalVariable(target, thread, frame, name, fullName, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createDescriptor(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int)
- */
- @Override
- protected VariableDescriptor createDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth) {
- return new LocalVariableDescriptor(target, thread, frame, n, fn, pos, depth);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariableDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariableDescriptor.java
deleted file mode 100644
index b3f03cf4068..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariableDescriptor.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDILocalVariableDescriptor;
-
-/**
- * LocalVariableDescriptor
- */
-public class LocalVariableDescriptor extends VariableDescriptor implements
- ICDILocalVariableDescriptor {
-
- /**
- * @param target
- * @param n
- * @param fn
- * @param stack
- * @param pos
- * @param depth
- */
- public LocalVariableDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth) {
- super(target, thread, frame, n, fn, pos, depth);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java
deleted file mode 100644
index fd531173df8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.cdi.Locator;
-
-public abstract class LocationBreakpoint extends Breakpoint implements ICDIBreakpoint {
-
- ICDILocation fLocation;
-
- public LocationBreakpoint(Target target, int kind, ICDILocation loc, ICDICondition cond, boolean enabled) {
- super(target, kind, cond, enabled);
- fLocation = loc;
- }
-
- public int getLineNumber() {
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- return miBreakpoints[0].getLine();
- } else if (fLocation instanceof ICDILineLocation) {
- return ((ICDILineLocation)fLocation).getLineNumber();
- }
- return 0;
- }
-
- public String getFile() {
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- return miBreakpoints[0].getFile();
- } else if (fLocation instanceof ICDILineLocation) {
- return ((ICDILineLocation)fLocation).getFile();
- } else if (fLocation instanceof ICDIFunctionLocation) {
- return ((ICDIFunctionLocation)fLocation).getFile();
- }
- return null;
- }
-
- public BigInteger getAddress() {
- if (miBreakpoints != null && miBreakpoints.length > 0) {
- BigInteger addr = BigInteger.ZERO;
- String a = miBreakpoints[0].getAddress();
- if (a != null) {
- addr = MIFormat.getBigInteger(a);
- }
- return addr;
- } else if (fLocation instanceof ICDIAddressLocation) {
- return ((ICDIAddressLocation)fLocation).getAddress();
- }
- return null;
- }
-
- public String getFunction() {
- // TODO: We need to review this but for now
- // we need to return what the cdt debug passed us
- // it is necessary when they do the comparison.
- if (fLocation instanceof ICDIFunctionLocation) {
- return ((ICDIFunctionLocation)fLocation).getFunction();
- } else if (miBreakpoints != null && miBreakpoints.length > 0) {
- return miBreakpoints[0].getFunction();
- } /*else if (fLocation instanceof ICDIFunctionLocation) {
- return ((ICDIFunctionLocation)fLocation).getFunction();
- }*/
- return null;
- }
-
- public ICDILocator getLocator() {
- return new Locator(getFile(), getFunction(), getLineNumber(), getAddress());
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MappedSourceLocation.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MappedSourceLocation.java
deleted file mode 100644
index 2c3e53ee4c3..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MappedSourceLocation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 Nokia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nokia - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressToSource;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoLineInfo;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-public class MappedSourceLocation implements ICDIAddressToSource.IMappedSourceLocation {
-
- private CLIInfoLineInfo lineInfo;
- private IAddress address;
- private String executable;
-
- public MappedSourceLocation(IAddress address, CLIInfoLineInfo lineInfo, String executable) {
- this.address = address;
- this.lineInfo = lineInfo;
- this.executable = executable;
- }
-
- @Override
- public IAddress getAddress() {
- return address;
- }
-
- @Override
- public IPath getExecutable() {
- return Path.fromOSString(executable);
- }
-
- @Override
- public String getFunctionName() {
- return lineInfo.getStartLocation();
- }
-
- @Override
- public int getLineNumber() {
- return lineInfo.getLineNumber();
- }
-
- @Override
- public IPath getSourceFile() {
- return Path.fromOSString(lineInfo.getFileName());
- }
-
- @Override
- public String getUnmangledFunctionName() {
- return lineInfo.getStartLocation();
- }
-
- @Override
- public int compareTo(Object arg0) {
- return address.compareTo(arg0);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
deleted file mode 100644
index d0e11cab845..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
-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.CdiResources;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataWriteMemory;
-import org.eclipse.cdt.debug.mi.core.output.MIDataReadMemoryInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIMemory;
-
-/**
- */
-public class MemoryBlock extends CObject implements ICDIMemoryBlock {
-
- String expression;
- boolean frozen;
- boolean dirty;
-
- private MIDataReadMemoryInfo mem;
- private int fWordSize;
- private BigInteger cStartAddress; //cached start address
- private byte[] cBytes; //cached bytes
- private int[] badOffsets;
- private boolean fIsLittleEndian;
-
- public MemoryBlock(Target target, String exp, int wordSize, boolean isLittle, MIDataReadMemoryInfo info) {
- super(target);
- expression = exp;
- fWordSize = wordSize;
- frozen = true;
- fIsLittleEndian = isLittle;
- setMIDataReadMemoryInfo(info);
- }
-
- /**
- * @return the expression use to create the block.
- */
- public String getExpression() {
- return expression;
- }
-
- /**
- * @return the size of each memory word in bytes.
- */
- @Override
- public int getWordSize() {
- return fWordSize;
- }
-
- /**
- * Reset the internal MIDataReadMemoryInfo. All modifications into mem info should be done
- * using this method
- */
- public void setMIDataReadMemoryInfo(MIDataReadMemoryInfo m) {
- cStartAddress = MIFormat.getBigInteger(m.getAddress());
- cBytes = getBytes(m);
- mem = m;
- }
-
- /**
- * @return the internal MIDataReadMemoryInfo.
- */
- public MIDataReadMemoryInfo getMIDataReadMemoryInfo() {
- return mem;
- }
-
- /**
- * @return true if any address in the array is within the block.
- */
- public boolean contains(BigInteger[] adds) {
- for (int i = 0; i < adds.length; i++) {
- if (contains(adds[i])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @return true if the address is within the block.
- */
- public boolean contains(BigInteger addr) {
- BigInteger start = getStartAddress();
- long length = getLength();
- if ( start.compareTo(addr) <= 0 &&
- addr.compareTo(start.add(BigInteger.valueOf(length))) <= 0 )
- {
- return true;
- }
- return false;
- }
-
- /**
- * Use by the EventManager to check fire events when doing refresh().
- */
- public boolean isDirty() {
- return dirty;
- }
-
- /**
- * Use by the EventManager to check fire events when doing refresh().
- */
- public void setDirty(boolean d) {
- dirty = d;
- }
-
- /**
- *
- */
- private byte[] getBytes(MIDataReadMemoryInfo m) {
- byte[] bytes = new byte[0];
-
- // sanity.
- if (m == null) {
- return bytes;
- }
-
- // collect the data
- MIMemory[] miMem = m.getMemories();
- for (int i = 0; i < miMem.length; ++i) {
- long[] data = miMem[i].getData();
- if (data != null && data.length > 0) {
-// int blen = bytes.length;
-// byte[] newBytes = new byte[blen + data.length];
-// System.arraycopy(bytes, 0, newBytes, 0, blen);
-// for (int j = 0; j < data.length; ++j, ++blen) {
-// newBytes[blen] = (byte)data[j];
-// }
-// bytes = newBytes;
- for (int j = 0; j < data.length; ++j) {
- byte[] bs = longToBytes(data[j]);
- // grow the array
- int blen = bytes.length;
- byte[] newBytes = new byte[blen + bs.length];
- System.arraycopy(bytes, 0, newBytes, 0, blen);
- System.arraycopy(bs, 0, newBytes, blen, bs.length);
- bytes = newBytes;
- }
- }
- }
- return bytes;
- }
-
- private int[] getBadOffsets(MIDataReadMemoryInfo m) {
- int[] offsets = new int[0];
-
- // sanity
- if (m == null) {
- return offsets;
- }
-
- // collect the data
- MIMemory[] miMem = m.getMemories();
- for (int i = 0; i < miMem.length; i++) {
- int[] data = miMem[i].getBadOffsets();
- if (data.length > 0) {
- int olen = offsets.length;
- int[] newOffsets = new int[olen + data.length];
- System.arraycopy(offsets, 0, newOffsets, 0, olen);
- System.arraycopy(data, 0, newOffsets, olen, data.length);
- offsets = newOffsets;
- }
- }
- return offsets;
- }
-
- @Override
- public byte[] getBytes() throws CDIException {
- return cBytes;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#refresh()
- */
- @Override
- public void refresh() throws CDIException {
- Target target = (Target)getTarget();
- MemoryManager mgr = ((Session)target.getSession()).getMemoryManager();
- setDirty(true);
- BigInteger[] addresses = mgr.update(this, null);
- // Check if this affects other blocks.
- if (addresses.length > 0) {
- MemoryBlock[] blocks = mgr.getMemoryBlocks(target.getMISession());
- for (int i = 0; i < blocks.length; i++) {
- MemoryBlock block = blocks[i];
- if (! block.equals(this) && block.contains(addresses)) {
- block.setDirty(true);
- mgr.update(block, null);
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#getLength()
- */
- @Override
- public long getLength() {
- try {
- // use this instead. If the wordSize
- // given does not match the hardware,
- // counting the bytes will be correct.
- return getBytes().length;
- } catch (CDIException e) {
- // ignore.
- }
- return mem.getTotalBytes();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#getStartAddress()
- */
- @Override
- public BigInteger getStartAddress() {
- return cStartAddress;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#isFrozen()
- */
- @Override
- public boolean isFrozen() {
- return frozen;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#setFrozen(boolean)
- */
- @Override
- public void setFrozen(boolean frozen) {
- this.frozen = frozen;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#setValue(long, byte[])
- */
- @Override
- public void setValue(long offset, byte[] bytes) throws CDIException {
- if (offset >= getLength() || offset + bytes.length > getLength()) {
- throw new CDIException(CdiResources.getString("cdi.model.MemoryBlock.Bad_Offset")); //$NON-NLS-1$
- }
- MISession miSession = ((Target)getTarget()).getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- for (int i = 0; i < bytes.length; i++) {
- long l = new Byte(bytes[i]).longValue() & 0xff;
- String value = "0x" + Long.toHexString(l); //$NON-NLS-1$
- MIDataWriteMemory mw = factory.createMIDataWriteMemory(offset + i,
- expression, MIFormat.HEXADECIMAL, 1, value);
- try {
- miSession.postCommand(mw);
- MIInfo info = mw.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- // If the assign was succesfull fire a MIChangedEvent() via refresh.
- refresh();
-
- Target target = (Target)getTarget();
-
- // If register manager is on autoupdate, update all registers
- RegisterManager regMgr = ((Session)target.getSession()).getRegisterManager();
- if (regMgr.isAutoUpdate()) {
- regMgr.update(target);
- }
-
- // If expression manager is on autoupdate, update all expressions
- ExpressionManager expMgr = ((Session)target.getSession()).getExpressionManager();
- if (expMgr.isAutoUpdate()) {
- expMgr.update(target);
- }
-
- // If variable manager is on autoupdate, update all variables.
- VariableManager varMgr = ((Session)target.getSession()).getVariableManager();
- if (varMgr.isAutoUpdate()) {
- varMgr.update(target);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock#getFlags(int)
- */
- @Override
- public synchronized byte getFlags(int offset) {
- if (offset < 0 || offset >= getLength()) {
- throw new IndexOutOfBoundsException();
- }
- if (badOffsets == null) {
- badOffsets = getBadOffsets(mem);
- }
- if (badOffsets != null) {
- for (int i = 0; i < badOffsets.length; ++i) {
- if (badOffsets[i] == offset) {
- return 0;
- }
- }
- }
- return VALID;
- }
-
-
- /**
- * We should use the wordSize ... but ...
- * The problem: the user may not have the right wordsize
- * For example on some DSP the user set the wordSize to be 1 byte
- * but in fact GDB is reading 2 bytes.
- * So let do some guessing since the data(long) may have a bigger value then one byte.
- */
- private byte[] longToBytes(long v) {
- // Calculate the number of bytes needed
- int count = 1;
- long value = v;
- for (count = 1; (value /= 0x100) > 0; ++count)
- ;
-
- // Reset the wordSize if incorrect.
- if (fWordSize != count) {
- fWordSize = count;
- }
-
- byte[] bytes = new byte[count];
- if (fIsLittleEndian) {
- for (int i = count - 1; i >= 0; --i) {
- int shift = i * count;
- bytes[i] = (byte)((v >>> shift) & 0xFF);
- }
-// bytes[7] = (byte)((v >>> 56) & 0xFF);
-// bytes[6] = (byte)((v >>> 48) & 0xFF);
-// bytes[5] = (byte)((v >>> 40) & 0xFF);
-// bytes[4] = (byte)((v >>> 32) & 0xFF);
-// bytes[3] = (byte)((v >>> 24) & 0xFF);
-// bytes[2] = (byte)((v >>> 16) & 0xFF);
-// bytes[1] = (byte)((v >>> 8) & 0xFF);
-// bytes[0] = (byte)((v >>> 0) & 0xFF);
- } else {
- for (int i = 0; i < count; ++i) {
- int shift = (count - i - 1) * count;
- bytes[i] = (byte)((v >>> shift) & 0xFF);
- }
-// bytes[0] = (byte)((v >>> 56) & 0xFF);
-// bytes[1] = (byte)((v >>> 48) & 0xFF);
-// bytes[2] = (byte)((v >>> 40) & 0xFF);
-// bytes[3] = (byte)((v >>> 32) & 0xFF);
-// bytes[4] = (byte)((v >>> 24) & 0xFF);
-// bytes[5] = (byte)((v >>> 16) & 0xFF);
-// bytes[6] = (byte)((v >>> 8) & 0xFF);
-// bytes[7] = (byte)((v >>> 0) & 0xFF);
- }
- return bytes;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MixedInstruction.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MixedInstruction.java
deleted file mode 100644
index c5f78c04532..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MixedInstruction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.mi.core.output.MIAsm;
-import org.eclipse.cdt.debug.mi.core.output.MISrcAsm;
-
-/**
- */
-public class MixedInstruction extends CObject implements ICDIMixedInstruction {
-
- MISrcAsm srcAsm;
-
- public MixedInstruction (Target target, MISrcAsm a) {
- super(target);
- srcAsm = a;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction#getFileName()
- */
- @Override
- public String getFileName() {
- return srcAsm.getFile();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction#getInstructions()
- */
- @Override
- public ICDIInstruction[] getInstructions() {
- MIAsm[] asms = srcAsm.getMIAsms();
- ICDIInstruction[] instructions = new ICDIInstruction[asms.length];
- for (int i = 0; i < asms.length; i++) {
- instructions[i] = new Instruction((Target)getTarget(), asms[i]);
- }
- return instructions;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction#getLineNumber()
- */
- @Override
- public int getLineNumber() {
- return srcAsm.getLine();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
deleted file mode 100644
index f75789cfbec..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-
-/**
- */
-public class Register extends Variable implements ICDIRegister {
-
- /**
- * @param target
- * @param thread
- * @param frame
- * @param n
- * @param q
- * @param pos
- * @param depth
- * @param v
- */
- public Register(Target target, Thread thread, StackFrame frame,
- String n, String q, int pos, int depth, MIVar miVar) {
- super(target, thread, frame, n, q, pos, depth, miVar);
- }
-
- public Register(RegisterDescriptor obj, MIVarCreate var) {
- super(obj, var);
- }
-
-
- @Override
- protected void addToTypeCache(String nameType, ICDIType type) throws CDIException {
- Session session = (Session)getTarget().getSession();
- RegisterManager mgr = session.getRegisterManager();
- mgr.addToTypeCache(nameType, type);
- }
-
- @Override
- protected ICDIType getFromTypeCache(String nameType) throws CDIException {
- Session session = (Session)getTarget().getSession();
- RegisterManager mgr = session.getRegisterManager();
- return mgr.getFromTypeCache(nameType);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.VariableDescriptor#getFullName()
- */
- @Override
- public String getFullName() {
- if (fFullName == null) {
- String n = getName();
- if (!n.startsWith("$")) { //$NON-NLS-1$
- fFullName = "$" + n; //$NON-NLS-1$
- } else {
- fFullName = n;
- }
- }
- return fFullName;
- }
-
- @Override
- protected Variable createVariable(Target target, Thread thread, StackFrame frame, String name, String fullName, int pos, int depth, MIVar miVar) {
- return new Register(target, thread, frame, name, fullName, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#dispose()
- */
- @Override
- public void dispose() throws CDIException {
- ICDITarget target = getTarget();
- RegisterManager regMgr = ((Session)target.getSession()).getRegisterManager();
- regMgr.destroyRegister(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRegister#getValue(org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame)
- */
- @Override
- public ICDIValue getValue(ICDIStackFrame context) throws CDIException {
- Session session = (Session)getTarget().getSession();
- RegisterManager mgr = session.getRegisterManager();
- Variable var = mgr.createShadowRegister(this, (StackFrame)context, getQualifiedName());
- return var.getValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRegister#equals(org.eclipse.cdt.debug.core.cdi.model.ICDIRegister)
- */
- @Override
- public boolean equals(ICDIRegister register) {
- if (register instanceof Register) {
- Register reg = (Register) register;
- return super.equals(reg);
- }
- return super.equals(register);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createDescriptor(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int)
- */
- @Override
- protected VariableDescriptor createDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth) {
- return new RegisterDescriptor(target, thread, frame, n, fn, pos, depth);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterDescriptor.java
deleted file mode 100644
index f7c7df62b21..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterDescriptor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIRegisterDescriptor;
-
-/**
- */
-public class RegisterDescriptor extends VariableDescriptor implements ICDIRegisterDescriptor {
-
-
- public RegisterDescriptor(Target target, Thread thread, StackFrame frame, String name, String fn, int pos, int depth) {
- super(target, thread, frame, name, fn, pos, depth);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.VariableDescriptor#getFullName()
- */
- @Override
- public String getFullName() {
- if (fFullName == null) {
- String n = getName();
- if (!n.startsWith("$")) { //$NON-NLS-1$
- fFullName = "$" + n; //$NON-NLS-1$
- }
- }
- return fFullName;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterGroup.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterGroup.java
deleted file mode 100644
index 0d2115ad7e6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterGroup.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-
-/**
- * RegisterGroup
- */
-public class RegisterGroup extends CObject implements ICDIRegisterGroup {
-
- String fName;
-
- /**
- * @param t
- */
- public RegisterGroup(Target t, String name) {
- super(t);
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup#getRegisterDescriptors()
- */
- @Override
- public ICDIRegisterDescriptor[] getRegisterDescriptors() throws CDIException {
- Target target = (Target)getTarget();
- Session session = (Session)target.getSession();
- RegisterManager regMgr = session.getRegisterManager();
- return regMgr.getRegisterDescriptors(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup#getName()
- */
- @Override
- public String getName() {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup#hasRegisters()
- */
- @Override
- public boolean hasRegisters() throws CDIException {
- return true;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java
deleted file mode 100644
index 84d4a5cbdf3..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentCD;
-import org.eclipse.cdt.debug.mi.core.command.MIExecArguments;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetEnvironment;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-
-/**
- */
-public class RuntimeOptions extends CObject implements ICDIRuntimeOptions {
-
- public RuntimeOptions(Target t) {
- super(t);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions#setArguments(String)
- */
- @Override
- public void setArguments(String[] args) throws CDIException {
- Target target = (Target)getTarget();
- if (args == null || args.length == 0) {
- return;
- }
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIExecArguments arguments = factory.createMIExecArguments(args);
- try {
- mi.postCommand(arguments);
- MIInfo info = arguments.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_args_target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_args") + e.getMessage()); //$NON-NLS-1$
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions#setEnvironment(Properties)
- */
- @Override
- public void setEnvironment(Properties props) throws CDIException {
- Target target = (Target)getTarget();
- if (props == null) {
- return;
- }
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- Iterator iterator = props.keySet().iterator();
- while (iterator.hasNext()) {
- String key = (String)iterator.next();
- String value = props.getProperty(key);
- String params[] = null;
- if (value == null || value.length() == 0) {
- params = new String[] {key};
- } else {
- params = new String[] {key, value};
- }
- MIGDBSetEnvironment set = factory.createMIGDBSetEnvironment(params);
- try {
- mi.postCommand(set);
- MIInfo info = set.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_args_target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_environment") + e.getMessage()); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions#setWorkingDirectory(String)
- */
- @Override
- public void setWorkingDirectory(String wd) throws CDIException {
- Target target = (Target)getTarget();
- if (wd == null || wd.length() == 0) {
- return;
- }
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIEnvironmentCD cd = factory.createMIEnvironmentCD(wd);
- try {
- mi.postCommand(cd);
- MIInfo info = cd.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_args_target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new CDIException(CdiResources.getString("cdi.RuntimeOptions.Unable_to_set_working_dir") + e.getMessage()); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java
deleted file mode 100644
index a1846d3dc29..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.output.MIShared;
-
-
-/**
- * Place holder for shared library info.
- */
-public class SharedLibrary extends CObject implements ICDISharedLibrary {
-
- MIShared miShared;
-
- public SharedLibrary(Target target, MIShared slib) {
- super(target);
- miShared = slib;
- }
-
- public void setMIShared(MIShared slib) {
- miShared = slib;
- }
-
- public MIShared getMIShared() {
- return miShared;
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary#getFileName()
- */
- @Override
- public String getFileName() {
- return miShared.getName();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary#getStartAddress()
- */
- @Override
- public BigInteger getStartAddress() {
- return MIFormat.getBigInteger(miShared.getFrom());
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary#getEndAddress()
- */
- @Override
- public BigInteger getEndAddress() {
- return MIFormat.getBigInteger(miShared.getTo());
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary#areSymbolsLoaded()
- */
- @Override
- public boolean areSymbolsLoaded() {
- return miShared.isRead();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary#loadSymbols()
- */
- @Override
- public void loadSymbols() throws CDIException {
- Target target = (Target)getTarget();
- SharedLibraryManager mgr = ((Session)target.getSession()).getSharedLibraryManager();
- mgr.loadSymbols(target, new ICDISharedLibrary[] { this });
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java
deleted file mode 100644
index 1550706b180..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SignalManager;
-import org.eclipse.cdt.debug.mi.core.output.MISigHandle;
-
-/**
- */
-public class Signal extends CObject implements ICDISignal {
-
- MISigHandle sig;
-
- public Signal(Target target, MISigHandle s) {
- super(target);
- sig = s;
- }
-
- public void setMISignal(MISigHandle s) {
- sig = s;
- }
-
- public MISigHandle getMISignal() {
- return sig;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignal#getMeaning()
- */
- @Override
- public String getDescription() {
- return sig.getDescription();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignal#getName()
- */
- @Override
- public String getName() {
- return sig.getName();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignal#handle()
- */
- @Override
- public void handle(boolean ignore, boolean stop) throws CDIException {
- SignalManager mgr = ((Session)getTarget().getSession()).getSignalManager();
- mgr.handle(this, ignore, stop);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignal#isIgnore()
- */
- @Override
- public boolean isIgnore() {
- return !sig.isPass();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDISignal#isStopSet()
- */
- @Override
- public boolean isStopSet() {
- return sig.isStop();
- }
-
- /**
- * Continue program giving it signal specified by the argument.
- */
- @Override
- public void signal() throws CDIException {
- getTarget().resume(this);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
deleted file mode 100644
index d4d604a124e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.math.BigInteger;
-import java.util.HashMap;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgument;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocalVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-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.CdiResources;
-import org.eclipse.cdt.debug.mi.core.cdi.Locator;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIExecFinish;
-import org.eclipse.cdt.debug.mi.core.command.MIExecReturn;
-import org.eclipse.cdt.debug.mi.core.output.MIFrame;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-
-/**
- */
-public class StackFrame extends CObject implements ICDIStackFrame {
-
- MIFrame frame;
- Thread cthread;
- int level;
- ICDIArgumentDescriptor[] argDescs;
- ICDILocalVariableDescriptor[] localDescs;
- Locator fLocator;
- /**
- *
- */
- private HashMap fTypeCache;
-
- /*
- *
- GDB/MI does not keep the stack level, from what we expect. In gdb, the
- highest stack is level 0 and lower stack as the highest level:
- -stack-list-frames
- ^done,stack=[frame={level="0 ",addr="0x0804845b",func="main",file="hello.c",line="24"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- -stack-list-frames
- ^done,stack=[frame={level="0 ",addr="0x08048556",func="main2",file="hello.c",line="58"},
- frame={level="1 ",addr="0x08048501",func="main",file="hello.c",line="41"},
- frame={level="2 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- This is of no use to us since the level is always "0". The level is necessary for example when
- doing recursive calls to make a distinction between frames.
- So in CDT this reverse the hidghest frame will have the highest number. In CDT:
- stack=[frame={level="2 ",addr="0x0804845b",func="main",file="hello.c",line="24"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
-
- stack=[frame={level="3 ",addr="0x08048556",func="main2",file="hello.c",line="58"},
- frame={level="2 ",addr="0x08048501",func="main",file="hello.c",line="41"},
- frame={level="1 ",addr="0x42017499",func="__libc_start_main",from="/lib/i686/libc.so.6"}]
- */
- public StackFrame(Thread thread, MIFrame f, int l) {
- super((Target)thread.getTarget());
- cthread = thread;
- frame = f;
- level = l;
- fTypeCache = new HashMap();
- }
-
- public MIFrame getMIFrame() {
- return frame;
- }
-
- public ICDIType getFromTypeCache(String typeName) {
- return (ICDIType)fTypeCache.get(typeName);
- }
- public void addToTypeCache(String typeName, ICDIType typeDefinition) {
- fTypeCache.put(typeName, typeDefinition);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getThread()
- */
- @Override
- public ICDIThread getThread() {
- return cthread;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getArgumentDescriptors()
- */
- @Override
- public ICDIArgumentDescriptor[] getArgumentDescriptors() throws CDIException {
- if (argDescs == null) {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- argDescs = mgr.getArgumentDescriptors(this);
- }
- return argDescs;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getLocalVariableDescriptors()
- */
- @Override
- public ICDILocalVariableDescriptor[] getLocalVariableDescriptors() throws CDIException {
- if (localDescs == null) {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- localDescs = mgr.getLocalVariableDescriptors(this);
- }
- return localDescs;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#createArgument(org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor)
- */
- @Override
- public ICDIArgument createArgument(ICDIArgumentDescriptor varDesc) throws CDIException {
- if (varDesc instanceof ArgumentDescriptor) {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- return mgr.createArgument((ArgumentDescriptor)varDesc);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#createLocalVariable(org.eclipse.cdt.debug.core.cdi.model.ICDILocalVariableDescriptor)
- */
- @Override
- public ICDILocalVariable createLocalVariable(ICDILocalVariableDescriptor varDesc) throws CDIException {
- if (varDesc instanceof ArgumentDescriptor) {
- return createArgument((ICDIArgumentDescriptor)varDesc);
- } else if (varDesc instanceof LocalVariableDescriptor) {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- return mgr.createLocalVariable((LocalVariableDescriptor)varDesc);
- }
- return null;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getLocation()
- */
- @Override
- public ICDILocator getLocator() {
- BigInteger addr = BigInteger.ZERO;
- if (frame != null) {
- if (fLocator == null) {
- String a = frame.getAddress();
- if (a != null) {
- addr = MIFormat.getBigInteger(a);
- }
- fLocator = new Locator(frame.getFile(),
- frame.getFunction(),
- frame.getLine(),
- addr);
- }
- return fLocator;
- }
- return new Locator("", "", 0, addr); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getLevel()
- */
- @Override
- public int getLevel() {
- return level;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#equals(ICDIStackFrame)
- */
- @Override
- public boolean equals(ICDIStackFrame stackframe) {
- if (stackframe instanceof StackFrame) {
- StackFrame stack = (StackFrame)stackframe;
- boolean equal = cthread != null &&
- cthread.equals(stack.getThread()) &&
- 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);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStepReturn#stepReturn()
- */
- @Override
- public void stepReturn() throws CDIException {
- finish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStepReturn#stepReturn(org.eclipse.cdt.debug.core.cdi.model.ICDIValue)
- */
- @Override
- public void stepReturn(ICDIValue value) throws CDIException {
- execReturn(value.toString());
- }
-
- /**
- */
- protected void finish() throws CDIException {
-
- ((Thread)getThread()).setCurrentStackFrame(this, false);
-
- Target target = (Target)getTarget();
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIExecFinish finish = factory.createMIExecFinish();
- try {
- miSession.postCommand(finish);
- MIInfo info = finish.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- */
- protected void execReturn(String value) throws CDIException {
-
- ((Thread)getThread()).setCurrentStackFrame(this, false);
-
- Target target = (Target)getTarget();
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIExecReturn ret;
- if (value == null) {
- ret = factory.createMIExecReturn();
- } else {
- ret = factory.createMIExecReturn(value);
- }
- try {
- miSession.postCommand(ret);
- MIInfo info = ret.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
deleted file mode 100644
index b9fd81b3cb8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
+++ /dev/null
@@ -1,1400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Ken Ryall (Nokia) - 175532 support the address to source location API
- * Alena Laskavaia (QNX) - Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.io.File;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.IAddress;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFileLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressToSource;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement3;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteMoveInstructionPointer;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIFunctionBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.CoreProcess;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIInferior;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.RxThread;
-import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-import org.eclipse.cdt.debug.mi.core.cdi.EventManager;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SessionObject;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.SignalManager;
-import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.command.CLIInfoLine;
-import org.eclipse.cdt.debug.mi.core.command.CLIInfoThreads;
-import org.eclipse.cdt.debug.mi.core.command.CLIJump;
-import org.eclipse.cdt.debug.mi.core.command.CLISignal;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataEvaluateExpression;
-import org.eclipse.cdt.debug.mi.core.command.MIExecContinue;
-import org.eclipse.cdt.debug.mi.core.command.MIExecNext;
-import org.eclipse.cdt.debug.mi.core.command.MIExecNextInstruction;
-import org.eclipse.cdt.debug.mi.core.command.MIExecRun;
-import org.eclipse.cdt.debug.mi.core.command.MIExecStep;
-import org.eclipse.cdt.debug.mi.core.command.MIExecStepInstruction;
-import org.eclipse.cdt.debug.mi.core.command.MIExecUntil;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBShowEndian;
-import org.eclipse.cdt.debug.mi.core.command.MITargetDetach;
-import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
-import org.eclipse.cdt.debug.mi.core.event.MIDetachedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadCreatedEvent;
-import org.eclipse.cdt.debug.mi.core.event.MIThreadExitEvent;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoLineInfo;
-import org.eclipse.cdt.debug.mi.core.output.CLIInfoThreadsInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIDataEvaluateExpressionInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIFrame;
-import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
-
-/**
- */
-public class Target extends SessionObject implements ICDITarget, ICDIBreakpointManagement3, ICDIAddressToSource, ICDIExecuteMoveInstructionPointer {
-
- MISession miSession;
- ICDITargetConfiguration fConfiguration;
- Thread[] noThreads = new Thread[0];
- Thread[] currentThreads;
- int currentThreadId;
- String fEndian = null;
- boolean suspended = true;
- boolean deferBreakpoints = true;
- final private Object lock = new Object();
-
- public Target(Session s, MISession mi) {
- super(s);
- miSession = mi;
- currentThreads = noThreads;
- }
-
- /**
- * Return lock object for target. Replacement for lockTarget and
- * releaseTarget methods.
- *
- *
- * @since 5.0
- */
- public Object getLock() {
- return lock;
- }
-
-
- public MISession getMISession() {
- return miSession;
- }
-
- public void setConfiguration(ICDITargetConfiguration configuration) {
- fConfiguration = configuration;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIObject#getTarget()
- */
- @Override
- public ICDITarget getTarget() {
- return this;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#setCurrentThread(ICDIThread)
- */
- public void setCurrentThread(ICDIThread cthread) throws CDIException {
- if (cthread instanceof Thread) {
- setCurrentThread(cthread, true);
- } else {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Unknown_thread")); //$NON-NLS-1$
- }
- }
-
- public void setCurrentThread(ICDIThread cthread, boolean doUpdate) throws CDIException {
- if (cthread instanceof Thread) {
- setCurrentThread((Thread)cthread, doUpdate);
- } else {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Unknown_thread")); //$NON-NLS-1$
- }
- }
-
- public synchronized void setSupended(boolean state) {
- suspended = state;
- notifyAll();
- }
-
- /**
- */
- public void setCurrentThread(Thread cthread, boolean doUpdate) throws CDIException {
-
- int id = cthread.getId();
- // No need to set thread id 0, it is a dummy thread.
- if (id == 0) {
- return;
- }
- // already the current thread?
- if (currentThreadId != id) {
- CommandFactory factory = miSession.getCommandFactory();
- MIThreadSelect select = factory.createMIThreadSelect(id);
- try {
- miSession.postCommand(select);
- MIThreadSelectInfo info = select.getMIThreadSelectInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- currentThreadId = info.getNewThreadId();
-
- // @^@^$*^$
- // GDB reset the currentFrame to some other level 0 when switching thread.
- // we need to reposition the current stack level.
- MIFrame miFrame = info.getFrame();
- if (miFrame != null) {
- int depth = cthread.getStackFrameCount();
- cthread.currentFrame = new StackFrame(cthread, miFrame, depth - miFrame.getLevel());
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
-
- Session session = (Session)getSession();
- // Resetting threads may change the value of
- // some variables like Register. Call an update()
- // To generate changeEvents.
- if (doUpdate) {
- RegisterManager regMgr = session.getRegisterManager();
- if (regMgr.isAutoUpdate()) {
- regMgr.update(this);
- }
- VariableManager varMgr = session.getVariableManager();
- if (varMgr.isAutoUpdate()) {
- varMgr.update(this);
- }
- }
- }
-
- // We should be allright now.
- if (currentThreadId != id) {
- // thread is gone. Generate a Thread destroyed.
- miSession.fireEvent(new MIThreadExitEvent(miSession, id));
- throw new CDIException(CdiResources.getString("cdi.model.Target.Cannot_switch_to_thread") + id); //$NON-NLS-1$
- }
- }
-
- /**
- * Called when stopping because of breakpoints etc ..
- */
- public synchronized void updateState(int newThreadId) {
- Thread[] oldThreads = currentThreads;
-
- // If we use "info threads" in getCThreads() this
- // will be overwritten. However if we use -stack-list-threads
- // it does not provide to the current thread
- synchronized (lock) {
- try {
- // get the new Threads.
- currentThreadId = newThreadId;
- currentThreads = getCThreads();
- } catch (CDIException e) {
- currentThreads = noThreads;
- }
- }
-
- // Fire CreatedEvent for new threads.
- // Replace the new threads with the old thread object
- // User may have old on to the old Thread object.
- List cList = new ArrayList(currentThreads.length);
- for (int i = 0; i < currentThreads.length; i++) {
- boolean found = false;
- for (int j = 0; j < oldThreads.length; j++) {
- if (currentThreads[i].getId() == oldThreads[j].getId()) {
- oldThreads[j].clearState();
- currentThreads[i] = oldThreads[j];
- found = true;
- break;
- }
- }
- if (!found) {
- cList.add(new Integer(currentThreads[i].getId()));
- }
- }
- if (!cList.isEmpty()) {
- MIThreadCreatedEvent[] events = new MIThreadCreatedEvent[cList.size()];
- for (int j = 0; j < events.length; j++) {
- int id = cList.get(j);
- events[j] = new MIThreadCreatedEvent(miSession, id);
- }
- miSession.fireEvents(events);
- }
-
- // Fire destroyedEvent for old threads.
- List dList = new ArrayList(oldThreads.length);
- for (int i = 0; i < oldThreads.length; i++) {
- boolean found = false;
- for (int j = 0; j < currentThreads.length; j++) {
- if (currentThreads[j].getId() == oldThreads[i].getId()) {
- found = true;
- break;
- }
- }
- if (!found) {
- dList.add(new Integer(oldThreads[i].getId()));
- }
- }
- if (!dList.isEmpty()) {
- MIThreadExitEvent[] events = new MIThreadExitEvent[dList.size()];
- for (int j = 0; j < events.length; j++) {
- int id = dList.get(j);
- events[j] = new MIThreadExitEvent(miSession, id);
- }
- miSession.fireEvents(events);
- }
- }
-
- /**
- * Do the real work of call -thread-list-ids.
- */
- public Thread[] getCThreads() throws CDIException {
- Thread[] cthreads = noThreads;
- synchronized (lock) {
- RxThread rxThread = miSession.getRxThread();
- rxThread.setEnableConsole(false);
- try {
- CommandFactory factory = miSession.getCommandFactory();
- CLIInfoThreads tids = factory.createCLIInfoThreads();
- // HACK/FIXME: gdb/mi thread-list-ids does not
- // show any newly create thread, we workaround by
- // issuing "info threads" instead.
- // MIThreadListIds tids = factory.createMIThreadListIds();
- // MIThreadListIdsInfo info = tids.getMIThreadListIdsInfo();
- miSession.postCommand(tids);
- CLIInfoThreadsInfo info = tids.getMIInfoThreadsInfo();
- int[] ids;
- String[] names;
- if (info == null) {
- ids = new int[0];
- names = new String[0];
- } else {
- ids = info.getThreadIds();
- names = info.getThreadNames();
- currentThreadId = info.getCurrentThread();
- }
- if (ids != null && ids.length > 0) {
- cthreads = new Thread[ids.length];
- // Ok that means it is a multiThreaded.
- if (names != null && names.length == ids.length) {
- for (int i = 0; i < ids.length; i++) {
- cthreads[i] = new Thread(this, ids[i], names[i]);
- }
- } else {
- for (int i = 0; i < ids.length; i++) {
- cthreads[i] = new Thread(this, ids[i]);
- }
- }
- } else {
- // Provide a dummy.
- cthreads = new Thread[]{new Thread(this, 0)};
- }
- // FIX: When attaching there is no thread selected
- // We will choose the first one as a workaround.
- if (currentThreadId == 0 && cthreads.length > 0) {
- setCurrentThread(cthreads[0], false);
- }
- } catch (MIException e) {
- // Do not throw anything in this case.
- throw new CDIException(e.getMessage());
- } finally {
- rxThread.setEnableConsole(true);
- }
- }
- return cthreads;
- }
-
- @Override
- public ICDIThread getCurrentThread() throws CDIException {
- ICDIThread[] threads = getThreads();
- for (int i = 0; i < threads.length; i++) {
- Thread cthread = (Thread)threads[i];
- if (cthread.getId() == currentThreadId) {
- return cthread;
- }
- }
- return null;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getThreads()
- */
- @Override
- public synchronized ICDIThread[] getThreads() throws CDIException {
- if (currentThreads.length == 0) {
- currentThreads = getCThreads();
- }
- return currentThreads;
- }
-
- public ICDIThread getThread(int tid) {
- Thread th = null;
- if (currentThreads != null) {
- for (int i = 0; i < currentThreads.length; i++) {
- Thread cthread = currentThreads[i];
- if (cthread.getId() == tid) {
- th = cthread;
- break;
- }
- }
- }
- return th;
- }
-
- public boolean isLittleEndian() throws CDIException {
- if (fEndian == null) {
- CommandFactory factory = miSession.getCommandFactory();
- MIGDBShowEndian endian = factory.createMIGDBShowEndian();
- try {
- miSession.postCommand(endian);
- MIGDBShowEndianInfo info = endian.getMIShowEndianInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- fEndian = info.isLittleEndian() ? "le" : "be"; //$NON-NLS-1$ //$NON-NLS-2$
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return fEndian.equals("le"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#restart()
- */
- @Override
- public void restart() throws CDIException {
- // Reset the inferior pid
- MIInferior inferior = getMISession().getMIInferior();
- int pid = inferior.resetInferiorPID();
- CommandFactory factory = miSession.getCommandFactory();
- MIExecRun run = factory.createMIExecRun(new String[0]);
- try {
- miSession.postCommand(run);
- MIInfo info = run.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- // Replace pid since we probably didn't actually restart
- inferior.setInferiorPID(pid);
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#stepInto()
- */
- @Override
- public void stepInto() throws CDIException {
- stepInto(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepInto(int)
- */
- @Override
- public void stepInto(int count) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIExecStep step = factory.createMIExecStep(count);
- try {
- miSession.postCommand(step);
- MIInfo info = step.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#stepIntoInstruction()
- */
- @Override
- public void stepIntoInstruction() throws CDIException {
- stepIntoInstruction(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepIntoInstruction(int)
- */
- @Override
- public void stepIntoInstruction(int count) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIExecStepInstruction stepi = factory.createMIExecStepInstruction(count);
- try {
- miSession.postCommand(stepi);
- MIInfo info = stepi.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
-
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#stepOver()
- */
- @Override
- public void stepOver() throws CDIException {
- stepOver(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepOver(int)
- */
- @Override
- public void stepOver(int count) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIExecNext next = factory.createMIExecNext(count);
- try {
- miSession.postCommand(next);
- MIInfo info = next.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#stepOverInstruction()
- */
- @Override
- public void stepOverInstruction() throws CDIException {
- stepOverInstruction(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepOverInstruction(int)
- */
- @Override
- public void stepOverInstruction(int count) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIExecNextInstruction nexti = factory.createMIExecNextInstruction(count);
- try {
- miSession.postCommand(nexti);
- MIInfo info = nexti.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#stepReturn()
- */
- public void stepReturn() throws CDIException {
- ((Thread)getCurrentThread()).getCurrentStackFrame().stepReturn();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#runUntil(ICDILocation)
- */
- @Override
- public void runUntil(ICDILocation location) throws CDIException {
- stepUntil(location);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepUntil(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- @Override
- public void stepUntil(ICDILocation location) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- String loc = null;
- File file = null;
- if (location instanceof ICDIFileLocation) {
- String filePath = ((ICDIFileLocation)location).getFile();
- if (filePath != null && filePath.length() > 0)
- file = new File(filePath);
- }
- if (location instanceof ICDILineLocation) {
- ICDILineLocation lineLocation = (ICDILineLocation)location;
- if (file != null) {
- loc = file.getName() + ":" + lineLocation.getLineNumber(); //$NON-NLS-1$
- }
- } else if (location instanceof ICDIFunctionLocation) {
- ICDIFunctionLocation funcLocation = (ICDIFunctionLocation)location;
- if (funcLocation.getFunction() != null && funcLocation.getFunction().length() > 0) {
- loc = funcLocation.getFunction();
- }
- if (file != null && loc != null) {
- loc = funcLocation.getFile() + ":" + loc; //$NON-NLS-1$
- }
- } else if (location instanceof ICDIAddressLocation) {
- ICDIAddressLocation addrLocation = (ICDIAddressLocation)location;
- if (!addrLocation.getAddress().equals(BigInteger.ZERO)) {
- loc = "*0x" + addrLocation.getAddress().toString(16); //$NON-NLS-1$
- }
- }
- // Throw an exception we do know where to go
- if (loc == null) {
- throw new CDIException(CdiResources.getString("cdi.mode.Target.Bad_location")); //$NON-NLS-1$
- }
- MIExecUntil until = factory.createMIExecUntil(loc);
- try {
- miSession.postCommand(until);
- MIInfo info = until.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#suspend()
- */
- @Override
- public void suspend() throws CDIException {
- try {
- miSession.getMIInferior().interrupt();
- // Wait till the EventManager tell us the go ahead
- long maxSec = miSession.getCommandTimeout()/1000 + 1;
- synchronized (this) {
- for (int i = 0; !suspended && i < maxSec; i++) {
- try {
- wait(1000);
- } catch (InterruptedException e) {
- }
- }
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#disconnect()
- */
- @Override
- public void disconnect() throws CDIException {
- // if Target is running try to suspend first.
- if (isRunning()) {
- try {
- ((EventManager)getSession().getEventManager()).allowProcessingEvents(false);
- suspend();
- } finally {
- ((EventManager)getSession().getEventManager()).allowProcessingEvents(true);
- }
- }
- CommandFactory factory = miSession.getCommandFactory();
- MITargetDetach detach = factory.createMITargetDetach();
- try {
- miSession.postCommand(detach);
- MIInfo info = detach.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- // Unfortunately -target-detach does not generate an
- // event so we do it here.
- miSession.fireEvent(new MIDetachedEvent(miSession, detach.getToken()));
- miSession.getMIInferior().setDisconnected();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#resume()
- */
- @Override
- public void resume() throws CDIException {
- resume(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- @Override
- public void resume(ICDILocation location) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- String loc = null;
- File file = null;
- if (location instanceof ICDIFileLocation) {
- String filePath = ((ICDIFileLocation)location).getFile();
- if (filePath != null && filePath.length() > 0)
- file = new File(filePath);
- }
- if (location instanceof ICDILineLocation) {
- ICDILineLocation lineLocation = (ICDILineLocation)location;
- if (file != null) {
- loc = file.getName() + ":" + lineLocation.getLineNumber(); //$NON-NLS-1$
- }
- } else if (location instanceof ICDIFunctionLocation) {
- ICDIFunctionLocation funcLocation = (ICDIFunctionLocation)location;
- if (funcLocation.getFunction() != null && funcLocation.getFunction().length() > 0) {
- loc = funcLocation.getFunction();
- }
- if (file != null && loc != null) {
- loc = funcLocation.getFile() + ":" + loc; //$NON-NLS-1$
- }
- } else if (location instanceof ICDIAddressLocation) {
- ICDIAddressLocation addrLocation = (ICDIAddressLocation)location;
- if (!addrLocation.getAddress().equals(BigInteger.ZERO)) {
- loc = "*0x" + addrLocation.getAddress().toString(16); //$NON-NLS-1$
- }
- }
- // Throw an exception we do know where to go
- if (loc == null) {
- throw new CDIException(CdiResources.getString("cdi.mode.Target.Bad_location")); //$NON-NLS-1$
- }
-
- CLIJump jump = factory.createCLIJump(loc);
- try {
- miSession.postCommand(jump);
- MIInfo info = jump.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteMoveInstructionPointer#moveInstructionPointer(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- /**
- * @since 6.0
- */
- @Override
- public void moveInstructionPointer(ICDILocation location) throws CDIException {
- // Most of this code was taken from our Resume()
- // method. The only differences are that we create a temporary
- // breakpoint for the location and set it before we post
- // the 'jump' command
- CommandFactory factory = miSession.getCommandFactory();
- LocationBreakpoint bkpt = null;
- String loc = null;
- File file = null;
- if (location instanceof ICDIFileLocation) {
- String filePath = ((ICDIFileLocation)location).getFile();
- if (filePath != null && filePath.length() > 0)
- file = new File(filePath);
- }
- if (location instanceof ICDILineLocation) {
- ICDILineLocation lineLocation = (ICDILineLocation)location;
- if (file != null) {
- loc = file.getName() + ":" + lineLocation.getLineNumber(); //$NON-NLS-1$
- }
- bkpt = new LineBreakpoint(this, ICBreakpointType.TEMPORARY, lineLocation, null, true);
- } else if (location instanceof ICDIAddressLocation) {
- ICDIAddressLocation addrLocation = (ICDIAddressLocation)location;
- if (!addrLocation.getAddress().equals(BigInteger.ZERO)) {
- loc = "*0x" + addrLocation.getAddress().toString(16); //$NON-NLS-1$
- }
- bkpt = new AddressBreakpoint(this, ICBreakpointType.TEMPORARY, addrLocation, null, true);
- }
- // Throw an exception we do know where to go
- if (loc == null) {
- throw new CDIException(CdiResources.getString("cdi.mode.Target.Bad_location")); //$NON-NLS-1$
- }
-
- // Set a temporary breakpoint at the location we're going
- // to do a 'jump' (resume from) operation
- Session session = (Session)getSession();
- session.getBreakpointManager().setLocationBreakpoint(bkpt);
-
- CLIJump jump = factory.createCLIJump(loc);
- try {
- miSession.postCommand(jump);
- MIInfo info = jump.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(org.eclipse.cdt.debug.core.cdi.model.ICDISignal)
- */
- @Override
- public void resume(ICDISignal signal) throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- CLISignal sig = factory.createCLISignal(signal.getName());
- try {
- miSession.postCommand(sig);
- MIInfo info = sig.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(boolean)
- */
- @Override
- public void resume(boolean passSignal) throws CDIException {
- if (miSession.getMIInferior().isRunning()) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Inferior_already_running")); //$NON-NLS-1$
- } else if (miSession.getMIInferior().isSuspended()) {
- if (passSignal) {
- CommandFactory factory = miSession.getCommandFactory();
- CLISignal signal = factory.createCLISignal("0"); //$NON-NLS-1$
- try {
- miSession.postCommand(signal);
- MIInfo info = signal.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- } else {
- continuation();
- }
- } else if (miSession.getMIInferior().isTerminated()) {
- restart();
- } else {
- restart();
- }
- }
-
- public void continuation() throws CDIException {
- CommandFactory factory = miSession.getCommandFactory();
- MIExecContinue cont = factory.createMIExecContinue();
- try {
- miSession.postCommand(cont);
- MIInfo info = cont.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#jump(ICDILocation)
- */
- @Override
- public void jump(ICDILocation location) throws CDIException {
- resume(location);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#signal()
- */
- @Override
- public void signal() throws CDIException {
- resume(true);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#signal(ICDISignal)
- */
- @Override
- public void signal(ICDISignal signal) throws CDIException {
- resume(signal);
- }
-
- @Override
- public String evaluateExpressionToString(ICDIStackFrame frame, String expressionText) throws CDIException {
- Target target = (Target)frame.getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame((StackFrame)frame, false);
- try {
- CommandFactory factory = miSession.getCommandFactory();
- MIDataEvaluateExpression evaluate =
- factory.createMIDataEvaluateExpression(expressionText);
- miSession.postCommand(evaluate);
- MIDataEvaluateExpressionInfo info =
- evaluate.getMIDataEvaluateExpressionInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
- }
- return info.getExpression();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#terminate()
- */
- @Override
- public void terminate() throws CDIException {
- try {
- miSession.getMIInferior().terminate();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#isTerminated()
- */
- @Override
- public boolean isTerminated() {
- return miSession.getMIInferior().isTerminated();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#isDisconnected()
- */
- @Override
- public boolean isDisconnected() {
- return !miSession.getMIInferior().isConnected();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return miSession.getMIInferior().isSuspended();
- }
-
- public boolean isRunning() {
- return miSession.getMIInferior().isRunning();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getProcess()
- */
- @Override
- public Process getProcess() {
- if (miSession.isCoreSession()) {
- return new CoreProcess();
- }
- return miSession.getMIInferior();
- }
-
- // Implementaton of ICDIBreapointManagement.
-
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setLineBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDILineLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- @Override
- public ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location,
- ICDICondition condition, boolean deferred) throws CDIException {
- return this.setLineBreakpoint(type, location, condition, deferred, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setFunctionBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- @Override
- public ICDIFunctionBreakpoint setFunctionBreakpoint(int type, ICDIFunctionLocation location,
- ICDICondition condition, boolean deferred) throws CDIException {
- return this.setFunctionBreakpoint(type, location, condition, deferred, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setAddressBreakpoint(int, org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- @Override
- public ICDIAddressBreakpoint setAddressBreakpoint(int type, ICDIAddressLocation location,
- ICDICondition condition, boolean deferred) throws CDIException {
- return this.setAddressBreakpoint(type, location, condition, deferred, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setWatchpoint(int, int, java.lang.String, org.eclipse.cdt.debug.core.cdi.ICDICondition)
- */
- @Override
- public ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
- ICDICondition condition) throws CDIException {
- return this.setWatchpoint(type, watchType, expression, condition, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement2#setWatchpoint(int, int, java.lang.String, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- @Override
- public ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
- ICDICondition condition, boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- Watchpoint bkpt = new Watchpoint(this, expression, type, watchType, condition, enabled);
- bMgr.setWatchpoint(bkpt);
- return bkpt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement2#setWatchpoint(int, int, java.lang.String, java.math.BigInteger, org.eclipse.cdt.debug.core.cdi.ICDICondition, boolean)
- */
- @Override
- public ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
- String memorySpace, BigInteger range, ICDICondition condition, boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- Watchpoint bkpt = new Watchpoint(this, expression, memorySpace, range, type, watchType, condition, enabled);
- bMgr.setWatchpoint(bkpt);
- return bkpt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#setExceptionBreakpoint(java.lang.String, boolean, boolean)
- */
- @Override
- public ICDIExceptionpoint setExceptionBreakpoint(String clazz, boolean stopOnThrow, boolean stopOnCatch)
- throws CDIException {
- throw new CDIException(CdiResources.getString("cdi.Common.Not_implemented")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#getBreakpoints()
- */
- @Override
- public ICDIBreakpoint[] getBreakpoints() throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.getBreakpoints(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#deleteBreakpoints(org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint[])
- */
- @Override
- public void deleteBreakpoints(ICDIBreakpoint[] breakpoints) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- bMgr.deleteBreakpoints(this, breakpoints);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement#deleteAllBreakpoints()
- */
- @Override
- public void deleteAllBreakpoints() throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- bMgr.deleteAllBreakpoints(this);
- }
-
- /*
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createCondition(int, java.lang.String, String)
- */
- @Override
- public ICDICondition createCondition(int ignoreCount, String expression) {
- return createCondition(ignoreCount, expression, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createCondition(int, java.lang.String, String)
- */
- @Override
- public ICDICondition createCondition(int ignoreCount, String expression, String[] tids) {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.createCondition(ignoreCount, expression, tids);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createLineLocation(java.lang.String, int)
- */
- @Override
- public ICDILineLocation createLineLocation(String file, int line) {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.createLineLocation(file, line);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createFunctionLocation(java.lang.String, java.lang.String)
- */
- @Override
- public ICDIFunctionLocation createFunctionLocation(String file, String function) {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.createFunctionLocation(file, function);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createLocation(long)
- */
- @Override
- public ICDIAddressLocation createAddressLocation(BigInteger address) {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.createAddressLocation(address);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getRuntimeOptions()
- */
- @Override
- public ICDIRuntimeOptions getRuntimeOptions() {
- return new RuntimeOptions(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpressionManagement#createExpression(java.lang.String)
- */
- @Override
- public ICDIExpression createExpression(String code) throws CDIException {
- ExpressionManager expMgr = ((Session)getSession()).getExpressionManager();
- return expMgr.createExpression(this, code);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpressionManagement#getExpressions()
- */
- @Override
- public ICDIExpression[] getExpressions() throws CDIException {
- ExpressionManager expMgr = ((Session)getSession()).getExpressionManager();
- return expMgr.getExpressions(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpressionManagement#destroyExpression(org.eclipse.cdt.debug.core.cdi.model.ICDIExpression[])
- */
- @Override
- public void destroyExpressions(ICDIExpression[] expressions) throws CDIException {
- ExpressionManager expMgr = ((Session)getSession()).getExpressionManager();
- expMgr.destroyExpressions(this, expressions);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpressionManagement#destroyAllExpression()
- */
- @Override
- public void destroyAllExpressions() throws CDIException {
- ExpressionManager expMgr = ((Session)getSession()).getExpressionManager();
- expMgr.destroyAllExpressions(this);
- }
-
- /**
- * Returns the array of signals defined for this target.
- *
- * @return the array of signals
- * @throws CDIException on failure. Reasons include:
- */
- @Override
- public ICDISignal[] getSignals() throws CDIException {
- SignalManager sigMgr = ((Session)getSession()).getSignalManager();
- return sigMgr.getSignals(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#setSourcePaths(java.lang.String[])
- */
- @Override
- public void setSourcePaths(String[] srcPaths) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- srcMgr.setSourcePaths(this, srcPaths);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getSourcePaths()
- */
- @Override
- public String[] getSourcePaths() throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getSourcePaths(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.math.BigInteger, java.math.BigInteger)
- */
- @Override
- public ICDIInstruction[] getInstructions(BigInteger startAddress, BigInteger endAddress) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getInstructions(this, startAddress, endAddress);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.lang.String, int)
- */
- @Override
- public ICDIInstruction[] getInstructions(String filename, int linenum) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getInstructions(this, filename, linenum);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.lang.String, int, int)
- */
- @Override
- public ICDIInstruction[] getInstructions(String filename, int linenum, int lines) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getInstructions(this, filename, linenum, lines);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.math.BigInteger, java.math.BigInteger)
- */
- @Override
- public ICDIMixedInstruction[] getMixedInstructions(BigInteger startAddress, BigInteger endAddress) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getMixedInstructions(this, startAddress, endAddress);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.lang.String, int)
- */
- @Override
- public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getMixedInstructions(this, filename, linenum);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.lang.String, int, int)
- */
- @Override
- public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum, int lines) throws CDIException {
- SourceManager srcMgr = ((Session)getSession()).getSourceManager();
- return srcMgr.getMixedInstructions(this, filename, linenum, lines);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlockManagement#createMemoryBlock(java.lang.String, int)
- */
- @Override
- public ICDIMemoryBlock createMemoryBlock(String address, int units, int wordSize) throws CDIException {
- MemoryManager memMgr = ((Session)getSession()).getMemoryManager();
- return memMgr.createMemoryBlock(this, address, units, wordSize);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlockManagement#removeBlocks(org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock[])
- */
- @Override
- public void removeBlocks(ICDIMemoryBlock[] memoryBlocks) throws CDIException {
- MemoryManager memMgr = ((Session)getSession()).getMemoryManager();
- memMgr.removeBlocks(this, memoryBlocks);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlockManagement#removeAllBlocks()
- */
- @Override
- public void removeAllBlocks() throws CDIException {
- MemoryManager memMgr = ((Session)getSession()).getMemoryManager();
- memMgr.removeAllBlocks(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlockManagement#getMemoryBlocks()
- */
- @Override
- public ICDIMemoryBlock[] getMemoryBlocks() throws CDIException {
- MemoryManager memMgr = ((Session)getSession()).getMemoryManager();
- return memMgr.getMemoryBlocks(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibraryManagement#getSharedLibraries()
- */
- @Override
- public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
- SharedLibraryManager sharedMgr = ((Session)getSession()).getSharedLibraryManager();
- return sharedMgr.getSharedLibraries(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getGlobalVariableDescriptors(java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public ICDIGlobalVariableDescriptor getGlobalVariableDescriptors(String filename, String function, String name) throws CDIException {
- VariableManager varMgr = ((Session)getSession()).getVariableManager();
- return varMgr.getGlobalVariableDescriptor(this, filename, function, name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getRegisterGroups()
- */
- @Override
- public ICDIRegisterGroup[] getRegisterGroups() throws CDIException {
- RegisterManager regMgr = ((Session)getSession()).getRegisterManager();
- return regMgr.getRegisterGroups(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getConfiguration()
- */
- @Override
- public ICDITargetConfiguration getConfiguration() {
- if (fConfiguration == null) {
- if (miSession.isProgramSession()) {
- fConfiguration = new TargetConfiguration(this);
- } else if (miSession.isAttachSession()) {
- fConfiguration = new TargetConfiguration(this);
- } else if (miSession.isCoreSession()) {
- fConfiguration = new CoreFileConfiguration(this);
- } else {
- fConfiguration = new TargetConfiguration(this);
- }
- }
- return fConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createGlobalVariable(org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor)
- */
- @Override
- public ICDIGlobalVariable createGlobalVariable(ICDIGlobalVariableDescriptor varDesc) throws CDIException {
- if (varDesc instanceof GlobalVariableDescriptor) {
- VariableManager varMgr = ((Session)getSession()).getVariableManager();
- return varMgr.createGlobalVariable((GlobalVariableDescriptor)varDesc);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#createRegister(org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor)
- */
- @Override
- public ICDIRegister createRegister(ICDIRegisterDescriptor varDesc) throws CDIException {
- if (varDesc instanceof RegisterDescriptor) {
- Session session = (Session)getTarget().getSession();
- RegisterManager mgr = session.getRegisterManager();
- return mgr.createRegister((RegisterDescriptor)varDesc);
- }
- return null;
- }
-
- public void deferBreakpoints(boolean defer) {
- this.deferBreakpoints = defer;
- }
-
- public boolean areBreakpointsDeferred() {
- return this.deferBreakpoints;
- }
-
- public void enableVerboseMode(boolean enabled) {
- miSession.enableVerboseMode(enabled);
- }
-
- public boolean isVerboseModeEnabled() {
- return miSession.isVerboseModeEnabled();
- }
-
- @Override
- public ICDIAddressBreakpoint setAddressBreakpoint(int type, ICDIAddressLocation location, ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.setAddressBreakpoint(this, type, location, condition, deferred, enabled);
- }
-
- @Override
- public ICDIExceptionpoint setExceptionBreakpoint(String clazz, boolean stopOnThrow, boolean stopOnCatch, boolean enabled) throws CDIException {
- throw new CDIException(CdiResources.getString("cdi.Common.Not_implemented")); //$NON-NLS-1$
- }
-
- @Override
- public ICDIFunctionBreakpoint setFunctionBreakpoint(int type, ICDIFunctionLocation location, ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.setFunctionBreakpoint(this, type, location, condition, deferred, enabled);
- }
-
- @Override
- public ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location, ICDICondition condition, boolean deferred, boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.setLineBreakpoint(this, type, location, condition, deferred, enabled);
- }
-
- @Override
- public IMappedSourceLocation getSourceForAddress(IAddress address) throws CDIException {
- // Ask gdb for info for this address, use the module list
- // to determine the executable.
- CommandFactory factory = miSession.getCommandFactory();
- CLIInfoLine cmd = factory.createCLIInfoLine(address);
- try {
- miSession.postCommand(cmd);
- CLIInfoLineInfo info = cmd.getMIInfoLineInfo();
- String fileName = ""; //$NON-NLS-1$
- ICDISharedLibrary[] libs = getSharedLibraries();
- BigInteger sourceAddress = address.getValue();
- for (int i = 0; i < libs.length; i++) {
- if (sourceAddress.compareTo(libs[i].getStartAddress()) > 0 && sourceAddress.compareTo(libs[i].getEndAddress()) < 0)
- {
- fileName = libs[i].getFileName();
- }
- }
- return new MappedSourceLocation(address, info, fileName);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- @Override
- public ICDIEventBreakpoint setEventBreakpoint(String type, String arg, int cdiType, ICDICondition condition, boolean deferred,
- boolean enabled) throws CDIException {
- BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
- return bMgr.setEventBreakpoint(this,type,arg,condition,enabled);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/TargetConfiguration.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/TargetConfiguration.java
deleted file mode 100644
index 80e49319f9a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/TargetConfiguration.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDITargetConfiguration;
-import org.eclipse.cdt.debug.mi.core.MIInferior;
-import org.eclipse.cdt.debug.mi.core.MIProcess;
-import org.eclipse.cdt.debug.mi.core.MISession;
-
-/**
- */
-public class TargetConfiguration extends CObject implements ICDITargetConfiguration {
-
- public TargetConfiguration(Target target) {
- super(target);
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsBreakpoints()
- */
- @Override
- public boolean supportsBreakpoints() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsDisconnect()
- */
- @Override
- public boolean supportsDisconnect() {
- MISession miSession = ((Target)getTarget()).getMISession();
- return miSession.isAttachSession() ? true : false;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsExpressionEvaluation()
- */
- @Override
- public boolean supportsExpressionEvaluation() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsInstructionStepping()
- */
- @Override
- public boolean supportsInstructionStepping() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsMemoryModification()
- */
- @Override
- public boolean supportsMemoryModification() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsMemoryRetrieval()
- */
- @Override
- public boolean supportsMemoryRetrieval() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsRegisterModification()
- */
- @Override
- public boolean supportsRegisterModification() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsRegisters()
- */
- @Override
- public boolean supportsRegisters() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSharedLibrary()
- */
- @Override
- public boolean supportsSharedLibrary() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsRestart()
- */
- @Override
- public boolean supportsRestart() {
- MISession miSession = ((Target)getTarget()).getMISession();
- return miSession.isAttachSession() ? false : true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsStepping()
- */
- @Override
- public boolean supportsStepping() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsTerminate()
- */
- @Override
- public boolean supportsTerminate() {
- return true;
-
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsResume()
- */
- @Override
- public boolean supportsResume() {
- return true;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSuspend()
- */
- @Override
- public boolean supportsSuspend() {
- String os = null;
- try {
- os = System.getProperty("os.name", ""); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (SecurityException e) {
- }
- Target target = (Target)getTarget();
- MISession miSession = target.getMISession();
- MIProcess gdb = miSession.getGDBProcess();
- MIInferior inferior = miSession.getMIInferior();
- if (gdb.canInterrupt(inferior)) {
- // If we attached sending a control-c,
- // seems to alays work.
- if (miSession.isAttachSession()) {
- return true;
- }
-
- // If we have a pty, sending a control-c will work
- // except for solaris.
- if (os.equals("SunOS")) { //$NON-NLS-1$
- if (inferior.getTTY() != null) {
- // FIXME: bug in Solaris gdb when using -tty, sending a control-c
- // does not work.
- return false;
- }
- return true;
- }
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#terminateSessionOnExit()
- */
- public boolean terminateSessionOnExit() {
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
deleted file mode 100644
index 17f16745830..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Alena Laskavaia (QNX) - Bug 221224
- * Oyvind Harboe (oyvind.harboe@zylin.com) - Bug 86676
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteMoveInstructionPointer;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThreadStorage;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThreadStorageDescriptor;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIStackInfoDepth;
-import org.eclipse.cdt.debug.mi.core.command.MIStackListFrames;
-import org.eclipse.cdt.debug.mi.core.command.MIStackSelectFrame;
-import org.eclipse.cdt.debug.mi.core.output.MIFrame;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIStackInfoDepthInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIStackListFramesInfo;
-
-/**
- */
-public class Thread extends CObject implements ICDIThread, ICDIExecuteMoveInstructionPointer {
-
- static ICDIStackFrame[] noStack = new ICDIStackFrame[0];
- int id;
- String name;
- StackFrame currentFrame;
- List currentFrames;
- int stackdepth = 0;
-
- final public static int STACKFRAME_DEFAULT_DEPTH = 200;
-
- public Thread(Target target, int threadId) {
- this(target, threadId, null);
- }
-
- public Thread(Target target, int threadId, String threadName) {
- super(target);
- id = threadId;
- name = threadName;
- }
-
- public int getId() {
- return id;
- }
-
- public void clearState() {
- stackdepth = 0;
- currentFrame = null;
- currentFrames = null;
- }
-
- @Override
- public String toString() {
- String str = Integer.toString(id);
- if (name != null) {
- str += " " + name; //$NON-NLS-1$
- }
- return str;
- }
-
- public void updateState() {
- try {
- getCurrentStackFrame();
- } catch (CDIException e) {
- }
- }
-
- public StackFrame getCurrentStackFrame() throws CDIException {
- if (currentFrame == null) {
- ICDIStackFrame[] frames = getStackFrames(0, 0);
- if (frames.length > 0) {
- currentFrame = (StackFrame)frames[0];
- }
- }
- return currentFrame;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#getStackFrames()
- */
- @Override
- public ICDIStackFrame[] getStackFrames() throws CDIException {
-
- // get the frames depth
- int depth = getStackFrameCount();
-
- // refresh if we have nothing or if we have just a subset get everything.
- if (currentFrames == null || currentFrames.size() < depth) {
- currentFrames = new ArrayList();
- Target target = (Target)getTarget();
- ICDIThread currentThread = target.getCurrentThread();
- synchronized (target.getLock()) {
- try {
- target.setCurrentThread(this, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIStackListFrames frames = factory.createMIStackListFrames();
- mi.postCommand(frames);
- MIStackListFramesInfo info = frames.getMIStackListFramesInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MIFrame[] miFrames = info.getMIFrames();
- for (int i = 0; i < miFrames.length; i++) {
- currentFrames.add(new StackFrame(this, miFrames[i], depth - miFrames[i].getLevel()));
- }
- } catch (MIException e) {
- //throw new CDIException(e.getMessage());
- //System.out.println(e);
- } catch (CDIException e) {
- //throw e;
- //System.out.println(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- }
- }
- // assign the currentFrame if it was not done yet.
- if (currentFrame == null) {
- for (int i = 0; i < currentFrames.size(); i++) {
- ICDIStackFrame stack = (ICDIStackFrame) currentFrames.get(i);
- if (stack.getLevel() == depth) {
- currentFrame = (StackFrame)stack;
- }
- }
- }
- }
- return (ICDIStackFrame[]) currentFrames.toArray(noStack);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#getStackFrames()
- */
- @Override
- public int getStackFrameCount() throws CDIException {
- if (stackdepth == 0) {
- Target target = (Target)getTarget();
- ICDIThread currentThread = target.getCurrentThread();
- synchronized (target.getLock()) {
- try {
- target.setCurrentThread(this, false);
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIStackInfoDepth depth = factory.createMIStackInfoDepth();
- mi.postCommand(depth);
- MIStackInfoDepthInfo info = null;
- try {
- // Catch the first exception gdb can recover the second time.
- info = depth.getMIStackInfoDepthInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- stackdepth = info.getDepth();
- } catch (MIException e) {
- // First try fails, retry. gdb patches up the corrupt frame
- // so retry should give us a frame count that is safe.
- depth = factory.createMIStackInfoDepth();
- mi.postCommand(depth);
- info = depth.getMIStackInfoDepthInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- stackdepth = info.getDepth();
- if (stackdepth > 0) {
- stackdepth--;
- }
- }
- } catch (MIException e) {
- /* GDB has a bug where it fails to evaluate the stack depth, this must, ultimately
- * be fixed in GDB. GNAT nr 2395
- *
- * http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2395
- */
- // Bug#86676 fix:
- //
- // 1 is safe
- stackdepth = 1;
- } finally {
- target.setCurrentThread(currentThread, false);
- }
- }
- }
- return stackdepth;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#getStackFrames()
- */
- @Override
- public ICDIStackFrame[] getStackFrames(int low, int high) throws CDIException {
- if (currentFrames == null || currentFrames.size() < high) {
- currentFrames = new ArrayList();
- Target target = (Target) getTarget();
- ICDIThread currentThread = target.getCurrentThread();
- synchronized (target.getLock()) {
- try {
- target.setCurrentThread(this, false);
- int depth = getStackFrameCount();
- int upperBound;
- // try to get the largest subset.
- // if what the user asks is smaller then the depth
- // try to cache things by getting the min(depth,STACKFRAME_DEFAULT_DEPTH)
- // else give fetch the entire thing.
- if (high < depth) {
- upperBound = Math.min(depth, STACKFRAME_DEFAULT_DEPTH);
- } else {
- upperBound = depth;
- }
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIStackListFrames frames = factory.createMIStackListFrames(0, upperBound);
- mi.postCommand(frames);
- MIStackListFramesInfo info = frames.getMIStackListFramesInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- MIFrame[] miFrames = info.getMIFrames();
- for (int i = 0; i < miFrames.length; i++) {
- currentFrames.add(new StackFrame(this, miFrames[i], depth - miFrames[i].getLevel()));
- }
- } catch (MIException e) {
- //throw new CDIException(e.getMessage());
- //System.out.println(e);
- } catch (CDIException e) {
- //throw e;
- //System.out.println(e);
- } finally {
- target.setCurrentThread(currentThread, false);
- }
- }
- // take time to assign the currentFrame, if it is in the set
- if (currentFrame == null) {
- for (int i = 0; i < currentFrames.size(); i++) {
- StackFrame f = (StackFrame) currentFrames.get(i);
- if (f.getMIFrame().getLevel() == 0) {
- currentFrame =f;
- }
- }
- }
- }
- List list = ((high - low + 1) <= currentFrames.size()) ? currentFrames.subList(low, high + 1) : currentFrames;
- return (ICDIStackFrame[])list.toArray(noStack);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#setCurrentStackFrame(ICDIStackFrame, boolean)
- */
- public void setCurrentStackFrame(StackFrame stackframe, boolean doUpdate) throws CDIException {
-
- // Assert we should assert that the stackframe is one of our frames.
-
- int frameLevel = 0;
- if (stackframe != null) {
- frameLevel = stackframe.getLevel();
- }
-
- // Check to see if we are already at this level
- if (currentFrame != null && currentFrame.getLevel() == frameLevel) {
- if (stackframe != null) {
- Thread aThread = (Thread)stackframe.getThread();
- if (aThread != null && aThread.getId() == getId()) {
- // noop
- return;
- }
- }
- }
-
- Target target = (Target)getTarget();
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- // Need the GDB/MI view of level which is the reverse, i.e. the highest level is 0
- // See comment in StackFrame constructor.
- int miLevel = getStackFrameCount() - frameLevel;
- MIStackSelectFrame frame = factory.createMIStackSelectFrame(miLevel);
- // Set ourself as the current thread first.
- synchronized (target.getLock()) {
- try {
- target.setCurrentThread(this, doUpdate);
- mi.postCommand(frame);
- MIInfo info = frame.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- currentFrame = stackframe;
- // Resetting stackframe may change the value of
- // some variables like registers. Call an update()
- // To generate changeEvents.
- if (doUpdate) {
- Session session = (Session) target.getSession();
- RegisterManager regMgr = session.getRegisterManager();
- if (regMgr.isAutoUpdate()) {
- regMgr.update(target);
- }
- VariableManager varMgr = session.getVariableManager();
- if (varMgr.isAutoUpdate()) {
- varMgr.update(target);
- }
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#stepInto()
- */
- @Override
- public void stepInto() throws CDIException {
- stepInto(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepInto(int)
- */
- @Override
- public void stepInto(int count) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.stepInto(count);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#stepIntoInstruction()
- */
- @Override
- public void stepIntoInstruction() throws CDIException {
- stepIntoInstruction(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepIntoInstruction(int)
- */
- @Override
- public void stepIntoInstruction(int count) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.stepIntoInstruction(count);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#stepOver()
- */
- @Override
- public void stepOver() throws CDIException {
- stepOver(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepOver(int)
- */
- @Override
- public void stepOver(int count) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.stepOver(count);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#stepOverInstruction()
- */
- @Override
- public void stepOverInstruction() throws CDIException {
- stepOverInstruction(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepOverInstruction(int)
- */
- @Override
- public void stepOverInstruction(int count) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.stepOverInstruction(count);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#stepReturn()
- */
- @Override
- public void stepReturn() throws CDIException {
- getCurrentStackFrame().stepReturn();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#runUntil(ICDILocation)
- */
- @Override
- public void runUntil(ICDILocation location) throws CDIException {
- stepUntil(location);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteStep#stepUntil(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- @Override
- public void stepUntil(ICDILocation location) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.stepUntil(location);
- }
-}
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#isSuspended()
- */
- @Override
- public boolean isSuspended() {
- return getTarget().isSuspended();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#suspend()
- */
- @Override
- public void suspend() throws CDIException {
- getTarget().suspend();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#resume()
- */
- @Override
- public void resume() throws CDIException {
- resume(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(boolean)
- */
-
- @Override
- public void resume(boolean passSignal) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.resume(passSignal);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- @Override
- public void resume(ICDILocation location) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.resume(location);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteResume#resume(org.eclipse.cdt.debug.core.cdi.model.ICDISignal)
- */
- @Override
- public void resume(ICDISignal signal) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.resume(signal);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#jump(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- @Override
- public void jump(ICDILocation location) throws CDIException {
- resume(location);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#signal()
- */
- @Override
- public void signal() throws CDIException {
- resume(false);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#signal(org.eclipse.cdt.debug.core.cdi.model.ICDISignal)
- */
- @Override
- public void signal(ICDISignal signal) throws CDIException {
- resume(signal);
- }
-
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#equals(ICDIThread)
- */
- @Override
- public boolean equals(ICDIThread thread) {
- if (thread instanceof Thread) {
- Thread cthread = (Thread) thread;
- return id == cthread.getId();
- }
- return super.equals(thread);
- }
-
- public ICDIBreakpoint[] getBreakpoints() throws CDIException {
- Target target = (Target)getTarget();
- ICDIBreakpoint[] bps = target.getBreakpoints();
- ArrayList list = new ArrayList(bps.length);
- for (int i = 0; i < bps.length; i++) {
- ICDICondition condition = bps[i].getCondition();
- if (condition == null) {
- continue;
- }
- String[] threadIds = condition.getThreadIds();
- for (int j = 0; j < threadIds.length; j++) {
- int tid = 0;
- try {
- tid = Integer.parseInt(threadIds[j]);
- } catch (NumberFormatException e) {
- //
- }
- if (tid == getId()) {
- list.add(bps[i]);
- }
- }
- }
- return (ICDIBreakpoint[]) list.toArray(new ICDIBreakpoint[list.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#getThreadStorageDescriptors()
- */
- @Override
- public ICDIThreadStorageDescriptor[] getThreadStorageDescriptors() throws CDIException {
- Session session = (Session)getTarget().getSession();
- VariableManager varMgr = session.getVariableManager();
- return varMgr.getThreadStorageDescriptors(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#createThreadStorage(org.eclipse.cdt.debug.core.cdi.model.ICDIThreadStorageDescriptor)
- */
- @Override
- public ICDIThreadStorage createThreadStorage(ICDIThreadStorageDescriptor varDesc) throws CDIException {
- if (varDesc instanceof ThreadStorageDescriptor) {
- Session session = (Session)getTarget().getSession();
- VariableManager varMgr = session.getVariableManager();
- return varMgr.createThreadStorage((ThreadStorageDescriptor)varDesc);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIExecuteMoveInstructionPointer#moveInstructionPointer(org.eclipse.cdt.debug.core.cdi.ICDILocation)
- */
- /**
- * @since 6.0
- */
- @Override
- public void moveInstructionPointer(ICDILocation location) throws CDIException {
- Target target = (Target)getTarget();
- synchronized(target.getLock()) {
- target.setCurrentThread(this);
- target.moveInstructionPointer(location);
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java
deleted file mode 100644
index b8028e7000c..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIThreadStorage;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-
-/**
- * ThreadStorage
- */
-public class ThreadStorage extends Variable implements ICDIThreadStorage {
-
- /**
- * @param obj
- * @param v
- */
- public ThreadStorage(VariableDescriptor obj, MIVarCreate v) {
- super(obj, v);
- }
-
- /**
- * @param target
- * @param thread
- * @param frame
- * @param n
- * @param q
- * @param pos
- * @param depth
- * @param v
- */
- public ThreadStorage(Target target, Thread thread, StackFrame frame,
- String n, String q, int pos, int depth, MIVar miVar) {
- super(target, thread, frame, n, q, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createVariable(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int, org.eclipse.cdt.debug.mi.core.output.MIVar)
- */
- @Override
- protected Variable createVariable(Target target, Thread thread,
- StackFrame frame, String name, String fullName, int pos, int depth,
- MIVar miVar) {
- return new Register(target, thread, frame, name, fullName, pos, depth, miVar);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.core.cdi.model.Variable#createDescriptor(org.eclipse.cdt.debug.mi.core.cdi.model.Target, org.eclipse.cdt.debug.mi.core.cdi.model.Thread, org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame, java.lang.String, java.lang.String, int, int)
- */
- @Override
- protected VariableDescriptor createDescriptor( Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth ) {
- return new ThreadStorageDescriptor(target, thread, frame, n, fn, pos, depth);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorageDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorageDescriptor.java
deleted file mode 100644
index 37fa8590c10..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorageDescriptor.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.model.ICDIThreadStorageDescriptor;
-
-/**
- * ThreadStorageDescriptor
- */
-public class ThreadStorageDescriptor extends VariableDescriptor implements
- ICDIThreadStorageDescriptor {
-
- /**
- * @param target
- * @param thread
- * @param stack
- * @param n
- * @param fn
- * @param pos
- * @param depth
- */
- public ThreadStorageDescriptor(Target target, Thread thread,
- StackFrame stack, String n, String fn, int pos, int depth) {
- super(target, thread, stack, n, fn, pos, depth);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
deleted file mode 100644
index 2669d17a13e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIVarEvaluateExpression;
-import org.eclipse.cdt.debug.mi.core.output.MIVarEvaluateExpressionInfo;
-
-/**
- */
-public class Value extends CObject implements ICDIValue {
-
- protected Variable fVariable;
-
- /**
- * Indicates whether this Value object is for a C++ reference variable. If
- * it is, then some decoding is needed on the value string we get from gdb,
- * since it will contain two things: the address of the variable being
- * referenced and the value.
- * @since 6.0
- */
- protected boolean fIsReference;
-
- public Value(Variable v) {
- super((Target)v.getTarget());
- fVariable = v;
- }
-
- protected Variable getVariable() throws CDIException {
- return fVariable;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getTypeName()
- */
- @Override
- public String getTypeName() throws CDIException {
- return getVariable().getTypeName();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getValueString()
- */
- @Override
- public String getValueString() throws CDIException {
- // make sure the variable is updated.
- if (! getVariable().isUpdated()) {
- getVariable().update();
- }
-
- String result = ""; //$NON-NLS-1$
- MISession mi = ((Target)getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarEvaluateExpression var =
- factory.createMIVarEvaluateExpression(getVariable().getMIVar().getVarName());
- try {
- mi.postCommand(var);
- MIVarEvaluateExpressionInfo info = var.getMIVarEvaluateExpressionInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- result = info.getValue();
-
- // Reference variables get back a string with two things: the address of the
- // variable being referenced and the value of the variable. The expected
- // format is, by example (for a float&): "@0x22cc98: 3.19616001e-39"
- // We need to dig out the latter.
- if (fIsReference) {
- if (result.startsWith("@0x")) { //$NON-NLS-1$
- int index = result.indexOf(':');
- if (index > 0 && ((index + 1) < result.length())) {
- result = result.substring(index+1).trim();
- }
- }
- }
- } catch (MIException e) {
- throw new CDIException(e.getMessage());
- }
- return result;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getVariables()
- */
- @Override
- public int getChildrenNumber() throws CDIException {
- return getVariable().getMIVar().getNumChild();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getVariables()
- */
- @Override
- public boolean hasChildren() throws CDIException {
- /*
- int number = 0;
- MISession mi = getCTarget().getCSession().getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarInfoNumChildren children =
- factory.createMIVarInfoNumChildren(variable.getMIVar().getVarName());
- try {
- mi.postCommand(children);
- MIVarInfoNumChildrenInfo info = children.getMIVarInfoNumChildrenInfo();
- if (info == null) {
- throw new CDIException("No answer");
- }
- number = info.getChildNumber();
- } catch (MIException e) {
- throw new CDIException(e.getMessage());
- }
- return (number > 0);
- */
- return (getChildrenNumber() > 0);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getVariables()
- */
- @Override
- public ICDIVariable[] getVariables() throws CDIException {
- return getVariable().getChildren();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getType()
- */
- @Override
- public ICDIType getType() throws CDIException {
- return getVariable().getType();
- }
-
- /**
- * Call this after construction with 'true' if the Value is for a reference
- * variable. See {@link #fIsReference}.
- *
- * Ideally, this property would be passed to the constructor. However
- * introducing it that way at this point in time would cause a lot of churn
- * in the codebase, since this class is not directly instantiated, and it
- * has many subclasses.
- * @since 6.0
- */
- public void setIsReference(boolean isReference) {
- fIsReference = isReference;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
deleted file mode 100644
index c219d35b777..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFormat;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Format;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ArrayValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.DoubleValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.EnumValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.FloatValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.FunctionValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.IncompleteType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.IntValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.LongLongValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.LongValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.PointerValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ReferenceValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.ShortValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.StructValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.WCharValue;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIVarAssign;
-import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
-import org.eclipse.cdt.debug.mi.core.command.MIVarInfoExpression;
-import org.eclipse.cdt.debug.mi.core.command.MIVarInfoType;
-import org.eclipse.cdt.debug.mi.core.command.MIVarListChildren;
-import org.eclipse.cdt.debug.mi.core.command.MIVarSetFormat;
-import org.eclipse.cdt.debug.mi.core.command.MIVarShowAttributes;
-import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
-import org.eclipse.cdt.debug.mi.core.output.MIInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVar;
-import org.eclipse.cdt.debug.mi.core.output.MIVarCreateInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarInfoExpressionInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarInfoTypeInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarListChildrenInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIVarShowAttributesInfo;
-
-/**
- */
-public abstract class Variable extends VariableDescriptor implements ICDIVariable {
- private static final ICDIVariable[] NO_CHILDREN = new ICDIVariable[0];
- protected MIVarCreate fVarCreateCMD;
- protected MIVar fMIVar;
- Value value;
- public ICDIVariable[] children = NO_CHILDREN;
- String editable = null;
- String language;
- boolean isFake = false;
- boolean isUpdated = true;
- private String hexAddress;
-
- public Variable(VariableDescriptor obj, MIVarCreate var) {
- super(obj);
- fVarCreateCMD = var;
- }
-
- public Variable(Target target, Thread thread, StackFrame frame, String n, String q, int pos, int depth, MIVar miVar) {
- super(target, thread, frame, n, q, pos, depth);
- fMIVar = miVar;
- }
-
- public void setUpdated(boolean update) {
- isUpdated = update;
- }
-
- public boolean isUpdated() {
- return isUpdated;
- }
-
- public void update() throws CDIException {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- mgr.update(this);
- }
-
- public MIVar getMIVar() throws CDIException {
- if (fMIVar == null) {
-
- // Oops! what's up here, we should use Assert
- if (fVarCreateCMD == null) {
- throw new CDIException("Incomplete initialization of variable"); //$NON-NLS-1$
- }
-
- try {
- MISession mi = ((Target)getTarget()).getMISession();
- MIVarCreateInfo info = null;
- // Wait for the response or timedout
- synchronized (fVarCreateCMD) {
- // RxThread will set the MIOutput on the cmd
- // when the response arrive.
- while ((info = fVarCreateCMD.getMIVarCreateInfo()) == null) {
- try {
- fVarCreateCMD.wait(mi.getCommandTimeout());
- info = fVarCreateCMD.getMIVarCreateInfo();
- if (info == null) {
- throw new MIException(MIPlugin.getResourceString("src.MISession.Target_not_responding")); //$NON-NLS-1$
- }
- } catch (InterruptedException e) {
- }
- }
- }
-
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- fMIVar = info.getMIVar();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return fMIVar;
- }
-
- /**
- * @return The address of this variable as hex string if available, otherwise an empty string.
- * @noreference This method is not intended to be referenced by clients outside CDT.
- * @since 7.1
- */
- public String getHexAddress() throws CDIException {
- if (hexAddress != null) {
- return hexAddress;
- }
- VariableManager vm = ((Session)((Target)getTarget()).getSession()).getVariableManager();
- String qualName = "&(" + getQualifiedName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- VariableDescriptor desc = createDescriptor((Target)getTarget(), (Thread)getThread(), (StackFrame)getStackFrame(), getName(), qualName, getPosition(), getStackDepth());
- Variable v = vm.createVariable( desc );
- // make sure to avoid infinite recursion. see bug 323630
- if (v != this) {
- v.setFormat(ICDIFormat.HEXADECIMAL);
- hexAddress = v.getValue().getValueString();
- } else {
- hexAddress = ""; //$NON-NLS-1$
- }
- return hexAddress;
- }
-
- public Variable getChild(String name) {
- for (int i = 0; i < children.length; i++) {
- Variable variable = (Variable) children[i];
- try {
- if (name.equals(variable.getMIVar().getVarName())) {
- return variable;
- }
- // Look also in the grandchildren.
- Variable grandChild = variable.getChild(name);
- if (grandChild != null) {
- return grandChild;
- }
- } catch (CDIException e) {
- // ignore;
- }
- }
- return null;
- }
-
- String getLanguage() throws CDIException {
- if (language == null) {
- MISession mi = ((Target)getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarInfoExpression var = factory.createMIVarInfoExpression(getMIVar().getVarName());
- try {
- mi.postCommand(var);
- MIVarInfoExpressionInfo info = var.getMIVarInfoExpressionInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- language = info.getLanguage();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return (language == null) ? "" : language; //$NON-NLS-1$
- }
-
- boolean isCPPLanguage() throws CDIException {
- return getLanguage().equalsIgnoreCase("C++"); //$NON-NLS-1$
- }
-
- void setIsFake(boolean f) {
- isFake = f;
- }
-
- boolean isFake() {
- return isFake;
- }
-
- public ICDIVariable[] getChildren() throws CDIException {
- // Use the default timeout.
- return getChildren(-1);
- }
-
- /**
- * This can be a potentially long operation for GDB.
- * allow the override of the timeout.
- */
- public ICDIVariable[] getChildren(int timeout) throws CDIException {
- MISession mi = ((Target)getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarListChildren var = factory.createMIVarListChildren(getMIVar().getVarName());
- try {
- if (timeout >= 0) {
- mi.postCommand(var, timeout);
- } else {
- mi.postCommand(var);
- }
- MIVarListChildrenInfo info = var.getMIVarListChildrenInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- final MIVar[] vars = info.getMIVars();
- final List childrenList = new ArrayList(vars.length);
- final ICDIType t = getType();
- final boolean cpp = isCPPLanguage();
- for (int i = 0; i < vars.length; i++) {
- String fn = getQualifiedName();
- String childName = vars[i].getExp();
- boolean childFake = false;
- if (cpp && isAccessQualifier(childName)) {
- // since access qualifier is keyword this only possible when gdb returns this as fake fields
- // so it is pretty safe without to do without any other type checks
- childFake = true;
- // fn remains unchanged otherwise it would be like x->public
- } else if (cpp && childName.equals(vars[i].getType())) {
- // it is a base class (which is returned by GDB as a field)
- // (type of a child is the name of a child)
- String childNameForCast = childName.contains("::") ? "'" + childName + "'" : childName; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (t instanceof ICDIPointerType) {
- // fn -> casting to pointer base class
- fn = "(struct " + childNameForCast + ")(*" + fn + ")";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else {
- // fn -> casting to base class
- fn = "(struct " + childNameForCast + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
- }
- } else if (t instanceof ICDIArrayType) {
- // For Array gdb varobj only return the index, override here.
- int index = castingIndex + i;
- fn = "(" + fn + ")[" + i + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- childName = getName() + "[" + index + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- } else if (t instanceof ICDIPointerType) {
- ICDIType subType = ((ICDIPointerType) t).getComponentType();
- if (subType instanceof ICDIStructType || subType instanceof IncompleteType) {
- fn = "(" + fn + ")->" + childName; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- fn = "*(" + fn + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else if (t instanceof ICDIReferenceType) {
- ICDIType subType = ((ICDIReferenceType) t).getComponentType();
- if (subType instanceof ICDIStructType || subType instanceof IncompleteType) {
- fn = "(" + fn + ")." + childName; //$NON-NLS-1$ //$NON-NLS-2$
- } else if (subType instanceof ICDIPointerType) {
- fn = "(" + fn + ")->" + childName; //$NON-NLS-1$ //$NON-NLS-2$
- } else if (subType instanceof ICDIArrayType) {
- int index = castingIndex + i;
- fn = "(" + fn + ")[" + index + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- // set this to look pretty
- childName = getName() + "[" + index + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- fn = "*(" + fn + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else if (t instanceof ICDIStructType || t instanceof IncompleteType) {
- if (childName.length()>0) {
- fn = "(" + fn + ")." + childName; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- Variable v = createVariable((Target)getTarget(), (Thread)getThread(), (StackFrame)getStackFrame(),
- childName, fn, getPosition(), getStackDepth(), vars[i]);
- if (childFake) {
- v.setIsFake(childFake);
- // Hack to reset the typename to a known value
- v.fType = t;
- // don't add these, add their kids
- ICDIVariable[] grandchildren = v.getChildren();
- for (int j = 0; j < grandchildren.length; ++j)
- childrenList.add(grandchildren[j]);
- } else
- childrenList.add(v);
- }
-
- children = (ICDIVariable[])childrenList.toArray(new ICDIVariable[childrenList.size()]);
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- return children;
- }
-
- boolean isAccessQualifier(String foo) {
- if (foo==null) return false;
- return foo.equals("private") || foo.equals("public") || foo.equals("protected"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- protected abstract Variable createVariable(Target target, Thread thread, StackFrame frame,
- String name, String fullName, int pos, int depth, MIVar miVar);
-
- public int getChildrenNumber() throws CDIException {
- return getMIVar().getNumChild();
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#getValue()
- */
- @Override
- public ICDIValue getValue() throws CDIException {
- if (value == null) {
- ICDIType t = getType();
- if (t instanceof ICDIBoolType) {
- value = new BoolValue(this);
- } else if (t instanceof ICDICharType) {
- value = new CharValue(this);
- } else if (t instanceof ICDIWCharType) {
- value = new WCharValue(this);
- } else if (t instanceof ICDIShortType) {
- value = new ShortValue(this);
- } else if (t instanceof ICDIIntType) {
- value = new IntValue(this);
- } else if (t instanceof ICDILongType) {
- value = new LongValue(this);
- } else if (t instanceof ICDILongLongType) {
- value = new LongLongValue(this);
- } else if (t instanceof ICDIEnumType) {
- value = new EnumValue(this);
- } else if (t instanceof ICDIFloatType) {
- value = new FloatValue(this);
- } else if (t instanceof ICDIDoubleType) {
- value = new DoubleValue(this);
- } else if (t instanceof ICDIFunctionType) {
- value = new FunctionValue(this);
- } else if (t instanceof ICDIPointerType) {
- value = new PointerValue(this);
- } else if (t instanceof ICDIReferenceType) {
- value = new ReferenceValue(this);
- } else if (t instanceof ICDIArrayType) {
- value = new ArrayValue(this);
- } else if (t instanceof ICDIStructType) {
- value = new StructValue(this);
- } else {
- value = new Value(this);
- }
- }
- return value;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#setValue(ICDIValue)
- */
- @Override
- public void setValue(ICDIValue value) throws CDIException {
- setValue(value.getValueString());
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#setValue(String)
- */
- @Override
- public void setValue(String expression) throws CDIException {
- Target target = (Target)getTarget();
- MISession miSession = target.getMISession();
- CommandFactory factory = miSession.getCommandFactory();
- MIVarAssign var = factory.createMIVarAssign(getMIVar().getVarName(), expression);
- try {
- miSession.postCommand(var);
- MIInfo info = var.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
-
- // If the assign was succesfull fire a MIVarChangedEvent() for the variable
- // Note GDB will not fire an event for the changed variable we have to do it manually.
- MIVarChangedEvent change = new MIVarChangedEvent(miSession, var.getToken(), getMIVar().getVarName());
- miSession.fireEvent(change);
-
- // Changing values may have side effects i.e. affecting other variables
- // if the manager is on autoupdate check all the other variables.
- // Note: This maybe very costly.
- // assigning may have side effects i.e. affecting other registers.
-
- // If register was on autoupdate, update all the other registers
- RegisterManager regMgr = ((Session)target.getSession()).getRegisterManager();
- if (regMgr.isAutoUpdate()) {
- regMgr.update(target);
- }
-
- // If expression manager is on autoupdate, update all expressions
- ExpressionManager expMgr = ((Session)target.getSession()).getExpressionManager();
- if (expMgr.isAutoUpdate()) {
- expMgr.update(target);
- }
-
- // If variable manager is on autoupdate, update all variables
- VariableManager varMgr = ((Session)target.getSession()).getVariableManager();
- if (varMgr.isAutoUpdate()) {
- varMgr.update(target);
- }
-
- // If memory manager is on autoupdate, update all memory blocks
- MemoryManager memMgr = ((Session)target.getSession()).getMemoryManager();
- if (memMgr.isAutoUpdate()) {
- memMgr.update(target);
- }
- }
-
- /**
- * Overload the implementation of VariableDescriptor and let gdb
- * handle it.
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#isEditable()
- */
- @Override
- public boolean isEditable() throws CDIException {
- if (editable == null) {
- MISession mi = ((Target) getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarShowAttributes var = factory.createMIVarShowAttributes(getMIVar().getVarName());
- try {
- mi.postCommand(var);
- MIVarShowAttributesInfo info = var.getMIVarShowAttributesInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- editable = String.valueOf(info.isEditable());
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- return (editable == null) ? false : editable.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#setFormat()
- */
- public void setFormat(int format) throws CDIException {
- int fmt = Format.toMIFormat(format);
- MISession mi = ((Target) getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarSetFormat var = factory.createMIVarSetFormat(getMIVar().getVarName(), fmt);
- try {
- mi.postCommand(var);
- MIInfo info = var.getMIInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#equals()
- */
- @Override
- public boolean equals(ICDIVariable var) {
- if (var instanceof Variable) {
- Variable variable = (Variable) var;
- return equals(variable);
- }
- return super.equals(var);
- }
-
- /**
- * @param variable
- * @return
- */
- public boolean equals(Variable variable) {
- try {
- return getMIVar().getVarName().equals(variable.getMIVar().getVarName());
- } catch (CDIException e) {
- // ignore.
- }
- return super.equals(variable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#dispose()
- */
- @Override
- public void dispose() throws CDIException {
- ICDITarget target = getTarget();
- VariableManager varMgr = ((Session)target.getSession()).getVariableManager();
- varMgr.destroyVariable(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getTypeName()
- */
- @Override
- public String getTypeName() throws CDIException {
- if (fTypename == null) {
- fTypename = getMIVar().getType();
- if (fTypename == null || fTypename.length() == 0) {
- MISession mi = ((Target) getTarget()).getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIVarInfoType infoType = factory.createMIVarInfoType(getMIVar().getVarName());
- try {
- mi.postCommand(infoType);
- MIVarInfoTypeInfo info = infoType.getMIVarInfoTypeInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
- }
- fTypename = info.getType();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
- }
- return fTypename;
- }
-
- public void setMIVarCreate(MIVarCreate miVar) {
- fVarCreateCMD = miVar;
- }
-
- abstract protected VariableDescriptor createDescriptor(Target target, Thread thread, StackFrame frame, String n, String fn, int pos, int depth);
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
deleted file mode 100644
index 91ef52b064e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java
+++ /dev/null
@@ -1,421 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Alena Laskavaia (QNX) - Bug 221224
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.type.IncompleteType;
-import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
-import org.eclipse.cdt.debug.mi.core.command.MIDataEvaluateExpression;
-import org.eclipse.cdt.debug.mi.core.output.MIDataEvaluateExpressionInfo;
-import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
-
-/**
- */
-public abstract class VariableDescriptor extends CObject implements ICDIVariableDescriptor {
-
- // Casting info.
- String[] castingTypes;
- int castingIndex;
- int castingLength;
-
- String fName;
- int position;
- StackFrame fStackFrame;
- Thread fThread;
- int stackdepth;
-
- String qualifiedName = null;
- String fFullName = null;
- protected ICDIType fType = null;
- protected String fTypename = null;
- String sizeof = null;
-
- /**
- * Copy constructor.
- * @param desc
- */
- public VariableDescriptor(VariableDescriptor desc) {
- super((Target)desc.getTarget());
- fName = desc.getName();
- fFullName = desc.fFullName;
- sizeof = desc.sizeof;
- fType = desc.fType;
- try {
- fStackFrame = (StackFrame)desc.getStackFrame();
- fThread = (Thread)desc.getThread();
- } catch (CDIException e) {
- }
- position = desc.getPosition();
- stackdepth = desc.getStackDepth();
- castingIndex = desc.getCastingArrayStart();
- castingLength = desc.getCastingArrayEnd();
- castingTypes = desc.getCastingTypes();
- }
-
- public VariableDescriptor(Target target, Thread thread, StackFrame stack, String n, String fn, int pos, int depth) {
- super(target);
- fName = n;
- fFullName = fn;
- fStackFrame = stack;
- fThread = thread;
- position = pos;
- stackdepth = depth;
- }
-
- public int getPosition() {
- return position;
- }
-
- public int getStackDepth() {
- return stackdepth;
- }
-
- public void setCastingArrayStart(int start) {
- castingIndex = start;
- }
- public int getCastingArrayStart() {
- return castingIndex;
- }
-
- public void setCastingArrayEnd(int end) {
- castingLength = end;
- }
- public int getCastingArrayEnd() {
- return castingLength;
- }
-
- public void setCastingTypes(String[] t) {
- castingTypes = t;
- }
- public String[] getCastingTypes() {
- return castingTypes;
- }
-
- /**
- * If the variable was a cast encode the string appropriately for GDB.
- * For example castin to an array is of 2 elements:
- * (foo)@2
- * @return
- */
- public String encodeVariable() {
- String fn = getFullName();
- if (castingLength > 0 || castingIndex > 0) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("*("); //$NON-NLS-1$
- buffer.append('(').append(fn).append(')');
- buffer.append('+').append(castingIndex).append(')');
- buffer.append('@').append(castingLength);
- fn = buffer.toString();
- } else if (castingTypes != null && castingTypes.length > 0) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < castingTypes.length; ++i) {
- if (castingTypes[i] != null && castingTypes[i].length() > 0) {
- if (buffer.length() == 0) {
- buffer.append('(').append(castingTypes[i]).append(')');
- buffer.append(fn);
- } else {
- buffer.insert(0, '(');
- buffer.append(')');
- StringBuffer b = new StringBuffer();
- b.append('(').append(castingTypes[i]).append(')');
- buffer.insert(0, b.toString());
- }
- }
- }
- fn = buffer.toString();
- }
- return fn;
- }
-
- public String getFullName() {
- if (fFullName == null) {
- fFullName = getName();
- }
- return fFullName;
- }
-
- protected ICDIType getFromTypeCache(String nameType) throws CDIException {
- StackFrame frame = (StackFrame)getStackFrame();
- ICDIType detailedType = null;
- if (frame != null) {
- detailedType = frame.getFromTypeCache(nameType);
- }
- return detailedType;
- }
-
- protected void addToTypeCache(String nameType, ICDIType typeDefinition) throws CDIException {
- StackFrame frame = (StackFrame)getStackFrame();
- if (frame != null) {
- frame.addToTypeCache(nameType, typeDefinition);
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIVariableDescriptor#getName()
- */
- @Override
- public String getName() {
- return fName;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#getType()
- */
- @Override
- public ICDIType getType() throws CDIException {
- if (fType == null) {
- String nametype = getTypeName();
- Target target = (Target)getTarget();
- Session session = (Session) target.getSession();
- SourceManager sourceMgr = session.getSourceManager();
- try {
- fType = sourceMgr.getType(target, nametype);
- } catch (CDIException e) {
- // We are here because the parser did not recognize the type, it may be something
- // like "builtin_x86_vector" or even a class or a typedef
- // typedef struct foobar Foobar_t
- // for this case we need to call "Ptype" for more details.
-
- // For speed we save the type definitions in the stackframe, try it first.
- fType = getFromTypeCache(nametype);
- if (fType == null) {
- // Try with ptype.
- try {
- String ptype = sourceMgr.getDetailTypeName(target, nametype);
- fType = sourceMgr.getType(target, ptype);
- } catch (CDIException ex) {
- // Some version of gdb does not work on the name of the class
- // ex: class data foo --> ptype data --> fails
- // ex: class data foo --> ptype foo --> succeed
- StackFrame frame = (StackFrame)getStackFrame();
- if (frame == null) {
- Thread thread = (Thread)getThread();
- if (thread != null) {
- frame = thread.getCurrentStackFrame();
- } else {
- frame = ((Thread)target.getCurrentThread()).getCurrentStackFrame();
- }
- }
- try {
- String ptype = sourceMgr.getDetailTypeNameFromVariable(frame, getQualifiedName());
- fType = sourceMgr.getType(target, ptype);
- } catch (CDIException e2) {
- // give up.
- }
- }
- }
- }
- if (fType == null) {
- fType = new IncompleteType(target, nametype);
- }
- // cache the result
- addToTypeCache(nametype, fType);
- }
- return fType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#sizeof()
- */
- @Override
- public int sizeof() throws CDIException {
- if (sizeof == null) {
- Target target = (Target) getTarget();
- Thread currentThread = (Thread)target.getCurrentThread();
- StackFrame currentFrame = currentThread.getCurrentStackFrame();
- StackFrame frame = (StackFrame)getStackFrame();
- Thread thread = (Thread)getThread();
- synchronized(target.getLock()) {
- try {
- if (frame != null) {
- target.setCurrentThread(frame.getThread(), false);
- ((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
- } else if (thread != null) {
- target.setCurrentThread(thread, false);
- }
- MISession mi = target.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- String exp = "sizeof(" + getTypeName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- MIDataEvaluateExpression evaluate = factory.createMIDataEvaluateExpression(exp);
- mi.postCommand(evaluate);
- MIDataEvaluateExpressionInfo info = evaluate.getMIDataEvaluateExpressionInfo();
- if (info == null) {
- throw new CDIException(CdiResources.getString("cdi.model.VariableDescriptor.Target_not_responding")); //$NON-NLS-1$
- }
- sizeof = info.getExpression();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- } finally {
- if (frame != null) {
- target.setCurrentThread(currentThread, false);
- currentThread.setCurrentStackFrame(currentFrame, false);
- } else if (thread != null) {
- target.setCurrentThread(currentThread, false);
- }
- }
- }
- }
-
- if (sizeof != null) {
- try {
- return Integer.parseInt(sizeof);
- } catch (NumberFormatException e) {
- throw new CDIException(e.getMessage());
- }
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getStackFrame()
- */
- public ICDIStackFrame getStackFrame() throws CDIException {
- return fStackFrame;
- }
-
- public ICDIThread getThread() throws CDIException {
- return fThread;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getTypeName()
- */
- @Override
- public String getTypeName() throws CDIException {
- if (fTypename == null) {
- Target target = (Target)getTarget();
- StackFrame frame = (StackFrame)getStackFrame();
- if (frame == null) {
- Thread thread = (Thread)getThread();
- if (thread != null) {
- frame = thread.getCurrentStackFrame();
- } else {
- frame = ((Thread)target.getCurrentThread()).getCurrentStackFrame();
- }
- }
- Session session = (Session) target.getSession();
- SourceManager sourceMgr = session.getSourceManager();
- if (frame != null) {
- fTypename = sourceMgr.getTypeNameFromVariable(frame, getQualifiedName());
- } else {
- fTypename = sourceMgr.getTypeName(target, getQualifiedName());
- }
- }
- return fTypename;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getQualifiedName()
- */
- @Override
- public String getQualifiedName() throws CDIException {
- if (qualifiedName == null) {
- qualifiedName = encodeVariable();
- }
- return qualifiedName;
- }
-
- public static boolean equalsCasting(VariableDescriptor var1, VariableDescriptor var2) {
- String[] castings1 = var1.getCastingTypes();
- String[] castings2 = var2.getCastingTypes();
- if (castings1 == null && castings2 == null) {
- return true;
- } else if (castings1 != null && castings2 != null && castings1.length == castings2.length) {
- for (int i = 0; i < castings1.length; ++i) {
- if (!castings1[i].equals(castings2[i])) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
- /**
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#equals(ICDIVariableDescriptor)
- */
- @Override
- public boolean equals(ICDIVariableDescriptor varDesc) {
- if (varDesc instanceof VariableDescriptor) {
- VariableDescriptor desc = (VariableDescriptor) varDesc;
- if (desc.getFullName().equals(getFullName())
- && desc.getName().equals(getName()) // see bug #113364
- && desc.getCastingArrayStart() == getCastingArrayStart()
- && desc.getCastingArrayEnd() == getCastingArrayEnd()
- && equalsCasting(desc, this)) {
-
- // Check the threads
- ICDIThread varThread = null;
- ICDIThread ourThread = null;
- try {
- varThread = desc.getThread();
- ourThread = getThread();
- } catch (CDIException e) {
- // ignore
- }
- if ((ourThread == null && varThread == null) ||
- (varThread != null && ourThread != null && varThread.equals(ourThread))) {
- // check the stackFrames
- ICDIStackFrame varFrame = null;
- ICDIStackFrame ourFrame = null;
- try {
- varFrame = desc.getStackFrame();
- ourFrame = getStackFrame();
- } catch (CDIException e) {
- // ignore
- }
- if (ourFrame == null && varFrame == null) {
- return true;
- } else if (varFrame != null && ourFrame != null && varFrame.equals(ourFrame)) {
- if (desc.getStackDepth() == getStackDepth()) {
- if (desc.getPosition() == getPosition()) {
- return true;
- }
- }
- }
- }
- return false;
- }
- }
- return super.equals(varDesc);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getVariableDescriptorAsArray(org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor, int, int)
- */
- @Override
- public ICDIVariableDescriptor getVariableDescriptorAsArray(int start, int length) throws CDIException {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- return mgr.getVariableDescriptorAsArray(this, start, length);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor#getVariableDescriptorAsType(org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor, java.lang.String)
- */
- @Override
- public ICDIVariableDescriptor getVariableDescriptorAsType(String type) throws CDIException {
- Session session = (Session)getTarget().getSession();
- VariableManager mgr = session.getVariableManager();
- return mgr.getVariableDescriptorAsType(this, type);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
deleted file mode 100644
index 8bed0197669..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint2;
-import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
-
-/**
- */
-public class Watchpoint extends Breakpoint implements ICDIWatchpoint2 {
-
- int watchType;
- String expression;
- String memorySpace;
- BigInteger range;
- String derivedExpression;
-
- public Watchpoint(Target target, String expression, int type,
- int watchType, ICDICondition condition, boolean enabled) {
- this(target, expression, "", BigInteger.ZERO, type, watchType, condition, enabled); //$NON-NLS-1$
- }
-
- public Watchpoint(Target target, String expression, String memorySpace,
- BigInteger range, int type, int watchType, ICDICondition cond,
- boolean enabled) {
- super(target, type, cond, enabled);
- this.watchType = watchType;
- this.expression = expression;
- this.memorySpace = memorySpace;
- this.range = range;
-
- // If the range and/or memory space are specified, cast the expression, e.g.,
- // (@data char[4])(*0x402000)
- derivedExpression = ""; //$NON-NLS-1$
- boolean doSpecifyMemorySpace = memorySpace.length() > 0;
- boolean doSpecifyRange = range.compareTo(BigInteger.ZERO) > 0;
- boolean doSpecify = doSpecifyMemorySpace || doSpecifyRange;
- if ( doSpecify ) {
- derivedExpression += "("; //$NON-NLS-1$
- if ( doSpecifyMemorySpace ) {
- derivedExpression += "@" + memorySpace; //$NON-NLS-1$
- if ( doSpecifyRange ) {
- derivedExpression += " "; //$NON-NLS-1$
- }
- }
- if ( doSpecifyRange ) {
- derivedExpression += "char[" + range.toString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- derivedExpression += ")("; //$NON-NLS-1$
- }
-
- try {
- // Check if this an address watchpoint, and add a '*'
- Integer.decode(expression);
- derivedExpression += '*';
- } catch (NumberFormatException e) {
- }
- derivedExpression += expression;
- if ( doSpecify ) {
- derivedExpression += ")"; //$NON-NLS-1$
- }
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpoint#getWatchExpression()
- */
- @Override
- public String getWatchExpression() throws CDIException {
- if (expression == null) {
- MIBreakpoint[] miPoints = getMIBreakpoints();
- if (miPoints != null && miPoints.length > 0) {
- return miPoints[0].getWhat();
- }
- }
- return expression;
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpoint#isReadType()
- */
- @Override
- public boolean isReadType() {
- return ((watchType & ICDIWatchpoint.READ) == ICDIWatchpoint.READ);
-// MIBreakpoint miPoint = getMIBreakpoint();
-// if (miPoint != null)
-// return getMIBreakpoint().isReadWatchpoint() || getMIBreakpoint().isAccessWatchpoint();
-// return ((watchType & ICDIWatchpoint.READ) == ICDIWatchpoint.READ);
- }
-
- /**
- * @see org.eclipse.cdt.debug.core.cdi.ICDIWatchpoint#isWriteType()
- */
- @Override
- public boolean isWriteType() {
- return ((watchType & ICDIWatchpoint.WRITE) == ICDIWatchpoint.WRITE);
-// MIBreakpoint miPoint = getMIBreakpoint();
-// if (miPoint != null)
-// return getMIBreakpoint().isAccessWatchpoint() || getMIBreakpoint().isWriteWatchpoint();
-// return ((watchType & ICDIWatchpoint.WRITE) == ICDIWatchpoint.WRITE);
- }
-
- @Override
- public String getMemorySpace() throws CDIException {
- return memorySpace;
- }
-
- @Override
- public BigInteger getRange() throws CDIException {
- return range;
- }
-
- public String getDerivedExpression() {
- return derivedExpression;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java
deleted file mode 100644
index c41702dba90..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIAggregateType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public abstract class AggregateType extends Type implements ICDIAggregateType {
-
- public AggregateType(Target target, String typename) {
- super(target, typename);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java
deleted file mode 100644
index 38ef72cb3e1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIAggregateValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public abstract class AggregateValue extends Value implements ICDIAggregateValue {
-
- public AggregateValue(Variable v) {
- super(v);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java
deleted file mode 100644
index 75dd2e4db2f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class ArrayType extends DerivedType implements ICDIArrayType {
-
- int dimension;
-
- /**
- * @param typename
- */
- public ArrayType(Target target, String typename,int dim) {
- super(target, typename);
- dimension = dim;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType#getDimension()
- */
- @Override
- public int getDimension() {
- if (derivedType == null) {
- getComponentType();
- }
- return dimension;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIArrayType#getComponentType()
- */
- @Override
- public ICDIType getComponentType() {
- if (derivedType == null) {
- String orig = getTypeName();
- String name = orig;
- int lbracket = orig.lastIndexOf('[');
- int rbracket = orig.lastIndexOf(']');
- if (lbracket != -1 && rbracket != -1 && (rbracket > lbracket)) {
- try {
- String dim = name.substring(lbracket + 1, rbracket).trim();
- dimension = Integer.parseInt(dim);
- } catch (NumberFormatException e) {
- }
- name = orig.substring(0, lbracket).trim();
- }
- setComponentType(name);
- }
- return derivedType;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
deleted file mode 100644
index 8faa4875044..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-import org.eclipse.cdt.debug.mi.core.cdi.model.VariableDescriptor;
-
-/**
- * Enter type comment.
- *
- * @since Jun 3, 2003
- */
-public class ArrayValue extends DerivedValue implements ICDIArrayValue, ICDIPointerValue {
-
- private String hexAddress;
-
- /**
- * Construct the array value object given a variable
- *
- * @param v
- * @since 7.1
- */
- public ArrayValue(Variable v) {
- super(v);
- }
-
- /**
- * Construct the array value object given a variable and the
- * hexadecimal address of the variable.
- *
- * @param v
- * @param hexAddress
- */
- public ArrayValue(Variable v, String address) {
- this(v);
- hexAddress = address;
- }
-
- /**
- * Compute array address as string.
- */
- private String getAddressString() throws CDIException {
- if (hexAddress != null)
- return hexAddress;
-
- String address = getVariable().getHexAddress();
- if (address == null) {
- address = ""; //$NON-NLS-1$
- }
- if (address.startsWith("0x") || address.startsWith("0X")) { //$NON-NLS-1$ //$NON-NLS-2$
- hexAddress = address.substring(2);
- } else {
- hexAddress = address;
- }
- return hexAddress;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getVariables()
- */
- @Override
- public ICDIVariable[] getVariables() throws CDIException {
-
- /* GDB is appallingly slow on array fetches. As as slow as 128 entries
- * per second on NT gdbs with slow processors. We need to set a timeout
- * that's appropriately scaled by number of children to give the slave
- * GDB time to respond. In the end perhaps we want a UI for this. As it
- * is, let's just make up a number that's 5 seconds for us plus one
- * second for every 128 entries. */
- int timeout = getVariable().getMIVar().getNumChild() * 8 + 5000;
-
- return getVariable().getChildren(timeout);
- }
-
- /**
- *
- * an Array of range[index, index + length - 1]
- */
- @Override
- public ICDIVariable[] getVariables(int index, int length) throws CDIException {
- //int children = getChildrenNumber();
- //if (index >= children || index + length >= children) {
- // throw new CDIException("Index out of bound");
- //}
-
- // Overload for registers.
- Variable variable = getVariable();
- if (variable instanceof Register) {
- ICDIVariable[] vars = getVariables();
-
- if (index < vars.length && (index + length) <= vars.length) {
- ICDIVariable[] newVars = new ICDIVariable[length];
- System.arraycopy(vars, index, newVars, 0, length);
- return newVars;
- }
- return new ICDIVariable[0];
- }
- //String subarray = "*(" + variable.getName() + "+" + index + ")@" + length;
- ICDITarget target = getTarget();
- Session session = (Session) (target.getSession());
- VariableManager mgr = session.getVariableManager();
- ICDIVariableDescriptor vo = mgr.getVariableDescriptorAsArray(variable, index, length);
- return mgr.createVariable((VariableDescriptor)vo).getValue().getVariables();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue#pointerValue()
- */
- @Override
- public BigInteger pointerValue() throws CDIException {
- String address = getAddressString();
- if (address.length() > 0 ){
- try {
- return new BigInteger(address, 16);
- } catch (NumberFormatException e) {
- return null;
- }
- }
- return null;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java
deleted file mode 100644
index 79c67164eef..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class BoolType extends IntegralType implements ICDIBoolType {
-
- /**
- * @param typename
- */
- public BoolType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public BoolType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolValue.java
deleted file mode 100644
index ca9da8c7a61..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolValue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Warren Paul (Nokia) - 150860
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class BoolValue extends IntegralValue implements ICDIBoolValue {
-
- /**
- * @param v
- */
- public BoolValue(Variable v) {
- super(v);
- }
-
- @Override
- public BigInteger bigIntegerValue() throws CDIException {
- String valueString = getValueString();
- if (valueString.equalsIgnoreCase("false"))//$NON-NLS-1$
- return BigInteger.ZERO;
- else
- if (valueString.equalsIgnoreCase("true"))//$NON-NLS-1$
- return BigInteger.ONE;
-
- return super.bigIntegerValue();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java
deleted file mode 100644
index 8055bbfacde..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class CharType extends IntegralType implements ICDICharType {
-
- /**
- * @param typename
- */
- public CharType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public CharType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharValue.java
deleted file mode 100644
index 39f92177c0b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharValue.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class CharValue extends IntegralValue implements ICDICharValue {
-
- /**
- * @param v
- */
- public CharValue(Variable v) {
- super(v);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDICharValue#getValue()
- */
- public char getValue() throws CDIException {
- return (char)intValue();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java
deleted file mode 100644
index a14bdff7690..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public abstract class DerivedType extends Type implements ICDIDerivedType {
-
- ICDIType derivedType;
-
- public DerivedType(Target target, String typename) {
- super(target, typename);
- }
-
- public void setComponentType(ICDIType dtype) {
- derivedType = dtype;
- }
-
- public void setComponentType(String name) {
- Target target = (Target)getTarget();
- Session session = (Session)target.getSession();
- SourceManager sourceMgr = session.getSourceManager();
- try {
- derivedType = sourceMgr.getType((Target)getTarget(), name);
- } catch (CDIException e) {
- // Try after ptype.
- try {
- String ptype = sourceMgr.getDetailTypeName((Target)getTarget(), name);
- derivedType = sourceMgr.getType((Target)getTarget(), ptype);
- } catch (CDIException ex) {
- }
- }
- if (derivedType == null) {
- derivedType = new IncompleteType((Target)getTarget(), name);
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java
deleted file mode 100644
index cc5b4f47ca5..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public abstract class DerivedValue extends Value implements ICDIDerivedValue {
-
- public DerivedValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java
deleted file mode 100644
index 168d54cc28b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class DoubleType extends FloatingPointType implements ICDIDoubleType {
-
- /**
- * @param typename
- */
- public DoubleType(Target target, String typename) {
- this(target, typename, false, false, false);
- }
-
- public DoubleType(Target target, String typename, boolean isComplex, boolean isImg, boolean isLong) {
- super(target, typename, isComplex, isImg, isLong);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java
deleted file mode 100644
index 4d33e612efe..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class DoubleValue extends FloatingPointValue implements ICDIDoubleValue {
-
- /**
- * @param Variable
- */
- public DoubleValue(Variable v) {
- super(v);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java
deleted file mode 100644
index 8c0a1d503a7..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class EnumType extends IntegralType implements ICDIEnumType {
-
- /**
- * @param typename
- */
- public EnumType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public EnumType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumValue.java
deleted file mode 100644
index b5979204a21..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class EnumValue extends IntegralValue implements ICDIEnumValue {
-
- /**
- * @param v
- */
- public EnumValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java
deleted file mode 100644
index 86aebee17cf..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class FloatType extends FloatingPointType implements ICDIFloatType {
-
- /**
- * @param typename
- */
- public FloatType(Target target, String typename) {
- this(target, typename, false, false);
- }
-
- public FloatType(Target target, String typename, boolean isComplex, boolean isImg) {
- super(target, typename, isComplex, isImg, false);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java
deleted file mode 100644
index e9d59c30c0f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class FloatValue extends FloatingPointValue implements ICDIFloatValue {
-
- /**
- * @param Variable
- */
- public FloatValue(Variable v) {
- super(v);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java
deleted file mode 100644
index 57a47d99239..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public abstract class FloatingPointType extends Type implements ICDIFloatingPointType {
-
- boolean complex;
- boolean imaginary;
- boolean islong;
-
- public FloatingPointType(Target target, String typename, boolean comp, boolean img, boolean l) {
- super(target, typename);
- complex = comp;
- imaginary = img;
- islong = l;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType#isComplex()
- */
- @Override
- public boolean isComplex() {
- return complex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType#isImaginary()
- */
- @Override
- public boolean isImaginary() {
- return imaginary;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType#isLong()
- */
- @Override
- public boolean isLong() {
- return islong;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
deleted file mode 100644
index 6a77b46e058..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public abstract class FloatingPointValue extends Value implements ICDIFloatingPointValue {
-
- /**
- * @param v
- */
- public FloatingPointValue(Variable v) {
- super(v);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointValue#doubleValue()
- */
- @Override
- public double doubleValue() throws CDIException {
- double result = 0;
- String valueString = getValueString();
- if (isNaN(valueString))
- result = Double.NaN;
- else if (isNegativeInfinity(valueString))
- result = Double.NEGATIVE_INFINITY;
- else if (isPositiveInfinity(valueString))
- result = Double.POSITIVE_INFINITY;
- else {
- try {
- result = Double.parseDouble(valueString);
- } catch (NumberFormatException e) {
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointValue#floatValue()
- */
- @Override
- public float floatValue() throws CDIException {
- float result = 0;
- String valueString = getValueString();
- if (isNaN(valueString))
- result = Float.NaN;
- else if (isNegativeInfinity(valueString))
- result = Float.NEGATIVE_INFINITY;
- else if (isPositiveInfinity(valueString))
- result = Float.POSITIVE_INFINITY;
- else {
- try {
- result = Float.parseFloat(valueString);
- } catch (NumberFormatException e) {
- }
- }
- return result;
- }
-
- private boolean isPositiveInfinity(String valueString) {
- return (valueString != null) ? valueString.indexOf("inf") != -1 : false; //$NON-NLS-1$
- }
-
- private boolean isNegativeInfinity(String valueString) {
- return (valueString != null) ? valueString.indexOf("-inf") != -1 : false; //$NON-NLS-1$
- }
-
- private boolean isNaN(String valueString) {
- return (valueString != null) ? valueString.indexOf("nan") != -1 : false; //$NON-NLS-1$
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java
deleted file mode 100644
index bf1f3cbf101..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class FunctionType extends DerivedType implements ICDIFunctionType {
-
- String params = ""; //$NON-NLS-1$
-
- public FunctionType(Target target, String typename) {
- super(target, typename);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType#getComponentType()
- */
- @Override
- public ICDIType getComponentType() {
- if (derivedType != null) {
- String orig = getTypeName();
- String name = orig;
- int lparen = orig.lastIndexOf('(');
- int rparen = orig.lastIndexOf(')');
- if (lparen != -1 && rparen != -1 && (rparen > lparen)) {
- params = name.substring(lparen + 1, rparen).trim();
- name = orig.substring(0, lparen).trim();
- }
- setComponentType(name);
- }
- return derivedType;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionValue.java
deleted file mode 100644
index fef67bc94bb..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionValue.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- * Enter type comment.
- *
- * @since Jun 3, 2003
- */
-public class FunctionValue extends DerivedValue implements ICDIFunctionValue {
-
- public FunctionValue(Variable v) {
- super(v);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java
deleted file mode 100644
index d87ae1ecf9f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class IncompleteType extends Type {
-
- /**
- * @param name
- */
- public IncompleteType(Target target, String name) {
- super(target, name);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java
deleted file mode 100644
index e7b5ccd0a42..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class IntType extends IntegralType implements ICDIIntType {
-
- /**
- * @param typename
- */
- public IntType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public IntType(Target target, String typename, boolean isUnsigned) {
- super(target, typename, isUnsigned);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntValue.java
deleted file mode 100644
index 536e771952c..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class IntValue extends IntegralValue implements ICDIIntValue {
-
- /**
- * @param v
- */
- public IntValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java
deleted file mode 100644
index d494f67fdbf..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntegralType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public abstract class IntegralType extends Type implements ICDIIntegralType {
-
- boolean unSigned;
-
- public IntegralType(Target target, String typename, boolean isUnsigned) {
- super(target, typename);
- unSigned = isUnsigned;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralType#isUnsigned()
- */
- @Override
- public boolean isUnsigned() {
- return unSigned;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralValue.java
deleted file mode 100644
index 2ff9db73da0..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralValue.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntegralValue;
-import org.eclipse.cdt.debug.mi.core.MIFormat;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public abstract class IntegralValue extends Value implements ICDIIntegralValue {
-
- /**
- * @param v
- */
- public IntegralValue(Variable v) {
- super(v);
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralValue#biIntegerValue()
- */
- @Override
- public BigInteger bigIntegerValue() throws CDIException {
- return bigIntegerValue(getValueString());
- }
-
- public static BigInteger bigIntegerValue(String valueString) {
- // Coming from a reference
- if (valueString.startsWith("@")) { //$NON-NLS-1$
- valueString = valueString.substring(1);
- int colon = valueString.indexOf(':');
- if (colon != -1) {
- valueString = valueString.substring(colon + 1).trim();
- }
- }
- int space = valueString.indexOf(' ');
- if (space != -1) {
- valueString = valueString.substring(0, space).trim();
- }
-
- try {
- return MIFormat.getBigInteger(valueString);
- } catch (NumberFormatException e) {
- //
- }
- return BigInteger.ZERO;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralValue#longValue()
- */
- @Override
- public long longValue() throws CDIException {
- return bigIntegerValue().longValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralValue#longValue()
- */
- @Override
- public int intValue() throws CDIException {
- return bigIntegerValue().intValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralValue#shortValue()
- */
- @Override
- public short shortValue() throws CDIException {
- return bigIntegerValue().shortValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIIntegralValue#byteValue()
- */
- @Override
- public int byteValue() throws CDIException {
- return bigIntegerValue().byteValue();
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java
deleted file mode 100644
index 05244fb8484..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class LongLongType extends IntegralType implements ICDILongLongType {
-
- /**
- * @param typename
- */
- public LongLongType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public LongLongType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongValue.java
deleted file mode 100644
index 29905478cee..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class LongLongValue extends IntegralValue implements ICDILongLongValue {
-
- /**
- * @param v
- */
- public LongLongValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java
deleted file mode 100644
index b6f3e07f0e0..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class LongType extends IntegralType implements ICDILongType {
-
- /**
- * @param typename
- */
- public LongType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public LongType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongValue.java
deleted file mode 100644
index 489436fc96e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class LongValue extends IntegralValue implements ICDILongValue {
-
- /**
- * @param v
- */
- public LongValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java
deleted file mode 100644
index fa1fb747548..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class PointerType extends DerivedType implements ICDIPointerType {
-
- public PointerType(Target target, String typename) {
- super(target, typename);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType#getComponentType()
- */
- @Override
- public ICDIType getComponentType() {
- if (derivedType == null) {
- String orig = getTypeName();
- String name = orig;
- int star = orig.lastIndexOf('*');
- // remove last '*'
- if (star != -1) {
- name = orig.substring(0, star).trim();
- }
- setComponentType(name);
- }
- return derivedType;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java
deleted file mode 100644
index 007edf5fae3..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import java.math.BigInteger;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- * Enter type comment.
- *
- * @since Jun 3, 2003
- */
-public class PointerValue extends DerivedValue implements ICDIPointerValue {
-
- public PointerValue(Variable v) {
- super(v);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue#pointerValue()
- */
- @Override
- public BigInteger pointerValue() throws CDIException {
- return IntegralValue.bigIntegerValue(getValueString());
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java
deleted file mode 100644
index c0823d5c81b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class ReferenceType extends DerivedType implements ICDIReferenceType {
-
- /**
- * @param name
- */
- public ReferenceType(Target target, String name) {
- super(target, name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType#getComponentType()
- */
- @Override
- public ICDIType getComponentType() {
- if (derivedType == null) {
- String orig = getTypeName();
- String name = orig;
- int amp = orig.lastIndexOf('&');
- // remove last '&'
- if (amp != -1) {
- name = orig.substring(0, amp).trim();
- }
- setComponentType(name);
- }
- return derivedType;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java
deleted file mode 100644
index 65cea4d6e20..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceValue;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- * Enter type comment.
- *
- * @since Jun 3, 2003
- */
-public class ReferenceValue extends DerivedValue implements ICDIReferenceValue {
-
- /**
- * Construct a value object for the referred variable
- * @param v
- * @since 6.0
- */
- public ReferenceValue(Variable v) {
- super(v);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceValue#referenceValue()
- */
- @Override
- public ICDIValue referenceValue() throws CDIException {
- Value value = null;
- ICDIReferenceType rt = (ICDIReferenceType)getType();
- ICDIType t = rt.getComponentType();
- if (t instanceof ICDIBoolType) {
- value = new BoolValue(getVariable());
- } else if (t instanceof ICDICharType) {
- value = new CharValue(getVariable());
- } else if (t instanceof ICDIWCharType) {
- value = new WCharValue(getVariable());
- } else if (t instanceof ICDIShortType) {
- value = new ShortValue(getVariable());
- } else if (t instanceof ICDIIntType) {
- value = new IntValue(getVariable());
- } else if (t instanceof ICDILongType) {
- value = new LongValue(getVariable());
- } else if (t instanceof ICDILongLongType) {
- value = new LongLongValue(getVariable());
- } else if (t instanceof ICDIEnumType) {
- value = new EnumValue(getVariable());
- } else if (t instanceof ICDIFloatType) {
- value = new FloatValue(getVariable());
- } else if (t instanceof ICDIDoubleType) {
- value = new DoubleValue(getVariable());
- } else if (t instanceof ICDIFunctionType) {
- value = new FunctionValue(getVariable());
- } else if (t instanceof ICDIPointerType) {
- value = new PointerValue(getVariable());
-// } else if (t instanceof ICDIReferenceType) {
-// value = new ReferenceValue(getVariable());
-//
-// Don't think you can have a reference to an array variable, making
-// the following case pointless. Removing it since it would otherwise
-// require us to be constructed with a hexAddress qualifier.
-// } else if (t instanceof ICDIArrayType) {
-// value = new ArrayValue(getVariable(), hexAddress);
-//
- } else if (t instanceof ICDIStructType) {
- value = new StructValue(getVariable());
- } else {
- value = new Value(getVariable());
- }
-
- value.setIsReference(true);
- return value;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java
deleted file mode 100644
index 63a93f33012..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class ShortType extends IntegralType implements ICDIShortType {
-
- /**
- * @param typename
- */
- public ShortType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public ShortType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortValue.java
deleted file mode 100644
index 71d0b43238f..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class ShortValue extends IntegralValue implements ICDIShortValue {
-
- /**
- * @param v
- */
- public ShortValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java
deleted file mode 100644
index 534a2259c22..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class StructType extends AggregateType implements ICDIStructType {
-
- /**
- * @param typename
- */
- public StructType(Target target, String typename) {
- super(target, typename);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType#isClass()
- */
- @Override
- public boolean isClass() {
- return getDetailTypeName().startsWith("class"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType#isStruct()
- */
- @Override
- public boolean isStruct() {
- return getDetailTypeName().startsWith("struct"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType#isUnion()
- */
- @Override
- public boolean isUnion() {
- return getDetailTypeName().startsWith("union"); //$NON-NLS-1$
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java
deleted file mode 100644
index 204be0ce0e1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- * Enter type comment.
- *
- * @since Jun 3, 2003
- */
-public class StructValue extends AggregateValue implements ICDIStructValue {
-
- public StructValue(Variable v) {
- super(v);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java
deleted file mode 100644
index db86c9d42d8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.CObject;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public abstract class Type extends CObject implements ICDIType {
-
- String typename;
- String detailName;
-
- public Type(Target target, String name) {
- super(target);
- typename = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIType#getTypeName()
- */
- @Override
- public String getTypeName() {
- return typename;
- }
-
- public void setDetailTypeName(String name) {
- detailName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDIType#getDetailTypeName()
- */
- @Override
- public String getDetailTypeName() {
- if (detailName == null) {
- return getTypeName();
- }
- return detailName;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java
deleted file mode 100644
index 33cd028a435..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIVoidType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class VoidType extends Type implements ICDIVoidType {
-
- public VoidType(Target target) {
- this(target, "void"); //$NON-NLS-1$
- }
- public VoidType(Target target, String typename) {
- super(target, typename);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidValue.java
deleted file mode 100644
index 1e251ddbc33..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidValue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.mi.core.cdi.model.Value;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/*
- * VoidValue
- */
-public class VoidValue extends Value {
-
- /**
- * @param v
- */
- public VoidValue(Variable v) {
- super(v);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java
deleted file mode 100644
index 1bef04c7345..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-
-/**
- */
-public class WCharType extends IntegralType implements ICDIWCharType {
-
- /**
- * @param typename
- */
- public WCharType(Target target, String typename) {
- this(target, typename, false);
- }
-
- public WCharType(Target target, String typename, boolean usigned) {
- super(target, typename, usigned);
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharValue.java
deleted file mode 100644
index 3c8bc724ccb..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharValue.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.core.cdi.model.type;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharValue;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Variable;
-
-/**
- */
-public class WCharValue extends IntegralValue implements ICDIWCharValue {
-
- /**
- * @param v
- */
- public WCharValue(Variable v) {
- super(v);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.core.cdi.model.ICDICharValue#getValue()
- */
- public char getValue() throws CDIException {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/design.txt b/debug/org.eclipse.cdt.debug.mi.core/design.txt
deleted file mode 100644
index 782d0275725..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/design.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-Note this is an interim the document and subject to changes.
-
-
-****
-This MI implementation is base on GDB/MI 5.2.1.
-
-* Command/Response channels
-To create an MISession an InputStream and OutputStream are
-needed(assuming it is the pipe connected to gdb).
-
- MISession misession = new MISession(InputStream, OutputStream);
-
-During initialisation of the session(MISession) two threads
-are created TxThread, RxThread and associative list queues
-TxQueue and RxQueue:
-- The RxThread thread is block on readig the output of the pipe(gdb) for
-any responses.
-- The TxThread thread is block waiting for command.
-
-MI Commands are created via the CommandFactory and
-are added to the TxQueue, the TxThread will then wake up
-generate a token(ID) for the command and send it to the pipe(gdb), after
-transmission the command is then move to the RxQueue waiting for the
-result(MIResultRecord).
-
-Any responses will wake the RxThread, the thread will parse
-the response constructing an MIOutput, then it searches the RxQueue
-for any commands with the same token waking any thread waiting
-for a synchronous response(MIResultRecord). Any out-of-band
-responses(MIOOBRecord) are dispatch to MISession observers, clients interested
-in notifications should register to the MISession.
-
-* MI Parsing
-There is a generic MI parser (MIParser) constructing an syntax tree of the output.
-For example, a ResultRecord response after a "-break-insert", the parser will
-generate this tree:
- 10-break-insert main
- 10^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
- addr="0x08048468",func="main",file="hello.c",line="4",times="0"}
-
- - MIOutput
- - MIOOBRecord[0]
- - MIResutRecord
- - token = 10
- - ResultClass = "done"
- - MIResult[1]
- - MIResult[0]
- - variable = "bkpt"
- - value = MITuple
- - MIResult[9]
- - MiResult[0]
- - variable = "number"
- - MIConst = "1"
- - MiResult[1]
- - variable = "type"
- - MIConst = "breakpoint"
- - MiResult[2]
- - variable = "disp"
- - MIConst = "keep"
- - MiResult[3]
- - variable = "enabled"
- - MIConst = "y"
- - MiResult[4]
- - variable = "addr"
- - MIConst = "0x08048468"
- - MiResult[5]
- - variable = "func"
- - MIConst = "main"
- - MiResult[6]
- - variable = "file"
- - MIConst = "hello.c"
- - MiResult[7]
- - variable = "line"
- - MIConst = "4"
- - MiResult[8]
- - variable = "times"
- - MIConst = "0"
-
-MICommands will do there own parsing:
- session = MISession(in, out);
- MIBreakInsert cmd = new MIBreakInsert("main");
- session.postCommand(cmd); // sent to gdb.
- MIBreakInsertInfo info = cmd.getBreakInsertInfo(); // Parsing of the Result Record.
-
-****
-MI Process
-
-For convienience, to java.lang.Process is provided.
-
- MISession.getSessionProcess();
-
-This Process talks directly to gdb and is smart enough to wrap any command
-in CLICommand etc ..
-
- MISession.getMIInferior()
-
-MIInferior implements Process for the Inferiror.
-
-*****
-MI <==> CDI Adapters
-
- To do.
-
If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at http://www.eclipse.org.
-
-
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/build.properties b/debug/org.eclipse.cdt.debug.mi.ui/build.properties
deleted file mode 100644
index bc087cfbc3e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-###############################################################################
-
-bin.includes = plugin.xml,\
- plugin.properties,\
- about.html,\
- icons/,\
- .,\
- META-INF/
-source.. = src/
-src.includes = about.html
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/save_console.gif b/debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/save_console.gif
deleted file mode 100644
index 555182cacd02cf7b1adf01e2b0dd481521213f11..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 609
zcmZ?wbhEHb6krfwIF`!r=g+^tfB$8aO_rouLfByx#?%&}fyLWD1v0z5d?5PE7
zR`f5Qld)u0*3=25e?Oo8@@(7R_j~_-IP~|^@xPx={{4Jz+a#5*w>thj?Emv*)}Lqd
z{ydxi=h=d%56*AwR@~CBd~lw{vQCTROI&x%bh)uN_rvwRn@8H8UYvU8{F;hr;pKHQ
z>)Pa3H_IR0Pa$D!M)0=Ky*z@`A!~fIZf&wKQQNJix=(>wSXiOSe2GCtZtN+7fQHYh8_wt;h
zQEuvjPo0*Ze*G=Dqv>YCuj*U|2}N}U5t+`;_O5PqArU#r$&wSArmC}x2+PlvpEYM5
zyE+@wvgJ#cFJn_*yKeo4^?aK*Z06e_z|XvanV)-uAhRGB$5F0>f*aL2xp;YaxH#84
HGFSruOtOnN
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties b/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties
deleted file mode 100644
index ed4e14151ac..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2010 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - Initial API and implementation
-# IBM Corporation
-###############################################################################
-pluginName=C/C++ Development Tools GDB/MI CDI Debugger UI
-providerName=Eclipse CDT
-
-MIPreferencePage.name=GDB MI
-
-SetAutoSolibAction.label=Automatically Load Shared Libraries
-SetAutoSolibAction.tooltip=Automatically Load Shared Libraries On/Off
-
-TargetOptionsPage.label=GDB/MI Options
-
-VerboseMode.label=Verbose Mode
-VerboseMode.tooltip=Verbose Mode For gdb Console
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
deleted file mode 100644
index 6d9b721cda6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/pom.xml b/debug/org.eclipse.cdt.debug.mi.ui/pom.xml
deleted file mode 100644
index bdfc3635fd1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.cdt
- cdt-parent
- 9.0.0-SNAPSHOT
- ../../pom.xml
-
-
- 6.2.0-SNAPSHOT
- org.eclipse.cdt.debug.mi.ui
- eclipse-plugin
-
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/ActionFilterAdapterFactory.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/ActionFilterAdapterFactory.java
deleted file mode 100644
index 15d8fe5b4ca..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/ActionFilterAdapterFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.IActionFilter;
-
-/**
- * The UI adapter factory for GDB/MI Debug extensions
- */
-public class ActionFilterAdapterFactory implements IAdapterFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- @Override
- public Object getAdapter( Object adaptableObject, Class adapterType ) {
- if ( adapterType.isInstance( adaptableObject ) ) {
- return adaptableObject;
- }
- if ( adapterType == IActionFilter.class ) {
- if ( adaptableObject instanceof ICDebugTarget ) {
- return new GDBTargetActionFilter();
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- @Override
- public Class[] getAdapterList() {
- return new Class[] {
- IActionFilter.class
- };
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/CygwinDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/CygwinDebuggerPage.java
deleted file mode 100644
index b39328b21f2..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/CygwinDebuggerPage.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.swt.widgets.TabFolder;
-
-/**
- * CygWin-specific extension of GDBDebuggerPage.
- */
-public class CygwinDebuggerPage extends GDBDebuggerPage {
-
- @Override
- public String getName() {
- return MIUIMessages.getString( "CygwinDebuggerPage.0" ); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
- */
- @Override
- public void createTabs( TabFolder tabFolder ) {
- createMainTab( tabFolder );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
deleted file mode 100644
index 7a73c898dbe..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.io.File;
-import java.util.Observable;
-import java.util.Observer;
-import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.ui.IMILaunchConfigurationComponent;
-import org.eclipse.cdt.debug.mi.ui.MIUIUtils;
-import org.eclipse.cdt.debug.ui.AbstractCDebuggerPage;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The dynamic tab for gdb-based debugger implementations.
- */
-public class GDBDebuggerPage extends AbstractCDebuggerPage implements Observer {
-
- final private static String DEFAULT_MI_PROTOCOL = MIUIMessages.getString( "GDBDebuggerPage.12" ); //$NON-NLS-1$
- final protected String[] protocolItems = new String[] { DEFAULT_MI_PROTOCOL, "mi1", "mi2", "mi3" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-
- protected TabFolder fTabFolder;
-
- protected Text fGDBCommandText;
-
- protected Text fGDBInitText;
-
- protected Combo fProtocolCombo;
-
- private IMILaunchConfigurationComponent fSolibBlock;
-
- private boolean fIsInitializing = false;
-
- private Button fBreakpointsFullPath;
-
- @Override
- public void createControl( Composite parent ) {
- Composite comp = new Composite( parent, SWT.NONE );
- comp.setLayout( new GridLayout() );
- comp.setLayoutData( new GridData( GridData.FILL_BOTH ) );
- fTabFolder = new TabFolder( comp, SWT.NONE );
- fTabFolder.setLayoutData( new GridData( GridData.FILL_BOTH | GridData.GRAB_VERTICAL ) );
- createTabs( fTabFolder );
- fTabFolder.setSelection( 0 );
- setControl( parent );
- }
-
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" ); //$NON-NLS-1$
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, "mi" ); //$NON-NLS-1$
- if ( fSolibBlock != null )
- fSolibBlock.setDefaults( configuration );
- }
-
- @Override
- public boolean isValid( ILaunchConfiguration launchConfig ) {
- boolean valid = fGDBCommandText.getText().length() != 0;
- if ( valid ) {
- setErrorMessage( null );
- setMessage( null );
- }
- else {
- setErrorMessage( MIUIMessages.getString( "GDBDebuggerPage.0" ) ); //$NON-NLS-1$
- setMessage( null );
- }
- return valid;
- }
-
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- setInitializing( true );
- String gdbCommand = "gdb"; //$NON-NLS-1$
- String gdbInit = IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT;
- try {
- gdbCommand = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" ); //$NON-NLS-1$
- }
- catch( CoreException e ) {
- }
- try {
- gdbInit = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT );
- }
- catch( CoreException e ) {
- }
- String miVersion = MIPlugin.getMIVersion( configuration );
- if ( miVersion.compareTo( "mi" ) == 0 ) { //$NON-NLS-1$
- miVersion = DEFAULT_MI_PROTOCOL;
- }
- if ( fSolibBlock != null )
- fSolibBlock.initializeFrom( configuration );
- fGDBCommandText.setText( gdbCommand );
- fGDBInitText.setText( gdbInit );
- int index = 0;
- if ( miVersion.length() > 0 ) {
- for( int i = 0; i < protocolItems.length; ++i ) {
- if ( protocolItems[i].equals( miVersion ) ) {
- index = i;
- break;
- }
- }
- }
- fProtocolCombo.select( index );
-
- boolean useFullPath = IMILaunchConfigurationConstants.DEBUGGER_FULLPATH_BREAKPOINTS_DEFAULT;
- try {
- useFullPath = configuration.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_FULLPATH_BREAKPOINTS, useFullPath);
- }
- catch (CoreException e) {}
- fBreakpointsFullPath.setSelection(useFullPath);
-
- setInitializing( false );
- }
-
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- String str = fGDBCommandText.getText();
- str.trim();
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, str );
- str = fGDBInitText.getText();
- str.trim();
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, str );
- str = fProtocolCombo.getText();
- if ( str.compareTo( DEFAULT_MI_PROTOCOL ) == 0 ) {
- str = "mi"; //$NON-NLS-1$
- }
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_FULLPATH_BREAKPOINTS, fBreakpointsFullPath.getSelection() );
- if ( fSolibBlock != null )
- fSolibBlock.performApply( configuration );
- }
-
- @Override
- public String getName() {
- return MIUIMessages.getString( "GDBDebuggerPage.1" ); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getShell()
- */
- @Override
- protected Shell getShell() {
- return super.getShell();
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
- */
- @Override
- protected void updateLaunchConfigurationDialog() {
- super.updateLaunchConfigurationDialog();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
- */
- @Override
- public void update( Observable o, Object arg ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- public IMILaunchConfigurationComponent createSolibBlock( Composite parent ) {
- IMILaunchConfigurationComponent block = MIUIUtils.createGDBSolibBlock( true, true );
- block.createControl( parent );
- return block;
- }
-
- public void createTabs( TabFolder tabFolder ) {
- createMainTab( tabFolder );
- createSolibTab( tabFolder );
- }
-
- public void createMainTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "GDBDebuggerPage.2" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( tabFolder, 1, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
- Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- subComp.setFont( tabFolder.getFont() );
- Label label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBDebuggerPage.3" ) ); //$NON-NLS-1$
- GridData gd = new GridData();
- // gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBCommandText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- fGDBCommandText.addModifyListener( new ModifyListener() {
-
- @Override
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- Button button = createPushButton( subComp, MIUIMessages.getString( "GDBDebuggerPage.4" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent evt ) {
- handleGDBButtonSelected();
- updateLaunchConfigurationDialog();
- }
-
- private void handleGDBButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "GDBDebuggerPage.5" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBCommandText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBCommandText.setText( res );
- }
- } );
- label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBDebuggerPage.6" ) ); //$NON-NLS-1$
- gd = new GridData();
- // gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBInitText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- fGDBInitText.setLayoutData( gd );
- fGDBInitText.addModifyListener( new ModifyListener() {
-
- @Override
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- button = createPushButton( subComp, MIUIMessages.getString( "GDBDebuggerPage.7" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent evt ) {
- handleGDBInitButtonSelected();
- updateLaunchConfigurationDialog();
- }
-
- private void handleGDBInitButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "GDBDebuggerPage.8" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBInitText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBInitText.setText( res );
- }
- } );
- label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBDebuggerPage.9" ), //$NON-NLS-1$
- 200, SWT.DEFAULT, SWT.WRAP );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- gd.horizontalSpan = 3;
- gd.widthHint = 200;
- label.setLayoutData( gd );
-
- createProtocolCombo( subComp );
-
- createBreakpointFullPathName(subComp);
- GridData gd2 = new GridData();
- gd2.horizontalSpan = 3;
- fBreakpointsFullPath.setLayoutData(gd2);
- }
-
- public void createSolibTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "GDBDebuggerPage.10" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
- fSolibBlock = createSolibBlock( comp );
- if ( fSolibBlock instanceof Observable )
- ((Observable)fSolibBlock).addObserver( this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
- */
- @Override
- public void dispose() {
- if ( fSolibBlock != null ) {
- if ( fSolibBlock instanceof Observable )
- ((Observable)fSolibBlock).deleteObserver( this );
- fSolibBlock.dispose();
- }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void activated( ILaunchConfigurationWorkingCopy workingCopy ) {
- // Override the default behavior
- }
-
- protected boolean isInitializing() {
- return fIsInitializing;
- }
-
- private void setInitializing( boolean isInitializing ) {
- fIsInitializing = isInitializing;
- }
-
- protected void createProtocolCombo( Composite parent ) {
- Label label = new Label( parent, SWT.NONE );
- label.setText( MIUIMessages.getString( "GDBDebuggerPage.11" ) ); //$NON-NLS-1$
- fProtocolCombo = new Combo( parent, SWT.READ_ONLY | SWT.DROP_DOWN );
- fProtocolCombo.setItems( protocolItems );
- fProtocolCombo.addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
-
- protected void createBreakpointFullPathName( Composite parent ) {
- fBreakpointsFullPath = createCheckButton( parent, MIUIMessages.getString( "StandardGDBDebuggerPage.14" ) ); //$NON-NLS-1$
- fBreakpointsFullPath.addSelectionListener( new SelectionListener() {
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
deleted file mode 100644
index 74257032824..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * IBM Corporation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ComboDialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IDialogFieldListener;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-
-/**
- * The dynamic debugger tab for remote launches using gdb server.
- */
-public class GDBServerDebuggerPage extends StandardGDBDebuggerPage {
-
- private final static String CONNECTION_TCP = MIUIMessages.getString( "GDBServerDebuggerPage.0" ); //$NON-NLS-1$
-
- private final static String CONNECTION_SERIAL = MIUIMessages.getString( "GDBServerDebuggerPage.1" ); //$NON-NLS-1$
-
- private ComboDialogField fConnectionField;
-
- private String[] fConnections = new String[]{ CONNECTION_TCP, CONNECTION_SERIAL };
-
- private TCPSettingsBlock fTCPBlock;
-
- private SerialPortSettingsBlock fSerialBlock;
-
- private Composite fConnectionStack;
-
- private boolean fIsInitializing = false;
-
- public GDBServerDebuggerPage() {
- super();
- fConnectionField = createConnectionField();
- fTCPBlock = new TCPSettingsBlock();
- fSerialBlock = new SerialPortSettingsBlock();
- fTCPBlock.addObserver( this );
- fSerialBlock.addObserver( this );
- }
-
- protected void createConnectionTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "GDBServerDebuggerPage.10" ) ); //$NON-NLS-1$
- Composite comp1 = ControlFactory.createCompositeEx( tabFolder, 1, GridData.FILL_BOTH );
- ((GridLayout)comp1.getLayout()).makeColumnsEqualWidth = false;
- comp1.setFont( tabFolder.getFont() );
- tabItem.setControl( comp1 );
- Composite comp = ControlFactory.createCompositeEx( comp1, 2, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- comp.setFont( comp1.getFont() );
-
- createConnectionWidgets(comp);
- }
-
- protected void createConnectionWidgets(Composite comp) {
- fConnectionField.doFillIntoGrid( comp, 2 );
- ((GridData)fConnectionField.getComboControl( null ).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
- fConnectionStack = ControlFactory.createCompositeEx( comp, 1, GridData.FILL_BOTH );
- StackLayout stackLayout = new StackLayout();
- fConnectionStack.setLayout( stackLayout );
- ((GridData)fConnectionStack.getLayoutData()).horizontalSpan = 2;
- fTCPBlock.createBlock( fConnectionStack );
- fSerialBlock.createBlock( fConnectionStack );
- }
-
- private ComboDialogField createConnectionField() {
- ComboDialogField field = new ComboDialogField( SWT.DROP_DOWN | SWT.READ_ONLY );
- field.setLabelText( MIUIMessages.getString( "GDBServerDebuggerPage.9" ) ); //$NON-NLS-1$
- field.setItems( fConnections );
- field.setDialogFieldListener( new IDialogFieldListener() {
-
- @Override
- public void dialogFieldChanged( DialogField f ) {
- if ( !isInitializing() )
- connectionTypeChanged();
- }
- } );
- return field;
- }
-
- protected void connectionTypeChanged() {
- connectionTypeChanged0();
- updateLaunchConfigurationDialog();
- }
-
- private void connectionTypeChanged0() {
- ((StackLayout)fConnectionStack.getLayout()).topControl = null;
- int index = fConnectionField.getSelectionIndex();
- if ( index >= 0 && index < fConnections.length ) {
- String[] connTypes = fConnectionField.getItems();
- if ( CONNECTION_TCP.equals( connTypes[index] ) )
- ((StackLayout)fConnectionStack.getLayout()).topControl = fTCPBlock.getControl();
- else if ( CONNECTION_SERIAL.equals( connTypes[index] ) )
- ((StackLayout)fConnectionStack.getLayout()).topControl = fSerialBlock.getControl();
- }
- fConnectionStack.layout();
- }
-
- @Override
- public boolean isValid( ILaunchConfiguration launchConfig ) {
- if ( super.isValid( launchConfig ) ) {
- setErrorMessage( null );
- setMessage( null );
- int index = fConnectionField.getSelectionIndex();
- if ( index >= 0 && index < fConnections.length ) {
- String[] connTypes = fConnectionField.getItems();
- if ( CONNECTION_TCP.equals( connTypes[index] ) ) {
- if ( !fTCPBlock.isValid( launchConfig ) ) {
- setErrorMessage( fTCPBlock.getErrorMessage() );
- return false;
- }
- }
- else if ( CONNECTION_SERIAL.equals( connTypes[index] ) ) {
- if ( !fSerialBlock.isValid( launchConfig ) ) {
- setErrorMessage( fSerialBlock.getErrorMessage() );
- return false;
- }
- }
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- setInitializing( true );
- super.initializeFrom( configuration );
- boolean isTcp = false;
- try {
- isTcp = configuration.getAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false );
- }
- catch( CoreException e ) {
- }
- fTCPBlock.initializeFrom( configuration );
- fSerialBlock.initializeFrom( configuration );
- fConnectionField.selectItem( (isTcp) ? 0 : 1 );
- connectionTypeChanged0();
- setInitializing( false );
- }
-
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- super.performApply( configuration );
- if ( fConnectionField != null )
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, fConnectionField.getSelectionIndex() == 0 );
- fTCPBlock.performApply( configuration );
- fSerialBlock.performApply( configuration );
- }
-
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- super.setDefaults( configuration );
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false );
- fTCPBlock.setDefaults( configuration );
- fSerialBlock.setDefaults( configuration );
- }
-
- @Override
- protected boolean isInitializing() {
- return fIsInitializing;
- }
-
- private void setInitializing( boolean isInitializing ) {
- fIsInitializing = isInitializing;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
- */
- @Override
- public void createTabs( TabFolder tabFolder ) {
- super.createTabs( tabFolder );
- createConnectionTab( tabFolder );
- }
-
- public void dispose() {
- fTCPBlock.dispose();
- fSerialBlock.dispose();
- fConnectionStack.dispose();
- fConnectionField.dispose();
- super.dispose();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java
deleted file mode 100644
index 92286fe32f8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.util.Map;
-import java.util.Observable;
-import java.util.Observer;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.ui.IMILaunchConfigurationComponent;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * The content of the Shared Libraries tab of the GDBDebuggerPage.
- */
-public class GDBSolibBlock extends Observable implements IMILaunchConfigurationComponent, Observer {
-
- private IMILaunchConfigurationComponent fSolibSearchPathBlock;
-
- private Button fAutoSoLibButton;
-
- private Button fStopOnSolibEventsButton;
-
- private Composite fControl;
-
- private boolean fAutoSolib = false;
-
- private boolean fStopOnSolibEvents = false;
-
- public GDBSolibBlock( IMILaunchConfigurationComponent solibSearchBlock, boolean autoSolib, boolean stopOnSolibEvents ) {
- super();
- fSolibSearchPathBlock = solibSearchBlock;
- fAutoSolib = autoSolib;
- fStopOnSolibEvents = stopOnSolibEvents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#createControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void createControl( Composite parent ) {
- Composite subComp = ControlFactory.createCompositeEx( parent, 1, GridData.FILL_HORIZONTAL );
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- ((GridLayout)subComp.getLayout()).marginHeight = 0;
- ((GridLayout)subComp.getLayout()).marginWidth = 0;
- if ( fSolibSearchPathBlock != null ) {
- fSolibSearchPathBlock.createControl( subComp );
- if ( fSolibSearchPathBlock instanceof Observable )
- ((Observable)fSolibSearchPathBlock).addObserver( this );
- }
- if ( fAutoSolib ) {
- fAutoSoLibButton = ControlFactory.createCheckBox( subComp, MIUIMessages.getString( "GDBSolibBlock.0" ) ); //$NON-NLS-1$
- fAutoSoLibButton.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- updateButtons();
- changed();
- }
- } );
- }
- if ( fStopOnSolibEvents ) {
- fStopOnSolibEventsButton = ControlFactory.createCheckBox( subComp, MIUIMessages.getString( "GDBSolibBlock.1" ) ); //$NON-NLS-1$
- fStopOnSolibEventsButton.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- updateButtons();
- changed();
- }
- } );
- }
- fControl = subComp;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- if ( fSolibSearchPathBlock != null )
- fSolibSearchPathBlock.initializeFrom( configuration );
- try {
- if ( fAutoSoLibButton != null )
- fAutoSoLibButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT ) );
- if ( fStopOnSolibEventsButton != null )
- fStopOnSolibEventsButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT ) );
- initializeButtons( configuration );
- updateButtons();
- }
- catch( CoreException e ) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- if ( fSolibSearchPathBlock != null )
- fSolibSearchPathBlock.performApply( configuration );
- try {
- Map attrs = configuration.getAttributes();
- if ( fAutoSoLibButton != null )
- attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, Boolean.valueOf( fAutoSoLibButton.getSelection() ) );
- if ( fStopOnSolibEventsButton != null )
- attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, Boolean.valueOf( fStopOnSolibEventsButton.getSelection() ) );
- configuration.setAttributes( attrs );
- }
- catch( CoreException e ) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- if ( fSolibSearchPathBlock != null )
- fSolibSearchPathBlock.setDefaults( configuration );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT );
- }
-
- protected void updateButtons() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#dispose()
- */
- @Override
- public void dispose() {
- deleteObservers();
- if ( fSolibSearchPathBlock != null ) {
- if ( fSolibSearchPathBlock instanceof Observable )
- ((Observable)fSolibSearchPathBlock).deleteObserver( this );
- fSolibSearchPathBlock.dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
- */
- @Override
- public void update( Observable o, Object arg ) {
- changed();
- }
-
- protected void changed() {
- setChanged();
- notifyObservers();
- }
-
- protected void initializeButtons( ILaunchConfiguration configuration ) {
- try {
- boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); //$NON-NLS-1$
- if ( fAutoSoLibButton != null )
- fAutoSoLibButton.setEnabled( enable );
- if ( fStopOnSolibEventsButton != null )
- fStopOnSolibEventsButton.setEnabled( enable );
- }
- catch( CoreException e ) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#getControl()
- */
- @Override
- public Control getControl() {
- return fControl;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#isValid(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public boolean isValid( ILaunchConfiguration launchConfig ) {
- // TODO Auto-generated method stub
- return false;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBTargetActionFilter.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBTargetActionFilter.java
deleted file mode 100644
index 7b9d152bc89..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBTargetActionFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.ui.IActionFilter;
-
-/**
- * Comment for .
- */
-public class GDBTargetActionFilter implements IActionFilter {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionFilter#testAttribute(java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public boolean testAttribute( Object target, String name, String value ) {
- if ( target instanceof ICDebugTarget ) {
- if ( name.equals( "GDBTargetActionFilter" ) && value.equals( "isGDBTarget" ) ) { //$NON-NLS-1$//$NON-NLS-2$
- return ( ((ICDebugTarget)target).getAdapter( ICDISession.class ) instanceof Session );
- }
- }
- return false;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIHelpContextIds.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIHelpContextIds.java
deleted file mode 100644
index 60f8ed427b8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIHelpContextIds.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-/**
- * Help context ids for the C/C++ debug ui.
- *
- * This interface contains constants only; it is not intended to be implemented or extended.
- *
- */
-public interface IMIHelpContextIds {
-
- public static final String PREFIX = IMIUIConstants.PLUGIN_ID + "."; //$NON-NLS-1$
-
- // Preference pages
- public static final String MI_PREFERENCE_PAGE = PREFIX + "mi_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIUIConstants.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIUIConstants.java
deleted file mode 100644
index fc8d73d242d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/IMIUIConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-/**
- * Constant definitions for MI UI plug-in.
- */
-public interface IMIUIConstants {
-
- /**
- * Plug-in identifier (value "org.eclipse.cdt.debug.mi.ui").
- */
- public static final String PLUGIN_ID = MIUIPlugin.getUniqueIdentifier();
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
deleted file mode 100644
index 9fa393dcd06..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class MIUIMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.MIUIMessages";//$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- private MIUIMessages() {
- }
-
- public static String getString( String key ) {
- try {
- return RESOURCE_BUNDLE.getString( key );
- }
- catch( MissingResourceException e ) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
deleted file mode 100644
index 5e7d8234a3c..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-###############################################################################
-
-CygwinDebuggerPage.0=Cygwin GDB Debugger Options
-GDBDebuggerPage.0=Debugger executable must be specified.
-GDBDebuggerPage.1=GDB Debugger Options
-GDBDebuggerPage.2=Main
-GDBDebuggerPage.3=GDB debugger:
-GDBDebuggerPage.4=&Browse...
-GDBDebuggerPage.5=GDB Debugger
-GDBDebuggerPage.6=GDB command file:
-GDBDebuggerPage.7=B&rowse...
-GDBDebuggerPage.8=GDB Command File
-GDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
-GDBDebuggerPage.10=Shared Libraries
-GDBDebuggerPage.11=Protocol:
-GDBDebuggerPage.12=Default
-StandardGDBDebuggerPage.0=Debugger executable must be specified.
-StandardGDBDebuggerPage.1=GDB Debugger Options
-StandardGDBDebuggerPage.2=Main
-StandardGDBDebuggerPage.3=GDB debugger:
-StandardGDBDebuggerPage.4=&Browse...
-StandardGDBDebuggerPage.5=GDB Debugger
-StandardGDBDebuggerPage.6=GDB command file:
-StandardGDBDebuggerPage.7=B&rowse...
-StandardGDBDebuggerPage.8=GDB Command File
-StandardGDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
-StandardGDBDebuggerPage.10=Shared Libraries
-StandardGDBDebuggerPage.11=Protocol:
-StandardGDBDebuggerPage.12=GDB command set:
-StandardGDBDebuggerPage.13=Verbose console mode
-StandardGDBDebuggerPage.14=Use full file path to set breakpoints
-GDBServerDebuggerPage.0=TCP
-GDBServerDebuggerPage.1=Serial
-GDBServerDebuggerPage.10=Connection
-GDBServerDebuggerPage.2=Main
-GDBServerDebuggerPage.3=GDB debugger
-GDBServerDebuggerPage.4=&Browse...
-GDBServerDebuggerPage.5=GDB Debugger
-GDBServerDebuggerPage.6=GDB command file:
-GDBServerDebuggerPage.7=B&rowse...
-GDBServerDebuggerPage.8=GDB Command File
-GDBServerDebuggerPage.9=Type:
-GDBSolibBlock.0=Load shared library symbols automatically
-GDBSolibBlock.1=Stop on shared library events
-SerialPortSettingsBlock.0=Device:
-SerialPortSettingsBlock.1=Speed:
-SerialPortSettingsBlock.2=Device must be specified.
-SerialPortSettingsBlock.3=Invalid device.
-SerialPortSettingsBlock.4=Speed must be specified.
-SolibSearchPathBlock.0=Add...
-SolibSearchPathBlock.1=Up
-SolibSearchPathBlock.2=Down
-SolibSearchPathBlock.3=Remove
-SolibSearchPathBlock.4=Directories:
-SolibSearchPathBlock.5=Select directory that contains shared library.
-SolibSearchPathBlock.6=Select From List
-SolibSearchPathBlock.7=Select Libraries
-SolibSearchPathBlock.8=Select libraries to load symbols automatically.
-SolibSearchPathBlock.9=No libraries found.
-SolibSearchPathBlock.Add_Directory=Add Directory
-TCPSettingsBlock.0=Host name or IP address:
-TCPSettingsBlock.1=Port number:
-TCPSettingsBlock.2=Host name or IP address must be specified.
-TCPSettingsBlock.3=Invalid host name or IP address.
-TCPSettingsBlock.4=Port number must be specified.
-TCPSettingsBlock.5=Invalid port number.
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
deleted file mode 100644
index b5de4edd239..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class MIUIPlugin extends AbstractUIPlugin {
-
- /**
- * The plug-in identifier (value "org.eclipse.cdt.debug.mi.ui").
- */
- public static final String PLUGIN_ID = "org.eclipse.cdt.debug.mi.ui" ; //$NON-NLS-1$
-
- //The shared instance.
- private static MIUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public MIUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static MIUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- *
- * @return the unique identifier of this plugin
- */
- public static String getUniqueIdentifier() {
- return PLUGIN_ID;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MinGWDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MinGWDebuggerPage.java
deleted file mode 100644
index 6a05e687a99..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MinGWDebuggerPage.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2007, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.io.File;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
-import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
-import org.eclipse.cdt.core.settings.model.ICProjectDescription;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-
-
-
-/**
- * @author Doug Schaefer
- *
- */
-public class MinGWDebuggerPage extends StandardGDBDebuggerPage {
-
- @Override
- protected String defaultGdbCommand(ILaunchConfiguration configuration) {
- // Lets look it up in the project
- try {
- String projectName = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
- if (projectName.length() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project);
- ICConfigurationDescription configDesc = projDesc.getActiveConfiguration();
- IEnvironmentVariableManager envVarMgr = CCorePlugin.getDefault().getBuildEnvironmentManager();
- IEnvironmentVariable pathvar = envVarMgr.getVariable("PATH", configDesc, true); //$NON-NLS-1$
- if(pathvar != null)
- {
- String path = pathvar.getValue();
- String[] dirs = path.split(pathvar.getDelimiter());
- for (int i = 0; i < dirs.length; ++i) {
- IPath gdbPath = new Path(dirs[i]).append("gdb.exe"); //$NON-NLS-1$
- File gdbFile = gdbPath.toFile();
- if (gdbFile.exists())
- return gdbPath.toOSString();
- }
- }
- }
- } catch (CoreException e) {
- }
-
- return super.defaultGdbCommand(configuration);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SWTUtil.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SWTUtil.java
deleted file mode 100644
index 2f9e0c7e837..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SWTUtil.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Caret;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * Utility class to simplify access to some SWT resources.
- */
-public class SWTUtil {
-
- /**
- * Returns the standard display to be used. The method first checks, if the
- * thread calling this method has an associated disaply. If so, this
- * display is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display;
- display = Display.getCurrent();
- if ( display == null )
- display = Display.getDefault();
- return display;
- }
-
- /**
- * Returns the shell for the given widget. If the widget doesn't represent
- * a SWT object that manage a shell, null is returned.
- *
- * @return the shell for the given widget
- */
- public static Shell getShell(Widget widget) {
- if ( widget instanceof Control )
- return ((Control)widget).getShell();
- if ( widget instanceof Caret )
- return ((Caret)widget).getParent().getShell();
- if ( widget instanceof DragSource )
- return ((DragSource)widget).getControl().getShell();
- if ( widget instanceof DropTarget )
- return ((DropTarget)widget).getControl().getShell();
- if ( widget instanceof Menu )
- return ((Menu)widget).getParent().getShell();
- if ( widget instanceof ScrollBar )
- return ((ScrollBar)widget).getParent().getShell();
- return null;
- }
-
- /**
- * Returns a width hint for a button control.
- */
- public static int getButtonWidthHint( Button button ) {
- PixelConverter converter = new PixelConverter( button );
- int widthHint = converter.convertHorizontalDLUsToPixels( IDialogConstants.BUTTON_WIDTH );
- return Math.max( widthHint, button.computeSize( SWT.DEFAULT, SWT.DEFAULT, true ).x );
- }
-
- /**
- * Returns a height hint for a button control.
- */
-// public static int getButtonHeigthHint( Button button ) {
-// PixelConverter converter = new PixelConverter( button );
-// return converter.convertVerticalDLUsToPixels( IDialogConstants.BUTTON_HEIGHT );
-// }
-
- /**
- * Sets width and height hint for the button control. Note: This
- * is a NOP if the button's layout data is not an instance of GridData.
- *
- * @param the button for which to set the dimension hint
- */
- public static void setButtonDimensionHint( Button button ) {
- Assert.isNotNull( button );
- Object gd = button.getLayoutData();
- if ( gd instanceof GridData ) {
- ((GridData)gd).widthHint = getButtonWidthHint( button );
- ((GridData)gd).horizontalAlignment = GridData.FILL;
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
deleted file mode 100644
index 6c2b32fc5ca..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.util.Observable;
-
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ComboDialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IDialogFieldListener;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.LayoutUtil;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.StringDialogField;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-public class SerialPortSettingsBlock extends Observable {
-
- private final static String DEFAULT_ASYNC_DEVICE = "/dev/ttyS0"; //$NON-NLS-1$
-
- private final static String DEFAULT_ASYNC_DEVICE_SPEED = "115200"; //$NON-NLS-1$
-
- private Shell fShell;
-
- private StringDialogField fDeviceField;
-
- private ComboDialogField fSpeedField;
-
- private String fSpeedChoices[] = { "9600", "19200", "38400", "57600", "115200" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-
- private Control fControl;
-
- private String fErrorMessage = null;
-
- public SerialPortSettingsBlock() {
- super();
- fDeviceField = createDeviceField();
- fSpeedField = createSpeedField();
- }
-
- public void createBlock( Composite parent ) {
- fShell = parent.getShell();
- Composite comp = ControlFactory.createCompositeEx( parent, 2, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- ((GridLayout)comp.getLayout()).marginHeight = 0;
- ((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( parent.getFont() );
- PixelConverter converter = new PixelConverter( comp );
- fDeviceField.doFillIntoGrid( comp, 2 );
- LayoutUtil.setWidthHint( fDeviceField.getTextControl( null ), converter.convertWidthInCharsToPixels( 20 ) );
- fSpeedField.doFillIntoGrid( comp, 2 );
- ((GridData)fSpeedField.getComboControl( null ).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
- setControl( comp );
- }
-
- protected Shell getShell() {
- return fShell;
- }
-
- public void dispose() {
- deleteObservers();
- }
-
- public void initializeFrom( ILaunchConfiguration configuration ) {
- initializeDevice( configuration );
- initializeSpeed( configuration );
- }
-
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV, DEFAULT_ASYNC_DEVICE );
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV_SPEED, DEFAULT_ASYNC_DEVICE_SPEED );
- }
-
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- if ( fDeviceField != null )
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV, fDeviceField.getText().trim() );
- if ( fSpeedField != null ) {
- int index = fSpeedField.getSelectionIndex();
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV_SPEED, getSpeedItem( index ) );
- }
- }
-
- private StringDialogField createDeviceField() {
- StringDialogField field = new StringDialogField();
- field.setLabelText( MIUIMessages.getString( "SerialPortSettingsBlock.0" ) ); //$NON-NLS-1$
- field.setDialogFieldListener( new IDialogFieldListener() {
-
- @Override
- public void dialogFieldChanged( DialogField f ) {
- deviceFieldChanged();
- }
- } );
- return field;
- }
-
- private ComboDialogField createSpeedField() {
- ComboDialogField field = new ComboDialogField( SWT.DROP_DOWN | SWT.READ_ONLY );
- field.setLabelText( MIUIMessages.getString( "SerialPortSettingsBlock.1" ) ); //$NON-NLS-1$
- field.setItems( fSpeedChoices );
- field.setDialogFieldListener( new IDialogFieldListener() {
-
- @Override
- public void dialogFieldChanged( DialogField f ) {
- speedFieldChanged();
- }
- } );
- return field;
- }
-
- protected void deviceFieldChanged() {
- updateErrorMessage();
- setChanged();
- notifyObservers();
- }
-
- protected void speedFieldChanged() {
- updateErrorMessage();
- setChanged();
- notifyObservers();
- }
-
- private void initializeDevice( ILaunchConfiguration configuration ) {
- if ( fDeviceField != null ) {
- try {
- fDeviceField.setText( configuration.getAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV, DEFAULT_ASYNC_DEVICE ) );
- }
- catch( CoreException e ) {
- }
- }
- }
-
- private void initializeSpeed( ILaunchConfiguration configuration ) {
- if ( fSpeedField != null ) {
- int index = 0;
- try {
- index = getSpeedItemIndex( configuration.getAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_DEV_SPEED, DEFAULT_ASYNC_DEVICE_SPEED ) );
- }
- catch( CoreException e ) {
- }
- fSpeedField.selectItem( index );
- }
- }
-
- private String getSpeedItem( int index ) {
- return (index >= 0 && index < fSpeedChoices.length) ? fSpeedChoices[index] : null;
- }
-
- private int getSpeedItemIndex( String item ) {
- for( int i = 0; i < fSpeedChoices.length; ++i )
- if ( fSpeedChoices[i].equals( item ) )
- return i;
- return 0;
- }
-
- public Control getControl() {
- return fControl;
- }
-
- protected void setControl( Control control ) {
- fControl = control;
- }
-
- public boolean isValid( ILaunchConfiguration configuration ) {
- updateErrorMessage();
- return (getErrorMessage() == null);
- }
-
- private void updateErrorMessage() {
- setErrorMessage( null );
- if ( fDeviceField != null && fSpeedField != null ) {
- if ( fDeviceField.getText().trim().length() == 0 )
- setErrorMessage( MIUIMessages.getString( "SerialPortSettingsBlock.2" ) ); //$NON-NLS-1$
- else if ( !deviceIsValid( fDeviceField.getText().trim() ) )
- setErrorMessage( MIUIMessages.getString( "SerialPortSettingsBlock.3" ) ); //$NON-NLS-1$
- else if ( fSpeedField.getSelectionIndex() < 0 )
- setErrorMessage( MIUIMessages.getString( "SerialPortSettingsBlock.4" ) ); //$NON-NLS-1$
- }
- }
-
- public String getErrorMessage() {
- return fErrorMessage;
- }
-
- private void setErrorMessage( String string ) {
- fErrorMessage = string;
- }
-
- private boolean deviceIsValid( String hostName ) {
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
deleted file mode 100644
index 82adc381f1a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
+++ /dev/null
@@ -1,622 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * IBM Corporation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Observable;
-import java.util.Set;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.IBinaryParser;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryShared;
-import org.eclipse.cdt.core.model.CoreModelUtil;
-import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.core.MICoreUtils;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IDialogFieldListener;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IListAdapter;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.LayoutUtil;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ListDialogField;
-import org.eclipse.cdt.debug.mi.ui.IMILaunchConfigurationComponent;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
-
-/**
- * The UI component to access the shared libraries search path.
- */
-public class SolibSearchPathBlock extends Observable implements IMILaunchConfigurationComponent, IDialogFieldListener {
-
- class AddDirectoryDialog extends Dialog {
-
- protected Text fText;
-
- private Button fBrowseButton;
-
- private IPath fValue;
-
- /**
- * Constructor for AddDirectoryDialog.
- */
- public AddDirectoryDialog( Shell parentShell ) {
- super( parentShell );
- }
-
- @Override
- protected Control createDialogArea( Composite parent ) {
- Composite composite = (Composite)super.createDialogArea( parent );
-
- Composite subComp = ControlFactory.createCompositeEx( composite, 2, GridData.FILL_HORIZONTAL );
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- GridData data = new GridData( GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER );
- data.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
- subComp.setLayoutData( data );
- subComp.setFont( parent.getFont() );
-
- fText = new Text( subComp, SWT.SINGLE | SWT.BORDER );
- fText.setLayoutData( new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL ) );
- fText.addModifyListener( new ModifyListener() {
-
- @Override
- public void modifyText( ModifyEvent e ) {
- updateOKButton();
- }
- } );
-
- fBrowseButton = ControlFactory.createPushButton( subComp, MIUIMessages.getString( "GDBServerDebuggerPage.7" ) ); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- fBrowseButton.setLayoutData( data );
- fBrowseButton.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent evt ) {
- DirectoryDialog dialog = new DirectoryDialog( AddDirectoryDialog.this.getShell() );
- dialog.setMessage( MIUIMessages.getString( "SolibSearchPathBlock.5" ) ); //$NON-NLS-1$
- String res = dialog.open();
- if ( res != null ) {
- fText.setText( res );
- }
- }
- } );
-
- applyDialogFont( composite );
- return composite;
- }
-
- @Override
- protected void configureShell( Shell newShell ) {
- super.configureShell( newShell );
- newShell.setText( MIUIMessages.getString( "SolibSearchPathBlock.Add_Directory" ) ); //$NON-NLS-1$
- }
-
- public IPath getValue() {
- return fValue;
- }
-
- private void setValue( String value ) {
- fValue = ( value != null ) ? new Path( value ) : null;
- }
-
- @Override
- protected void buttonPressed( int buttonId ) {
- if ( buttonId == IDialogConstants.OK_ID ) {
- setValue( fText.getText() );
- }
- else {
- setValue( null );
- }
- super.buttonPressed( buttonId );
- }
-
- protected void updateOKButton() {
- Button okButton = getButton( IDialogConstants.OK_ID );
- String text = fText.getText();
- okButton.setEnabled( isValid( text ) );
- }
-
- protected boolean isValid( String text ) {
- return ( text.trim().length() > 0 );
- }
-
- @Override
- protected Control createButtonBar( Composite parent ) {
- Control control = super.createButtonBar( parent );
- updateOKButton();
- return control;
- }
- }
-
- private Composite fControl;
-
- public class SolibSearchPathListDialogField extends ListDialogField {
-
- public SolibSearchPathListDialogField( IListAdapter adapter, String[] buttonLabels, ILabelProvider lprovider ) {
- super( adapter, buttonLabels, lprovider );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.ui.dialogfields.ListDialogField#managedButtonPressed(int)
- */
- @Override
- protected boolean managedButtonPressed( int index ) {
- boolean result = super.managedButtonPressed( index );
- if ( result )
- buttonPressed( index );
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ListDialogField#getManagedButtonState(org.eclipse.jface.viewers.ISelection, int)
- */
- @Override
- protected boolean getManagedButtonState( ISelection sel, int index ) {
- if ( index > 3 )
- return getButtonState( sel, index );
- return super.getManagedButtonState( sel, index );
- }
- }
-
- private static String[] fgStaticButtonLabels = new String[] {
- MIUIMessages.getString( "SolibSearchPathBlock.0" ), //$NON-NLS-1$
- MIUIMessages.getString( "SolibSearchPathBlock.1" ), //$NON-NLS-1$
- MIUIMessages.getString( "SolibSearchPathBlock.2" ), //$NON-NLS-1$
- MIUIMessages.getString( "SolibSearchPathBlock.3" ), //$NON-NLS-1$
- MIUIMessages.getString( "SolibSearchPathBlock.6" ), //$NON-NLS-1$
- null, // separator
- };
-
- private IProject fProject;
-
- private Shell fShell;
-
- private SolibSearchPathListDialogField fDirList;
-
- private IListAdapter fCustomListAdapter;
-
- private File[] fAutoSolibs = new File[0];
-
- public SolibSearchPathBlock() {
- this( new String[0], null );
- }
-
- public SolibSearchPathBlock( String[] customButtonLabels, IListAdapter customListAdapter ) {
- super();
- fCustomListAdapter = customListAdapter;
- int length = fgStaticButtonLabels.length;
- if ( customButtonLabels.length > 0 )
- length += customButtonLabels.length;
- String[] buttonLabels = new String[length];
- System.arraycopy( fgStaticButtonLabels, 0, buttonLabels, 0, fgStaticButtonLabels.length );
- if ( length > fgStaticButtonLabels.length ) {
- for ( int i = fgStaticButtonLabels.length; i < length; ++i )
- buttonLabels[i] = customButtonLabels[i - fgStaticButtonLabels.length];
- }
- IListAdapter listAdapter = new IListAdapter() {
- @Override
- public void customButtonPressed( DialogField field, int index ) {
- buttonPressed( index );
- }
- @Override
- public void selectionChanged( DialogField field ) {
- }
- };
- ILabelProvider lp = new LabelProvider() {
- @Override
- public String getText( Object element ) {
- if ( element instanceof IPath )
- return ((IPath)element).toOSString();
- return super.getText( element );
- }
- };
- fDirList = new SolibSearchPathListDialogField( listAdapter, buttonLabels, lp );
- fDirList.setLabelText( MIUIMessages.getString( "SolibSearchPathBlock.4" ) ); //$NON-NLS-1$
- fDirList.setUpButtonIndex( 1 );
- fDirList.setDownButtonIndex( 2 );
- fDirList.setRemoveButtonIndex( 3 );
-
- fDirList.setDialogFieldListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#createControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void createControl( Composite parent ) {
- fShell = parent.getShell();
- Composite comp = ControlFactory.createCompositeEx( parent, 2, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- ((GridLayout)comp.getLayout()).marginHeight = 0;
- ((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( parent.getFont() );
- PixelConverter converter = new PixelConverter( comp );
- fDirList.doFillIntoGrid( comp, 3 );
- LayoutUtil.setHorizontalSpan( fDirList.getLabelControl( null ), 2 );
- LayoutUtil.setWidthHint( fDirList.getLabelControl( null ), converter.convertWidthInCharsToPixels( 30 ) );
- LayoutUtil.setHorizontalGrabbing( fDirList.getListControl( null ) );
- fControl = comp;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- IProject project = null;
- try {
- String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null );
- if ( projectName != null ) {
- projectName = projectName.trim();
- if ( projectName.length() > 0 ) {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
- }
- }
- }
- catch( CoreException e ) {
- }
- setProject( project );
-
- if ( fDirList != null ) {
- try {
- List values = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST );
- ArrayList paths = new ArrayList( values.size() );
- Iterator it = values.iterator();
- while( it.hasNext() ) {
- paths.add( new Path( (String)it.next() ) );
- }
- fDirList.addElements( paths );
- }
- catch( CoreException e ) {
- }
- }
-
- try {
- fAutoSolibs = MICoreUtils.getAutoSolibs( configuration );
- }
- catch( CoreException e ) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- if ( fDirList != null ) {
- List elements = fDirList.getElements();
- ArrayList values = new ArrayList( elements.size() );
- Iterator it = elements.iterator();
- while( it.hasNext() ) {
- values.add( ((IPath)it.next()).toOSString() );
- }
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, values );
- }
- ArrayList autoLibs = new ArrayList( fAutoSolibs.length );
- for ( int i = 0; i < fAutoSolibs.length; ++i )
- autoLibs.add( fAutoSolibs[i].getPath() );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB_LIST, autoLibs );
- }
-
- protected void buttonPressed( int index ) {
- boolean changed = false;
- if ( index == 0 ) { // Add button
- changed = addDirectory();
- }
- else if ( index == 4 ) { //Select from list
- changed = selectFromList();
- }
- else if ( index >= fgStaticButtonLabels.length && fCustomListAdapter != null ) {
- fCustomListAdapter.customButtonPressed( fDirList, index );
- changed = true;
- }
- if ( changed ) {
- setChanged();
- notifyObservers();
- }
- }
-
- protected boolean getButtonState( ISelection sel, int index ) {
- if ( index == 4 ) { // select from list
- return ( !sel.isEmpty() );
- }
- return true;
- }
-
- protected Shell getShell() {
- return fShell;
- }
-
- protected DialogField getDirList(){
- return fDirList;
- }
- protected boolean addDirectory() {
- boolean changed = false;
- AddDirectoryDialog dialog = new AddDirectoryDialog( getShell() );
- dialog.open();
- IPath result = dialog.getValue();
- if ( result != null && !contains( result ) ) {
- fDirList.addElement( result );
- changed = true;
- }
- return changed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#dispose()
- */
- @Override
- public void dispose() {
- deleteObservers();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#getControl()
- */
- @Override
- public Control getControl() {
- return fControl;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#isValid(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public boolean isValid( ILaunchConfiguration launchConfig ) {
- // TODO Auto-generated method stub
- return false;
- }
-
- protected boolean contains( IPath path ) {
- List list = fDirList.getElements();
- Iterator it = list.iterator();
- while( it.hasNext() ) {
- IPath p = (IPath)it.next();
- if ( p.toFile().equals( path.toFile() ) )
- return true;
- }
- return false;
- }
-
- protected IProject getProject() {
- return fProject;
- }
-
- private void setProject( IProject project ) {
- fProject = project;
- }
-
- protected boolean selectFromList() {
- boolean changed = false;
- List dirList = fDirList.getSelectedElements();
- final HashSet libs = new HashSet( 10 );
- if ( generateLibraryList( (IPath[])dirList.toArray( new IPath[dirList.size()] ), libs ) ) {
- ITreeContentProvider cp = new ITreeContentProvider() {
-
- @Override
- public Object[] getChildren( Object parentElement ) {
- return getElements( parentElement );
- }
-
- @Override
- public Object getParent( Object element ) {
- if ( libs.contains( element ) )
- return libs;
- return null;
- }
-
- @Override
- public boolean hasChildren( Object element ) {
- return false;
- }
-
- @Override
- public Object[] getElements( Object inputElement ) {
- if ( inputElement instanceof Set ) {
- return ((Set)inputElement).toArray();
- }
- return new Object[0];
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) {
- }
- };
-
- LabelProvider lp = new LabelProvider() {
-
- @Override
- public String getText( Object element ) {
- if ( element instanceof File )
- return ((File)element).getName();
- return super.getText( element );
- }
- };
- CheckedTreeSelectionDialog dialog = new CheckedTreeSelectionDialog( getShell(), lp, cp );
- dialog.setTitle( MIUIMessages.getString( "SolibSearchPathBlock.7" ) ); //$NON-NLS-1$
- dialog.setMessage( MIUIMessages.getString( "SolibSearchPathBlock.8" ) ); //$NON-NLS-1$
- dialog.setEmptyListMessage( MIUIMessages.getString( "SolibSearchPathBlock.9" ) ); //$NON-NLS-1$
- dialog.setSorter( new ViewerSorter() );
- dialog.setInput( libs );
- dialog.setInitialElementSelections( Arrays.asList( fAutoSolibs ) );
- if ( dialog.open() == Window.OK ) {
- Object[] result = dialog.getResult();
- fAutoSolibs = Arrays.asList( result ).toArray( new File[result.length] );
- changed = true;
- }
- }
- return changed;
- }
-
- private boolean generateLibraryList( final IPath[] paths, final Set libs ) {
- boolean result = true;
-
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- @Override
- public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException {
-
- for ( int i = 0; i < paths.length; ++i ) {
- File dir = paths[i].toFile();
- if ( dir.exists() && dir.isDirectory() ) {
- File[] all = dir.listFiles();
- for ( int j = 0; j < all.length; ++j ) {
- if ( monitor.isCanceled() ) {
- throw new InterruptedException();
- }
- monitor.subTask( all[j].getPath() );
- String libName = getSharedLibraryName( all[j] );
- if ( libName != null ) {
- libs.add( new File( libName ) );
- }
- }
- }
- }
- }
- };
- try {
- IRunnableContext context = new ProgressMonitorDialog( getShell() );
- context.run( true, true, runnable );
- }
- catch( InvocationTargetException e ) {
- }
- catch( InterruptedException e ) {
- result = false;
- }
- return result;
- }
-
- protected String getSharedLibraryName( File file ) {
- if ( !file.isFile() )
- return null;
- IProject project = getProject();
- if ( project != null ) {
- IPath fullPath = new Path( file.getPath() );
- try {
- ICConfigExtensionReference[] binaryParsersExt = CCorePlugin.getDefault().getDefaultBinaryParserExtensions( project );
- for( int i = 0; i < binaryParsersExt.length; i++ ) {
- IBinaryParser parser = CoreModelUtil.getBinaryParser(binaryParsersExt[i]);
- try {
- IBinaryFile bin = parser.getBinary( fullPath );
- if ( bin instanceof IBinaryShared ) {
- String soname = ((IBinaryShared)bin).getSoName();
- return ( soname.length() != 0 ) ? soname : file.getName();
- }
- }
- catch( IOException e ) {
- }
- }
- }
- catch( CoreException e ) {
- }
- return null;
- }
- // no project: for now
- IPath path = new Path( file.getPath() );
- String name = path.lastSegment();
- String extension = path.getFileExtension();
- if ( extension != null && (extension.compareTo( "so" ) == 0 || extension.compareToIgnoreCase( "dll" ) == 0) ) //$NON-NLS-1$ //$NON-NLS-2$
- return name;
- return ( name.indexOf( ".so." ) >= 0 ) ? name : null; //$NON-NLS-1$
- }
-
- protected boolean isSharedLibrary( File file ) {
- if ( !file.isFile() )
- return false;
- IProject project = getProject();
- if ( project != null ) {
- IPath fullPath = new Path( file.getPath() );
- try {
- ICConfigExtensionReference[] binaryParsersExt = CCorePlugin.getDefault().getDefaultBinaryParserExtensions( project );
- for( int i = 0; i < binaryParsersExt.length; i++ ) {
- IBinaryParser parser = CoreModelUtil.getBinaryParser(binaryParsersExt[i]);
- try {
- IBinaryFile bin = parser.getBinary( fullPath );
- return ( bin instanceof IBinaryShared );
- }
- catch( IOException e ) {
- }
- }
- }
- catch( CoreException e ) {
- }
- return false;
- }
- // no project: for now
- IPath path = new Path( file.getPath() );
- String extension = path.getFileExtension();
- if ( extension != null && (extension.compareTo( "so" ) == 0 || extension.compareToIgnoreCase( "dll" ) == 0) ) //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- String name = path.lastSegment();
- return ( name.indexOf( ".so." ) >= 0 ); //$NON-NLS-1$
- }
-
- @Override
- public void dialogFieldChanged(DialogField field) {
- setChanged();
- notifyObservers();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
deleted file mode 100644
index 9d8c36387e4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Vladimir Prus (vladimir@codesourcery.com) - bug 156114: GDB options layout
- * problem
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Observable;
-import java.util.Observer;
-import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.command.factories.CommandFactoryDescriptor;
-import org.eclipse.cdt.debug.mi.ui.IMILaunchConfigurationComponent;
-import org.eclipse.cdt.debug.mi.ui.MIUIUtils;
-import org.eclipse.cdt.debug.ui.AbstractCDebuggerPage;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.cdt.utils.Platform;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The dynamic tab for gdb-based debugger implementations.
- */
-public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Observer {
-
- private final static String DEFAULT_MI_VERSION = "mi"; //$NON-NLS-1$
-
- protected TabFolder fTabFolder;
-
- protected Text fGDBCommandText;
-
- protected Text fGDBInitText;
-
- protected Combo fCommandFactoryCombo;
-
- protected Combo fProtocolCombo;
-
- protected Button fVerboseModeButton;
- protected Button fBreakpointsFullPath;
-
- private IMILaunchConfigurationComponent fSolibBlock;
-
- private CommandFactoryDescriptor[] fCommandFactoryDescriptors;
-
- private boolean fIsInitializing = false;
-
- private static boolean gdb64ExistsIsCached = false;
-
- private static boolean cachedGdb64Exists;
-
- @Override
- public void createControl( Composite parent ) {
- Composite comp = new Composite( parent, SWT.NONE );
- comp.setLayout( new GridLayout() );
- comp.setLayoutData( new GridData( GridData.FILL_BOTH ) );
- fTabFolder = new TabFolder( comp, SWT.NONE );
- fTabFolder.setLayoutData( new GridData( GridData.FILL_BOTH | GridData.GRAB_VERTICAL ) );
- createTabs( fTabFolder );
- fTabFolder.setSelection( 0 );
- setControl( parent );
- }
-
- @Override
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, defaultGdbCommand(configuration));
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, MIPlugin.getDefault().getCommandFactoryManager().getDefaultDescriptor( getDebuggerIdentifier() ).getIdentifier() );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
- if ( fSolibBlock != null )
- fSolibBlock.setDefaults( configuration );
- }
-
- protected String defaultGdbCommand(ILaunchConfiguration configuration) {
- String gdbCommand = null;
-
- if (Platform.getOS().equals(Platform.OS_LINUX) &&
- Platform.getOSArch().equals("ppc64")) { //$NON-NLS-1$
- // On SLES 9 and 10 for ppc64 arch, there is a separate
- // 64-bit capable gdb called gdb64. It can
- // also debug 32-bit executables, so let's see if it exists.
- if (!gdb64ExistsIsCached) {
- Process unameProcess;
- int interruptedRetryCount = 5;
-
- String cmd[] = {"gdb64", "--version"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- gdb64ExistsIsCached = true;
-
- while (interruptedRetryCount >= 0) {
- try {
- unameProcess = Runtime.getRuntime().exec(cmd);
- int exitStatus = unameProcess.waitFor();
-
- cachedGdb64Exists = (exitStatus == 0);
- break;
- } catch (IOException e) {
- cachedGdb64Exists = false;
- break;
- } catch (InterruptedException e) {
- // Never should get here, really. The chances of the command being interrupted
- // are very small
- cachedGdb64Exists = false;
- interruptedRetryCount--;
- }
- }
- }
- if (cachedGdb64Exists) {
- gdbCommand = "gdb64"; //$NON-NLS-1$
- } else {
- gdbCommand = IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT;
- }
- } else {
- gdbCommand = IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT;
- }
- return gdbCommand;
- }
-
-
- @Override
- public boolean isValid( ILaunchConfiguration launchConfig ) {
- boolean valid = fGDBCommandText.getText().length() != 0;
- if ( valid ) {
- setErrorMessage( null );
- setMessage( null );
- }
- else {
- setErrorMessage( MIUIMessages.getString( "StandardGDBDebuggerPage.0" ) ); //$NON-NLS-1$
- setMessage( null );
- }
- return valid;
- }
-
- @Override
- public void initializeFrom( ILaunchConfiguration configuration ) {
- setInitializing( true );
- String gdbCommand = defaultGdbCommand(configuration);
- String gdbInit = IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT;
- try {
- gdbCommand = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, defaultGdbCommand(configuration));
- }
- catch( CoreException e ) {
- }
- try {
- gdbInit = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT );
- }
- catch( CoreException e ) {
- }
- if ( fSolibBlock != null )
- fSolibBlock.initializeFrom( configuration );
- fGDBCommandText.setText( gdbCommand );
- fGDBInitText.setText( gdbInit );
-
- String debuggerID = getDebuggerIdentifier();
- fCommandFactoryDescriptors = MIPlugin.getDefault().getCommandFactoryManager().getDescriptors( debuggerID );
- Arrays.sort( fCommandFactoryDescriptors,
- new Comparator() {
- @Override
- public int compare( Object arg0, Object arg1 ) {
- return ((CommandFactoryDescriptor)arg0).getName().compareTo( ((CommandFactoryDescriptor)arg1).getName() );
- }
- } );
- String[] descLabels = new String[fCommandFactoryDescriptors.length];
- String commandFactoryId = MIPlugin.getCommandFactory( configuration );
- int index = -1;
- for( int i = 0; i < fCommandFactoryDescriptors.length; ++i ) {
- descLabels[i] = fCommandFactoryDescriptors[i].getName();
- if ( fCommandFactoryDescriptors[i].getIdentifier().equals( commandFactoryId ) )
- index = i;
- }
- fCommandFactoryCombo.setItems( descLabels );
- if ( index < 0 ) {
- index = 0;
- }
-
- //It may be the case that we can't match up any identifier with any installed debuggers associated
- //with this debuggerID (ie fCommandFactoryDescriptors.length == 0) for example when importing a
- //launch from different environments that use CDT debugging. In this case we try and soldier on
- //using the defaults as much as is realistic.
- String[] miVersions = new String[0];
- if(index < fCommandFactoryDescriptors.length) {
- fCommandFactoryCombo.select( index );
- miVersions = fCommandFactoryDescriptors[index].getMIVersions();
- }
- fProtocolCombo.setItems( miVersions );
- if ( miVersions.length == 0 ) {
- miVersions = new String[] { DEFAULT_MI_VERSION };
- }
- String mi = DEFAULT_MI_VERSION;
- try {
- mi = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, DEFAULT_MI_VERSION );
- }
- catch( CoreException e ) {
- // use default
- }
- int miIndex = 0;
- for ( int i = 0; i < miVersions.length; ++i ) {
- if ( miVersions[i].equals( mi ) ) {
- miIndex = i;
- break;
- }
- }
- fProtocolCombo.select( miIndex );
- boolean verboseMode = IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
- try {
- verboseMode = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
- }
- catch( CoreException e ) {
- // use default
- }
- fVerboseModeButton.setSelection( verboseMode );
- fBreakpointsFullPath.setSelection(getBreakpointsWithFullNameAttribute(configuration));
- // We've populated combos, which affects their preferred size, and so must relayout things.
- Control changed[] = { fCommandFactoryCombo, fProtocolCombo };
- ((Composite) getControl()).layout( changed );
-
- setInitializing( false );
- }
- protected boolean getBreakpointsWithFullNameAttribute( ILaunchConfiguration config ) {
- boolean result = IMILaunchConfigurationConstants.DEBUGGER_FULLPATH_BREAKPOINTS_DEFAULT;
- try {
- return config.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_FULLPATH_BREAKPOINTS, result );
- }
- catch( CoreException e ) {
- // use default
- }
- return result;
- }
- @Override
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- String str = fGDBCommandText.getText();
- str.trim();
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, str );
- str = fGDBInitText.getText();
- str.trim();
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, str );
- str = fCommandFactoryCombo.getText();
- int index = fCommandFactoryCombo.indexOf( str );
- str = ( index < 0 ) ? "" : fCommandFactoryDescriptors[index].getIdentifier(); //$NON-NLS-1$
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, str );
- str = fProtocolCombo.getText();
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );
- if ( fSolibBlock != null )
- fSolibBlock.performApply( configuration );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, fVerboseModeButton.getSelection() );
- configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_FULLPATH_BREAKPOINTS, fBreakpointsFullPath.getSelection() );
- }
-
- @Override
- public String getName() {
- return MIUIMessages.getString( "StandardGDBDebuggerPage.1" ); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getShell()
- */
- @Override
- protected Shell getShell() {
- return super.getShell();
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
- */
- @Override
- protected void updateLaunchConfigurationDialog() {
- super.updateLaunchConfigurationDialog();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
- */
- @Override
- public void update( Observable o, Object arg ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- public IMILaunchConfigurationComponent createSolibBlock( Composite parent ) {
- IMILaunchConfigurationComponent block = MIUIUtils.createGDBSolibBlock( true, true );
- block.createControl( parent );
- return block;
- }
-
- public void createTabs( TabFolder tabFolder ) {
- createMainTab( tabFolder );
- createSolibTab( tabFolder );
- }
-
- public void createMainTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.2" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( tabFolder, 1, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
- Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- subComp.setFont( tabFolder.getFont() );
- Label label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "StandardGDBDebuggerPage.3" ) ); //$NON-NLS-1$
- GridData gd = new GridData();
-// gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBCommandText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- fGDBCommandText.addModifyListener( new ModifyListener() {
-
- @Override
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- Button button = createPushButton( subComp, MIUIMessages.getString( "StandardGDBDebuggerPage.4" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent evt ) {
- handleGDBButtonSelected();
- updateLaunchConfigurationDialog();
- }
-
- private void handleGDBButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.5" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBCommandText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBCommandText.setText( res );
- }
- } );
- label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "StandardGDBDebuggerPage.6" ) ); //$NON-NLS-1$
- gd = new GridData();
-// gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBInitText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- fGDBInitText.setLayoutData( gd );
- fGDBInitText.addModifyListener( new ModifyListener() {
-
- @Override
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- button = createPushButton( subComp, MIUIMessages.getString( "StandardGDBDebuggerPage.7" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected( SelectionEvent evt ) {
- handleGDBInitButtonSelected();
- updateLaunchConfigurationDialog();
- }
-
- private void handleGDBInitButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.8" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBInitText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBInitText.setText( res );
- }
- } );
- label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "StandardGDBDebuggerPage.9" ), //$NON-NLS-1$
- 200, SWT.DEFAULT, SWT.WRAP );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- gd.horizontalSpan = 3;
- gd.widthHint = 200;
- label.setLayoutData( gd );
-
- Composite options = ControlFactory.createCompositeEx( subComp, 2, GridData.FILL_HORIZONTAL );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- gd.horizontalSpan = 3;
- options.setLayoutData( gd );
- createCommandFactoryCombo( options );
- createProtocolCombo( options );
- createVerboseModeButton( subComp );
- createBreakpointFullPathName(subComp);
- // fit options into 3-grid one per line
- GridData gd1 = new GridData();
- gd1.horizontalSpan = 3;
- fVerboseModeButton.setLayoutData(gd1);
- GridData gd2 = new GridData();
- gd2.horizontalSpan = 3;
- fBreakpointsFullPath.setLayoutData(gd2);
- }
-
- public void createSolibTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.10" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
- fSolibBlock = createSolibBlock( comp );
- if ( fSolibBlock instanceof Observable )
- ((Observable)fSolibBlock).addObserver( this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
- */
- @Override
- public void dispose() {
- if ( fSolibBlock != null ) {
- if ( fSolibBlock instanceof Observable )
- ((Observable)fSolibBlock).deleteObserver( this );
- fSolibBlock.dispose();
- }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- @Override
- public void activated( ILaunchConfigurationWorkingCopy workingCopy ) {
- // Override the default behavior
- }
-
- protected boolean isInitializing() {
- return fIsInitializing;
- }
-
- private void setInitializing( boolean isInitializing ) {
- fIsInitializing = isInitializing;
- }
-
- protected void createCommandFactoryCombo( Composite parent ) {
- Label label = new Label( parent, SWT.NONE );
- label.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.12" ) ); //$NON-NLS-1$
- fCommandFactoryCombo = new Combo( parent, SWT.READ_ONLY | SWT.DROP_DOWN );
- fCommandFactoryCombo.addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
-
- protected void createProtocolCombo( Composite parent ) {
- Label label = new Label( parent, SWT.NONE );
- label.setText( MIUIMessages.getString( "StandardGDBDebuggerPage.11" ) ); //$NON-NLS-1$
- fProtocolCombo = new Combo( parent, SWT.READ_ONLY | SWT.DROP_DOWN );
- fProtocolCombo.addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
-
- protected String getCurrentCommandFactoryID() {
- String name = fCommandFactoryCombo.getText();
- for ( int i = 0; i < fCommandFactoryDescriptors.length; ++i ) {
- if ( fCommandFactoryDescriptors[i].getName().equals( name ) ) {
- return fCommandFactoryDescriptors[i].getIdentifier();
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- protected void createVerboseModeButton( Composite parent ) {
- fVerboseModeButton = createCheckButton( parent, MIUIMessages.getString( "StandardGDBDebuggerPage.13" ) ); //$NON-NLS-1$
- fVerboseModeButton.addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
- protected void createBreakpointFullPathName( Composite parent ) {
- fBreakpointsFullPath = createCheckButton( parent, MIUIMessages.getString( "StandardGDBDebuggerPage.14" ) ); //$NON-NLS-1$
-
- fBreakpointsFullPath.addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetDefaultSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected( SelectionEvent e ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
deleted file mode 100644
index 8f664a1fa5d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.internal.ui;
-
-import java.util.Observable;
-
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IDialogFieldListener;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.LayoutUtil;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.StringDialogField;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-public class TCPSettingsBlock extends Observable {
-
- private final static String DEFAULT_HOST_NAME = "localhost"; //$NON-NLS-1$
-
- private final static String DEFAULT_PORT_NUMBER = "10000"; //$NON-NLS-1$
-
- private Shell fShell;
-
- private StringDialogField fHostNameField;
-
- private StringDialogField fPortNumberField;
-
- private Control fControl;
-
- private String fErrorMessage = null;
-
- public TCPSettingsBlock() {
- super();
- fHostNameField = createHostNameField();
- fPortNumberField = createPortNumberField();
- }
-
- public void createBlock( Composite parent ) {
- fShell = parent.getShell();
- Composite comp = ControlFactory.createCompositeEx( parent, 2, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- ((GridLayout)comp.getLayout()).marginHeight = 0;
- ((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( parent.getFont() );
- PixelConverter converter = new PixelConverter( comp );
- fHostNameField.doFillIntoGrid( comp, 2 );
- LayoutUtil.setWidthHint( fHostNameField.getTextControl( null ), converter.convertWidthInCharsToPixels( 20 ) );
- fPortNumberField.doFillIntoGrid( comp, 2 );
- ((GridData)fPortNumberField.getTextControl( null ).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
- LayoutUtil.setWidthHint( fPortNumberField.getTextControl( null ), converter.convertWidthInCharsToPixels( 10 ) );
- setControl( comp );
- }
-
- protected Shell getShell() {
- return fShell;
- }
-
- public void dispose() {
- deleteObservers();
- }
-
- public void initializeFrom( ILaunchConfiguration configuration ) {
- initializeHostName( configuration );
- initializePortNumber( configuration );
- }
-
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_HOST, DEFAULT_HOST_NAME );
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_PORT, DEFAULT_PORT_NUMBER );
- }
-
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- if ( fHostNameField != null )
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_HOST, fHostNameField.getText().trim() );
- if ( fPortNumberField != null )
- configuration.setAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_PORT, fPortNumberField.getText().trim() );
- }
-
- private StringDialogField createHostNameField() {
- StringDialogField field = new StringDialogField();
- field.setLabelText( MIUIMessages.getString( "TCPSettingsBlock.0" ) ); //$NON-NLS-1$
- field.setDialogFieldListener( new IDialogFieldListener() {
-
- @Override
- public void dialogFieldChanged( DialogField f ) {
- hostNameFieldChanged();
- }
- } );
- return field;
- }
-
- private StringDialogField createPortNumberField() {
- StringDialogField field = new StringDialogField();
- field.setLabelText( MIUIMessages.getString( "TCPSettingsBlock.1" ) ); //$NON-NLS-1$
- field.setDialogFieldListener( new IDialogFieldListener() {
-
- @Override
- public void dialogFieldChanged( DialogField f ) {
- portNumberFieldChanged();
- }
- } );
- return field;
- }
-
- protected void hostNameFieldChanged() {
- updateErrorMessage();
- setChanged();
- notifyObservers();
- }
-
- protected void portNumberFieldChanged() {
- updateErrorMessage();
- setChanged();
- notifyObservers();
- }
-
- private void initializeHostName( ILaunchConfiguration configuration ) {
- if ( fHostNameField != null ) {
- try {
- fHostNameField.setText( configuration.getAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_HOST, DEFAULT_HOST_NAME ) );
- }
- catch( CoreException e ) {
- }
- }
- }
-
- private void initializePortNumber( ILaunchConfiguration configuration ) {
- if ( fPortNumberField != null ) {
- try {
- fPortNumberField.setText( configuration.getAttribute( IGDBServerMILaunchConfigurationConstants.ATTR_PORT, DEFAULT_PORT_NUMBER ) );
- }
- catch( CoreException e ) {
- }
- }
- }
-
- public Control getControl() {
- return fControl;
- }
-
- protected void setControl( Control control ) {
- fControl = control;
- }
-
- public boolean isValid( ILaunchConfiguration configuration ) {
- updateErrorMessage();
- return (getErrorMessage() == null);
- }
-
- private void updateErrorMessage() {
- setErrorMessage( null );
- if ( fHostNameField != null && fPortNumberField != null ) {
- if ( fHostNameField.getText().trim().length() == 0 )
- setErrorMessage( MIUIMessages.getString( "TCPSettingsBlock.2" ) ); //$NON-NLS-1$
- else if ( !hostNameIsValid( fHostNameField.getText().trim() ) )
- setErrorMessage( MIUIMessages.getString( "TCPSettingsBlock.3" ) ); //$NON-NLS-1$
- else if ( fPortNumberField.getText().trim().length() == 0 )
- setErrorMessage( MIUIMessages.getString( "TCPSettingsBlock.4" ) ); //$NON-NLS-1$
- else if ( !portNumberIsValid( fPortNumberField.getText().trim() ) )
- setErrorMessage( MIUIMessages.getString( "TCPSettingsBlock.5" ) ); //$NON-NLS-1$
- }
- }
-
- public String getErrorMessage() {
- return fErrorMessage;
- }
-
- private void setErrorMessage( String string ) {
- fErrorMessage = string;
- }
-
- private boolean hostNameIsValid( String hostName ) {
- return true;
- }
-
- private boolean portNumberIsValid( String portNumber ) {
- try {
- int port = Integer.parseInt( portNumber );
- return ( port > 0 && port <= 0xFFFF );
- }
- catch( NumberFormatException e ) {
- return false;
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
deleted file mode 100644
index 88b4e5ba22b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.actions;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ActionMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.actions.ActionMessages";//$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- private ActionMessages() {
- }
-
- public static String getString( String key ) {
- try {
- return RESOURCE_BUNDLE.getString( key );
- }
- catch( MissingResourceException e ) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.properties
deleted file mode 100644
index 5dd0f84d4fe..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-###############################################################################
-
-SetAutoSolibActionDelegate.0=Exceptions occurred attempting to set 'Automatically Load Symbols' mode.
-SetAutoSolibActionDelegate.1=Set 'Automatically Load Symbols' mode failed.
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
deleted file mode 100644
index edb3e38cbdd..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.actions;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * The delegate for the "Automatically Load Symbols" action.
- */
-public class SetAutoSolibActionDelegate implements IViewActionDelegate, ISelectionListener, IPartListener {
-
- private IViewPart fView = null;
-
- private IAction fAction;
-
- private IStatus fStatus = null;
-
- /**
- * Constructor for SetAutoSolibActionDelegate.
- */
- public SetAutoSolibActionDelegate() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
- */
- @Override
- public void init( IViewPart view ) {
- fView = view;
- view.getSite().getPage().addPartListener( this );
- view.getSite().getPage().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(IWorkbenchPart, ISelection)
- */
- @Override
- public void selectionChanged( IWorkbenchPart part, ISelection selection ) {
- if ( part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) ) {
- update( getAction() );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- @Override
- public void run( IAction action ) {
- BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
-
- @Override
- public void run() {
- try {
- doAction( DebugUITools.getDebugContext() );
- setStatus( null );
- }
- catch( DebugException e ) {
- setStatus( e.getStatus() );
- }
- }
- } );
- if ( getStatus() != null && !getStatus().isOK() ) {
- IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow();
- if ( window != null ) {
- CDebugUIPlugin.errorDialog( getErrorDialogMessage(), getStatus() );
- }
- else {
- CDebugUIPlugin.log( getStatus() );
- }
- }
- update( action );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
- */
- @Override
- public void selectionChanged( IAction action, ISelection selection ) {
- setAction( action );
- if ( getView() != null ) {
- update( action );
- }
- }
-
- protected void update( IAction action ) {
- if ( action != null ) {
- IAdaptable element = DebugUITools.getDebugContext();
- action.setEnabled( getEnableStateForSelection( element ) );
- action.setChecked( getCheckStateForSelection( element ) );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partActivated(IWorkbenchPart)
- */
- @Override
- public void partActivated( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- @Override
- public void partBroughtToTop( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partClosed(IWorkbenchPart)
- */
- @Override
- public void partClosed( IWorkbenchPart part ) {
- if ( part.equals( getView() ) ) {
- dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partDeactivated(IWorkbenchPart)
- */
- @Override
- public void partDeactivated( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partOpened(IWorkbenchPart)
- */
- @Override
- public void partOpened( IWorkbenchPart part ) {
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected void setView( IViewPart viewPart ) {
- fView = viewPart;
- }
-
- protected void setAction( IAction action ) {
- fAction = action;
- }
-
- protected IAction getAction() {
- return fAction;
- }
-
- protected void dispose() {
- if ( getView() != null ) {
- getView().getViewSite().getPage().removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
- getView().getViewSite().getPage().removePartListener( this );
- }
- }
-
- protected boolean getCheckStateForSelection( IAdaptable element ) {
- SharedLibraryManager slm = getSharedLibraryManager( element );
- Target target = getTarget(element);
- if ( slm != null && target != null) {
- try {
- return slm.isAutoLoadSymbols(target);
- } catch( CDIException e ) {
- }
- }
- return false;
- }
-
- protected boolean getEnableStateForSelection( IAdaptable element ) {
- return (element instanceof IDebugElement && ((IDebugElement)element).getDebugTarget().isSuspended() && getSharedLibraryManager( element ) != null);
- }
-
- protected String getStatusMessage() {
- return ActionMessages.getString( "SetAutoSolibActionDelegate.0" ); //$NON-NLS-1$
- }
-
- protected String getErrorDialogMessage() {
- return ActionMessages.getString( "SetAutoSolibActionDelegate.1" ); //$NON-NLS-1$
- }
-
- protected void setStatus( IStatus status ) {
- fStatus = status;
- }
-
- protected IStatus getStatus() {
- return fStatus;
- }
-
- protected void doAction( IAdaptable element ) throws DebugException {
- if ( getView() == null )
- return;
- SharedLibraryManager slm = getSharedLibraryManager( element );
- Target target = getTarget(element);
- if ( slm != null && target != null && getAction() != null ) {
- try {
- slm.setAutoLoadSymbols( target, getAction().isChecked() );
- }
- catch( CDIException e ) {
- getAction().setChecked( !getAction().isChecked() );
- throw new DebugException( new Status( IStatus.ERROR, MIPlugin.getUniqueIdentifier(), DebugException.TARGET_REQUEST_FAILED, e.getMessage(), null ) );
- }
- }
- }
-
- private SharedLibraryManager getSharedLibraryManager( IAdaptable element ) {
- if ( element != null ) {
- ICDISession session = element.getAdapter( ICDISession.class );
- if ( session instanceof Session )
- return ((Session)session).getSharedLibraryManager();
- }
- return null;
- }
-
- private Target getTarget( IAdaptable element ) {
- if (element != null) {
- ICDITarget target = element.getAdapter( ICDITarget.class );
- if (target instanceof Target) {
- return (Target)target;
- }
- }
- return null;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java
deleted file mode 100644
index c625d6157e8..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.actions;
-
-import org.eclipse.cdt.debug.mi.core.GDBProcess;
-import org.eclipse.cdt.debug.mi.ui.console.VerboseModeChangedEvent;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class VerboseModeActionDelegate extends ActionDelegate implements IObjectActionDelegate {
-
- private GDBProcess fProcess;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- @Override
- public void setActivePart( IAction action, IWorkbenchPart targetPart ) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- @Override
- public void run( IAction action ) {
- if ( fProcess != null ) {
- boolean enabled = fProcess.getTarget().isVerboseModeEnabled();
- fProcess.getTarget().enableVerboseMode( !enabled );
- fProcess.getTarget().getMISession().notifyObservers(new VerboseModeChangedEvent(fProcess.getTarget().getMISession(),0));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void selectionChanged( IAction action, ISelection selection ) {
- IStructuredSelection s = (IStructuredSelection)selection;
- fProcess = ( !s.isEmpty() ) ? (GDBProcess)s.getFirstElement() : null;
- action.setEnabled( fProcess != null && !fProcess.isTerminated());
- action.setChecked( fProcess != null && fProcess.getTarget().isVerboseModeEnabled() );
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/CheckedListDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/CheckedListDialogField.java
deleted file mode 100644
index a618c15d9dc..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/CheckedListDialogField.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * A list with checkboxes and a button bar. Typical buttons are 'Check All' and 'Uncheck All'.
- * List model is independend of widget creation.
- * DialogFields controls are: Label, List and Composite containing buttons.
- */
-public class CheckedListDialogField extends ListDialogField {
-
- private int fCheckAllButtonIndex;
- private int fUncheckAllButtonIndex;
-
- private List fCheckElements;
-
- public CheckedListDialogField(IListAdapter adapter, String[] customButtonLabels, ILabelProvider lprovider) {
- super(adapter, customButtonLabels, lprovider);
- fCheckElements= new ArrayList();
-
- fCheckAllButtonIndex= -1;
- fUncheckAllButtonIndex= -1;
- }
-
- /**
- * Sets the index of the 'check' button in the button label array passed in the constructor.
- * The behaviour of the button marked as the check button will then be handled internally.
- * (enable state, button invocation behaviour)
- */
- public void setCheckAllButtonIndex(int checkButtonIndex) {
- Assert.isTrue(checkButtonIndex < fButtonLabels.length);
- fCheckAllButtonIndex= checkButtonIndex;
- }
-
- /**
- * Sets the index of the 'uncheck' button in the button label array passed in the constructor.
- * The behaviour of the button marked as the uncheck button will then be handled internally.
- * (enable state, button invocation behaviour)
- */
- public void setUncheckAllButtonIndex(int uncheckButtonIndex) {
- Assert.isTrue(uncheckButtonIndex < fButtonLabels.length);
- fUncheckAllButtonIndex= uncheckButtonIndex;
- }
-
-
- /*
- * @see ListDialogField#createTableViewer
- */
- @Override
- protected TableViewer createTableViewer(Composite parent) {
- Table table= new Table(parent, SWT.CHECK + getListStyle());
- CheckboxTableViewer tableViewer= new CheckboxTableViewer(table);
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- @Override
- public void checkStateChanged(CheckStateChangedEvent e) {
- doCheckStateChanged(e);
- }
- });
- return tableViewer;
- }
-
-
- /*
- * @see ListDialogField#getListControl
- */
- @Override
- public Control getListControl(Composite parent) {
- Control control= super.getListControl(parent);
- if (parent != null) {
- ((CheckboxTableViewer)fTable).setCheckedElements(fCheckElements.toArray());
- }
- return control;
- }
-
- /*
- * @see DialogField#dialogFieldChanged
- * Hooks in to get element changes to update check model.
- */
- @Override
- public void dialogFieldChanged() {
- for (int i= fCheckElements.size() -1; i >= 0; i--) {
- if (!fElements.contains(fCheckElements.get(i))) {
- fCheckElements.remove(i);
- }
- }
- super.dialogFieldChanged();
- }
-
- private void checkStateChanged() {
- //call super and do not update check model
- super.dialogFieldChanged();
- }
-
- /**
- * Gets the checked elements.
- */
- public List getCheckedElements() {
- return new ArrayList(fCheckElements);
- }
-
- /**
- * Returns true if the element is checked.
- */
- public boolean isChecked(Object obj) {
- return fCheckElements.contains(obj);
- }
-
- /**
- * Sets the checked elements.
- */
- public void setCheckedElements(List list) {
- fCheckElements= new ArrayList(list);
- if (fTable != null) {
- ((CheckboxTableViewer)fTable).setCheckedElements(list.toArray());
- }
- checkStateChanged();
- }
-
- /**
- * Sets the checked state of an element.
- */
- public void setChecked(Object object, boolean state) {
- setCheckedWithoutUpdate(object, state);
- checkStateChanged();
- }
-
- /**
- * Sets the checked state of an element. no dialog changed listener informed
- */
- public void setCheckedWithoutUpdate(Object object, boolean state) {
- if (state) {
- if (!fCheckElements.contains(object)) {
- fCheckElements.add(object);
- }
- }
- else {
- if (fCheckElements.contains(object)) {
- fCheckElements.remove(object);
- }
- }
- if (fTable != null) {
- ((CheckboxTableViewer)fTable).setChecked(object, state);
- }
- }
-
- /**
- * Sets the check state of all elements
- */
- public void checkAll(boolean state) {
- if (state) {
- fCheckElements= getElements();
- } else {
- fCheckElements.clear();
- }
- if (fTable != null) {
- ((CheckboxTableViewer)fTable).setAllChecked(state);
- }
- checkStateChanged();
- }
-
-
- protected void doCheckStateChanged(CheckStateChangedEvent e) {
- if (e.getChecked()) {
- fCheckElements.add(e.getElement());
- } else {
- fCheckElements.remove(e.getElement());
- }
- checkStateChanged();
- }
-
- // ------ enable / disable management
-
- /*
- * @see ListDialogField#getManagedButtonState
- */
- @Override
- protected boolean getManagedButtonState(ISelection sel, int index) {
- if (index == fCheckAllButtonIndex) {
- return !fElements.isEmpty();
- } else if (index == fUncheckAllButtonIndex) {
- return !fElements.isEmpty();
- }
- return super.getManagedButtonState(sel, index);
- }
-
- /*
- * @see ListDialogField#extraButtonPressed
- */
- @Override
- protected boolean managedButtonPressed(int index) {
- if (index == fCheckAllButtonIndex) {
- checkAll(true);
- } else if (index == fUncheckAllButtonIndex) {
- checkAll(false);
- } else {
- return super.managedButtonPressed(index);
- }
- return true;
- }
-
-
-
-
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
deleted file mode 100644
index 3fe817d9405..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Dialog field containing a label and a combo control.
- */
-public class ComboDialogField extends DialogField {
-
- private String fText;
- private int fSelectionIndex;
- private String[] fItems;
- private Combo fComboControl;
- private ModifyListener fModifyListener;
- private int fFlags;
-
- public ComboDialogField(int flags) {
- super();
- fText= ""; //$NON-NLS-1$
- fItems= new String[0];
- fFlags= flags;
- fSelectionIndex= -1;
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(1));
- Combo combo= getComboControl(parent);
- combo.setLayoutData(gridDataForCombo(nColumns - 1));
-
- return new Control[] { label, combo };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 2;
- }
-
- protected static GridData gridDataForCombo(int span) {
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= false;
- gd.horizontalSpan= span;
- return gd;
- }
-
- // ------- focus methods
-
- /*
- * @see DialogField#setFocus
- */
- @Override
- public boolean setFocus() {
- if (isOkToUse(fComboControl)) {
- fComboControl.setFocus();
- }
- return true;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created combo control.
- * @param parent The parent composite or null when the widget has
- * already been created.
- */
- public Combo getComboControl(Composite parent) {
- if (fComboControl == null) {
- assertCompositeNotNull(parent);
- fModifyListener= new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- doModifyText(e);
- }
- };
- SelectionListener selectionListener= new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- doSelectionChanged(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- };
-
- fComboControl= new Combo(parent, fFlags);
- // moved up due to 1GEUNW2
- fComboControl.setItems(fItems);
- if (fSelectionIndex != -1) {
- fComboControl.select(fSelectionIndex);
- } else {
- fComboControl.setText(fText);
- }
- fComboControl.setFont(parent.getFont());
- fComboControl.addModifyListener(fModifyListener);
- fComboControl.addSelectionListener(selectionListener);
- fComboControl.setEnabled(isEnabled());
- }
- return fComboControl;
- }
-
- protected void doModifyText(ModifyEvent e) {
- if (isOkToUse(fComboControl)) {
- fText= fComboControl.getText();
- fSelectionIndex= fComboControl.getSelectionIndex();
- }
- dialogFieldChanged();
- }
-
- protected void doSelectionChanged(SelectionEvent e) {
- if (isOkToUse(fComboControl)) {
- fItems= fComboControl.getItems();
- fText= fComboControl.getText();
- fSelectionIndex= fComboControl.getSelectionIndex();
- }
- dialogFieldChanged();
- }
-
- // ------ enable / disable management
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (isOkToUse(fComboControl)) {
- fComboControl.setEnabled(isEnabled());
- }
- }
-
- // ------ text access
-
- /**
- * Gets the combo items.
- */
- public String[] getItems() {
- return fItems;
- }
-
- /**
- * Sets the combo items. Triggers a dialog-changed event.
- */
- public void setItems(String[] items) {
- fItems= items;
- if (isOkToUse(fComboControl)) {
- fComboControl.setItems(items);
- }
- dialogFieldChanged();
- }
-
- /**
- * Gets the text.
- */
- public String getText() {
- return fText;
- }
-
- /**
- * Sets the text. Triggers a dialog-changed event.
- */
- public void setText(String text) {
- fText= text;
- if (isOkToUse(fComboControl)) {
- fComboControl.setText(text);
- } else {
- dialogFieldChanged();
- }
- }
-
- /**
- * Selects an item.
- */
- public void selectItem(int index) {
- if (isOkToUse(fComboControl)) {
- fComboControl.select(index);
- fSelectionIndex= index;
- } else {
- if (index >= 0 && index < fItems.length) {
- fText= fItems[index];
- fSelectionIndex= index;
- }
- }
- dialogFieldChanged();
- }
-
- public int getSelectionIndex() {
- return fSelectionIndex;
- }
-
-
- /**
- * Sets the text without triggering a dialog-changed event.
- */
- public void setTextWithoutUpdate(String text) {
- fText= text;
- if (isOkToUse(fComboControl)) {
- fComboControl.removeModifyListener(fModifyListener);
- fComboControl.setText(text);
- fComboControl.addModifyListener(fModifyListener);
- }
- }
-
- public void dispose() {
- if (fComboControl != null) fComboControl.dispose();
- if (fItems != null) fItems = null;
- if (fModifyListener != null) fModifyListener = null;
- super.dispose();
- }
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
deleted file mode 100644
index 9d5f4ca51ad..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2014 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Base class of all dialog fields.
- * Dialog fields manage controls together with the model, independed
- * from the creation time of the widgets.
- * - support for automated layouting.
- * - enable / disable, set focus a concept of the base class.
- *
- * DialogField have a label.
- */
-public class DialogField {
-
- private Label fLabel;
- protected String fLabelText;
-
- private IDialogFieldListener fDialogFieldListener;
-
- private boolean fEnabled;
-
- public DialogField() {
- fEnabled= true;
- fLabel= null;
- fLabelText= ""; //$NON-NLS-1$
- }
-
- /**
- * Sets the label of the dialog field.
- */
- public void setLabelText(String labeltext) {
- fLabelText= labeltext;
- }
-
- // ------ change listener
-
- /**
- * Defines the listener for this dialog field.
- */
- public final void setDialogFieldListener(IDialogFieldListener listener) {
- fDialogFieldListener= listener;
- }
-
- /**
- * Programatical invocation of a dialog field change.
- */
- public void dialogFieldChanged() {
- if (fDialogFieldListener != null) {
- fDialogFieldListener.dialogFieldChanged(this);
- }
- }
-
- // ------- focus management
-
- /**
- * Tries to set the focus to the dialog field.
- * Returns true if the dialog field can take focus.
- * To be reimplemented by dialog field implementors.
- */
- public boolean setFocus() {
- return false;
- }
-
- /**
- * Posts setFocus to the display event queue.
- */
- public void postSetFocusOnDialogField(Display display) {
- if (display != null) {
- display.asyncExec(
- new Runnable() {
- @Override
- public void run() {
- setFocus();
- }
- }
- );
- }
- }
-
- // ------- layout helpers
-
- /**
- * Creates all controls of the dialog field and fills it to a composite.
- * The composite is assumed to have MGridLayout as
- * layout.
- * The dialog field will adjust its controls' spans to the number of columns given.
- * To be reimplemented by dialog field implementors.
- */
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(nColumns));
-
- return new Control[] { label };
- }
-
- /**
- * Returns the number of columns of the dialog field.
- * To be reimplemented by dialog field implementors.
- */
- public int getNumberOfControls() {
- return 1;
- }
-
- protected static GridData gridDataForLabel(int span) {
- GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan= span;
- return gd;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created label widget.
- * @param parent The parent composite or null if the widget has
- * already been created.
- */
- public Label getLabelControl(Composite parent) {
- if (fLabel == null) {
- assertCompositeNotNull(parent);
-
- fLabel= new Label(parent, SWT.LEFT | SWT.WRAP);
- fLabel.setFont(parent.getFont());
- fLabel.setEnabled(fEnabled);
- if (fLabelText != null && !"".equals(fLabelText)) { //$NON-NLS-1$
- fLabel.setText(fLabelText);
- } else {
- // XXX: to avoid a 16 pixel wide empty label - revisit
- fLabel.setText("."); //$NON-NLS-1$
- fLabel.setVisible(false);
- }
- }
- return fLabel;
- }
-
- /**
- * Creates a spacer control.
- *
- * @param parent The parent composite
- */
- public static Control createEmptySpace(Composite parent) {
- return createEmptySpace(parent, 1);
- }
-
- /**
- * Creates a spacer control with the given span.
- * The composite is assumed to have {@link GridLayout} as layout.
- *
- * @param parent The parent composite
- */
- public static Control createEmptySpace(Composite parent, int span) {
- Label label= new Label(parent, SWT.LEFT);
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.BEGINNING;
- gd.grabExcessHorizontalSpace= false;
- gd.horizontalSpan= span;
- gd.horizontalIndent= 0;
- gd.widthHint= 0;
- gd.heightHint= 0;
- label.setLayoutData(gd);
- return label;
- }
-
- /**
- * Tests is the control is not null and not disposed.
- */
- protected final boolean isOkToUse(Control control) {
- return (control != null) && !(control.isDisposed());
- }
-
- // --------- enable / disable management
-
- /**
- * Sets the enable state of the dialog field.
- */
- public final void setEnabled(boolean enabled) {
- if (enabled != fEnabled) {
- fEnabled= enabled;
- updateEnableState();
- }
- }
-
- /**
- * Called when the enable state changed.
- * To be extended by dialog field implementors.
- */
- protected void updateEnableState() {
- if (fLabel != null) {
- fLabel.setEnabled(fEnabled);
- }
- }
-
- /**
- * Gets the enable state of the dialog field.
- */
- public final boolean isEnabled() {
- return fEnabled;
- }
-
- protected final void assertCompositeNotNull(Composite comp) {
- Assert.isNotNull(comp, "uncreated control requested with composite null"); //$NON-NLS-1$
- }
-
- protected final void assertEnoughColumns(int nColumns) {
- Assert.isTrue(nColumns >= getNumberOfControls(), "given number of columns is too small"); //$NON-NLS-1$
- }
-
- public void dispose() {
- if (fLabel != null) fLabel.dispose();
- if (fDialogFieldListener != null) fDialogFieldListener = null;
- }
-
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IDialogFieldListener.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IDialogFieldListener.java
deleted file mode 100644
index f170d4ca469..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IDialogFieldListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-/**
- * Change listener used by DialogField
- */
-public interface IDialogFieldListener {
-
- /**
- * The dialog field has changed.
- */
- void dialogFieldChanged(DialogField field);
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IListAdapter.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IListAdapter.java
deleted file mode 100644
index 7f7a841a6fc..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IListAdapter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-/**
- * Change listener used by ListDialogField and CheckedListDialogField
- */
-public interface IListAdapter {
-
- /**
- * A button from the button bar has been pressed.
- */
- void customButtonPressed(DialogField field, int index);
-
- /**
- * The selection of the list has changed.
- */
- void selectionChanged(DialogField field);
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IStringButtonAdapter.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IStringButtonAdapter.java
deleted file mode 100644
index b65936e45d9..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/IStringButtonAdapter.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-/**
- * Change listener used by StringButtonDialogField
- */
-public interface IStringButtonAdapter {
-
- void changeControlPressed(DialogField field);
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/LayoutUtil.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/LayoutUtil.java
deleted file mode 100644
index 155b57d79b2..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/LayoutUtil.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public class LayoutUtil {
-
- /**
- * Calculates the number of columns needed by field editors
- */
- public static int getNumberOfColumns(DialogField[] editors) {
- int nCulumns= 0;
- for (int i= 0; i < editors.length; i++) {
- nCulumns= Math.max(editors[i].getNumberOfControls(), nCulumns);
- }
- return nCulumns;
- }
-
- /**
- * Creates a composite and fills in the given editors.
- * @param labelOnTop Defines if the label of all fields should be on top of the fields
- */
- public static void doDefaultLayout(Composite parent, DialogField[] editors, boolean labelOnTop) {
- doDefaultLayout(parent, editors, labelOnTop, 0, 0, 0, 0);
- }
-
- /**
- * Creates a composite and fills in the given editors.
- * @param labelOnTop Defines if the label of all fields should be on top of the fields
- * @param minWidth The minimal width of the composite
- * @param minHeight The minimal height of the composite
- */
- public static void doDefaultLayout(Composite parent, DialogField[] editors, boolean labelOnTop, int minWidth, int minHeight) {
- doDefaultLayout(parent, editors, labelOnTop, minWidth, minHeight, 0, 0);
- }
-
- /**
- * Creates a composite and fills in the given editors.
- * @param labelOnTop Defines if the label of all fields should be on top of the fields
- * @param minWidth The minimal width of the composite
- * @param minHeight The minimal height of the composite
- * @param marginWidth The margin width to be used by the composite
- * @param marginHeight The margin height to be used by the composite
- * @deprecated
- */
- @Deprecated
- public static void doDefaultLayout(Composite parent, DialogField[] editors, boolean labelOnTop, int minWidth, int minHeight, int marginWidth, int marginHeight) {
- int nCulumns= getNumberOfColumns(editors);
- Control[][] controls= new Control[editors.length][];
- for (int i= 0; i < editors.length; i++) {
- controls[i]= editors[i].doFillIntoGrid(parent, nCulumns);
- }
- if (labelOnTop) {
- nCulumns--;
- modifyLabelSpans(controls, nCulumns);
- }
- GridLayout layout= new GridLayout();
- if (marginWidth != SWT.DEFAULT) {
- layout.marginWidth= marginWidth;
- }
- if (marginHeight != SWT.DEFAULT) {
- layout.marginHeight= marginHeight;
- }
- layout.numColumns= nCulumns;
- parent.setLayout(layout);
- }
-
- private static void modifyLabelSpans(Control[][] controls, int nCulumns) {
- for (int i= 0; i < controls.length; i++) {
- setHorizontalSpan(controls[i][0], nCulumns);
- }
- }
-
- /**
- * Sets the span of a control. Assumes that GridData is used.
- */
- public static void setHorizontalSpan(Control control, int span) {
- Object ld= control.getLayoutData();
- if (ld instanceof GridData) {
- ((GridData)ld).horizontalSpan= span;
- } else if (span != 1) {
- GridData gd= new GridData();
- gd.horizontalSpan= span;
- control.setLayoutData(gd);
- }
- }
-
- /**
- * Sets the width hint of a control. Assumes that GridData is used.
- */
- public static void setWidthHint(Control control, int widthHint) {
- Object ld= control.getLayoutData();
- if (ld instanceof GridData) {
- ((GridData)ld).widthHint= widthHint;
- }
- }
-
- /**
- * Sets the heigthHint hint of a control. Assumes that GridData is used.
- */
- public static void setHeigthHint(Control control, int heigthHint) {
- Object ld= control.getLayoutData();
- if (ld instanceof GridData) {
- ((GridData)ld).heightHint= heigthHint;
- }
- }
-
- /**
- * Sets the horizontal indent of a control. Assumes that GridData is used.
- */
- public static void setHorizontalIndent(Control control, int horizontalIndent) {
- Object ld= control.getLayoutData();
- if (ld instanceof GridData) {
- ((GridData)ld).horizontalIndent= horizontalIndent;
- }
- }
-
- /**
- * Sets the horizontal indent of a control. Assumes that GridData is used.
- */
- public static void setHorizontalGrabbing(Control control) {
- Object ld= control.getLayoutData();
- if (ld instanceof GridData) {
- ((GridData)ld).grabExcessHorizontalSpace= true;
- }
- }
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ListDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ListDialogField.java
deleted file mode 100644
index e1d8dc168b9..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ListDialogField.java
+++ /dev/null
@@ -1,783 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.cdt.debug.mi.internal.ui.SWTUtil;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * A list with a button bar.
- * Typical buttons are 'Add', 'Remove', 'Up' and 'Down'.
- * List model is independend of widget creation.
- * DialogFields controls are: Label, List and Composite containing buttons.
- */
-public class ListDialogField extends DialogField {
-
- protected TableViewer fTable;
- protected ILabelProvider fLabelProvider;
- protected ListViewerAdapter fListViewerAdapter;
- protected List fElements;
- protected ViewerSorter fViewerSorter;
-
- protected String[] fButtonLabels;
- private Button[] fButtonControls;
-
- private boolean[] fButtonsEnabled;
-
- private int fRemoveButtonIndex;
- private int fUpButtonIndex;
- private int fDownButtonIndex;
-
- private Label fLastSeparator;
-
- protected Table fTableControl;
- private Composite fButtonsControl;
- private ISelection fSelectionWhenEnabled;
-
- private IListAdapter fListAdapter;
-
- private Object fParentElement;
-
- /**
- * Creates the ListDialogField.
- * @param adapter A listener for button invocation, selection changes.
- * @param buttonLabels The labels of all buttons: null is a valid array entry and
- * marks a separator.
- * @param lprovider The label provider to render the table entries
- */
- public ListDialogField(IListAdapter adapter, String[] buttonLabels, ILabelProvider lprovider) {
- super();
- fListAdapter= adapter;
-
- fLabelProvider= lprovider;
- fListViewerAdapter= new ListViewerAdapter();
- fParentElement= this;
-
- fElements= new ArrayList(10);
-
- fButtonLabels= buttonLabels;
- if (fButtonLabels != null) {
- int nButtons= fButtonLabels.length;
- fButtonsEnabled= new boolean[nButtons];
- for (int i= 0; i < nButtons; i++) {
- fButtonsEnabled[i]= true;
- }
- }
-
- fTable= null;
- fTableControl= null;
- fButtonsControl= null;
-
- fRemoveButtonIndex= -1;
- fUpButtonIndex= -1;
- fDownButtonIndex= -1;
- }
-
- /**
- * Sets the index of the 'remove' button in the button label array passed in the constructor.
- * The behaviour of the button marked as the 'remove' button will then be handled internally.
- * (enable state, button invocation behaviour)
- */
- public void setRemoveButtonIndex(int removeButtonIndex) {
- Assert.isTrue(removeButtonIndex < fButtonLabels.length);
- fRemoveButtonIndex= removeButtonIndex;
- }
-
- /**
- * Sets the index of the 'up' button in the button label array passed in the constructor.
- * The behaviour of the button marked as the 'up' button will then be handled internally.
- * (enable state, button invocation behaviour)
- */
- public void setUpButtonIndex(int upButtonIndex) {
- Assert.isTrue(upButtonIndex < fButtonLabels.length);
- fUpButtonIndex= upButtonIndex;
- }
-
- /**
- * Sets the index of the 'down' button in the button label array passed in the constructor.
- * The behaviour of the button marked as the 'down' button will then be handled internally.
- * (enable state, button invocation behaviour)
- */
- public void setDownButtonIndex(int downButtonIndex) {
- Assert.isTrue(downButtonIndex < fButtonLabels.length);
- fDownButtonIndex= downButtonIndex;
- }
-
- /**
- * Sets the viewerSorter.
- * @param viewerSorter The viewerSorter to set
- */
- public void setViewerSorter(ViewerSorter viewerSorter) {
- fViewerSorter= viewerSorter;
- }
-
- // ------ adapter communication
-
- private void buttonPressed(int index) {
- if (!managedButtonPressed(index)) {
- fListAdapter.customButtonPressed(this, index);
- }
- }
-
- /**
- * Checks if the button pressed is handled internally
- * @return Returns true if button has been handled.
- */
- protected boolean managedButtonPressed(int index) {
- if (index == fRemoveButtonIndex) {
- remove();
- } else if (index == fUpButtonIndex) {
- up();
- } else if (index == fDownButtonIndex) {
- down();
- } else {
- return false;
- }
- return true;
- }
-
-
- // ------ layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- PixelConverter converter= new PixelConverter(parent);
-
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- GridData gd= gridDataForLabel(1);
- gd.verticalAlignment= GridData.BEGINNING;
- label.setLayoutData(gd);
-
- Control list= getListControl(parent);
- gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= false;
- gd.verticalAlignment= GridData.FILL;
- gd.grabExcessVerticalSpace= true;
- gd.horizontalSpan= nColumns - 2;
- gd.widthHint= converter.convertWidthInCharsToPixels(50);
- gd.heightHint= converter.convertHeightInCharsToPixels(6);
-
- list.setLayoutData(gd);
-
- Composite buttons= getButtonBox(parent);
- gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= false;
- gd.verticalAlignment= GridData.FILL;
- gd.grabExcessVerticalSpace= true;
- gd.horizontalSpan= 1;
- buttons.setLayoutData(gd);
-
- return new Control[] { label, list, buttons };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 3;
- }
-
- /**
- * Sets the minimal width of the buttons. Must be called after widget creation.
- */
- public void setButtonsMinWidth(int minWidth) {
- if (fLastSeparator != null) {
- ((GridData)fLastSeparator.getLayoutData()).widthHint= minWidth;
- }
- }
-
-
- // ------ ui creation
-
- /**
- * Returns the list control. When called the first time, the control will be created.
- * @param The parent composite when called the first time, or null
- * after.
- */
- public Control getListControl(Composite parent) {
- if (fTableControl == null) {
- assertCompositeNotNull(parent);
-
- fTable= createTableViewer(parent);
- fTable.setContentProvider(fListViewerAdapter);
- fTable.setLabelProvider(fLabelProvider);
- fTable.addSelectionChangedListener(fListViewerAdapter);
-
- fTableControl= (Table)fTable.getControl();
-
- fTable.setInput(fParentElement);
-
- if (fViewerSorter != null) {
- fTable.setSorter(fViewerSorter);
- }
-
- fTableControl.setEnabled(isEnabled());
- if (fSelectionWhenEnabled != null) {
- postSetSelection(fSelectionWhenEnabled);
- }
- }
- return fTableControl;
- }
-
- /**
- * Returns the internally used table viewer.
- */
- public TableViewer getTableViewer() {
- return fTable;
- }
-
- /*
- * Subclasses may override to specify a different style.
- */
- protected int getListStyle(){
- return SWT.BORDER + SWT.MULTI + SWT.H_SCROLL + SWT.V_SCROLL;
- }
-
- protected TableViewer createTableViewer(Composite parent) {
- Table table= new Table(parent, getListStyle());
- return new TableViewer(table);
- }
-
- protected Button createButton(Composite parent, String label, SelectionListener listener) {
- Button button= new Button(parent, SWT.PUSH);
- button.setText(label);
- button.addSelectionListener(listener);
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.verticalAlignment= GridData.BEGINNING;
- gd.widthHint = SWTUtil.getButtonWidthHint(button);
-
- button.setLayoutData(gd);
- return button;
- }
-
- private Label createSeparator(Composite parent) {
- Label separator= new Label(parent, SWT.NONE);
- separator.setVisible(false);
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.verticalAlignment= GridData.BEGINNING;
- gd.heightHint= 4;
- separator.setLayoutData(gd);
- return separator;
- }
-
- /**
- * Returns the composite containing the buttons. When called the first time, the control
- * will be created.
- * @param The parent composite when called the first time, or null
- * after.
- */
- public Composite getButtonBox(Composite parent) {
- if (fButtonsControl == null) {
- assertCompositeNotNull(parent);
-
- SelectionListener listener= new SelectionListener() {
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- doButtonSelected(e);
- }
- @Override
- public void widgetSelected(SelectionEvent e) {
- doButtonSelected(e);
- }
- };
-
- Composite contents= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.marginWidth= 0;
- layout.marginHeight= 0;
- contents.setLayout(layout);
-
- if (fButtonLabels != null) {
- fButtonControls= new Button[fButtonLabels.length];
- for (int i= 0; i < fButtonLabels.length; i++) {
- String currLabel= fButtonLabels[i];
- if (currLabel != null) {
- fButtonControls[i]= createButton(contents, currLabel, listener);
- fButtonControls[i].setEnabled(isEnabled() && fButtonsEnabled[i]);
- } else {
- fButtonControls[i]= null;
- createSeparator(contents);
- }
- }
- }
-
- fLastSeparator= createSeparator(contents);
-
- updateButtonState();
- fButtonsControl= contents;
- }
-
- return fButtonsControl;
- }
-
- protected void doButtonSelected(SelectionEvent e) {
- if (fButtonControls != null) {
- for (int i= 0; i < fButtonControls.length; i++) {
- if (e.widget == fButtonControls[i]) {
- buttonPressed(i);
- return;
- }
- }
- }
- }
-
- // ------ enable / disable management
-
- /*
- * @see DialogField#dialogFieldChanged
- */
- @Override
- public void dialogFieldChanged() {
- super.dialogFieldChanged();
- updateButtonState();
- }
-
- /*
- * Updates the enable state of the all buttons
- */
- protected void updateButtonState() {
- if (fButtonControls != null) {
- ISelection sel= fTable.getSelection();
- for (int i= 0; i < fButtonControls.length; i++) {
- Button button= fButtonControls[i];
- if (isOkToUse(button)) {
- boolean extraState= getManagedButtonState(sel, i);
- button.setEnabled(isEnabled() && extraState && fButtonsEnabled[i]);
- }
- }
- }
- }
-
- protected boolean getManagedButtonState(ISelection sel, int index) {
- if (index == fRemoveButtonIndex) {
- return !sel.isEmpty();
- } else if (index == fUpButtonIndex) {
- return !sel.isEmpty() && canMoveUp();
- } else if (index == fDownButtonIndex) {
- return !sel.isEmpty() && canMoveDown();
- }
- return true;
- }
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
-
- boolean enabled= isEnabled();
- if (isOkToUse(fTableControl)) {
- if (!enabled) {
- fSelectionWhenEnabled= fTable.getSelection();
- selectElements(null);
- } else {
- selectElements(fSelectionWhenEnabled);
- fSelectionWhenEnabled= null;
- }
- fTableControl.setEnabled(enabled);
- }
- updateButtonState();
- }
-
- /**
- * Sets a button enabled or disabled.
- */
- public void enableButton(int index, boolean enable) {
- if (fButtonsEnabled != null && index < fButtonsEnabled.length) {
- fButtonsEnabled[index]= enable;
- updateButtonState();
- }
- }
-
- // ------ model access
-
- /**
- * Sets the elements shown in the list.
- */
- public void setElements(List elements) {
- fElements= new ArrayList(elements);
- if (fTable != null) {
- fTable.refresh();
- }
- dialogFieldChanged();
- }
-
- /**
- * Gets the elements shown in the list.
- * The list returned is a copy, so it can be modified by the user.
- */
- public List getElements() {
- return new ArrayList(fElements);
- }
-
- /**
- * Gets the elements shown at the given index.
- */
- public Object getElement(int index) {
- return fElements.get(index);
- }
-
- /**
- * Replace an element.
- */
- public void replaceElement(Object oldElement, Object newElement) throws IllegalArgumentException {
- int idx= fElements.indexOf(oldElement);
- if (idx != -1) {
- if (oldElement.equals(newElement) || fElements.contains(newElement)) {
- return;
- }
- fElements.set(idx, newElement);
- if (fTable != null) {
- List selected= getSelectedElements();
- if (selected.remove(oldElement)) {
- selected.add(newElement);
- }
- fTable.refresh();
- selectElements(new StructuredSelection(selected));
- }
- dialogFieldChanged();
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- /**
- * Adds an element at the end of the list.
- */
- public void addElement(Object element) {
- if (fElements.contains(element)) {
- return;
- }
- fElements.add(element);
- if (fTable != null) {
- fTable.add(element);
- }
- dialogFieldChanged();
- }
-
- /**
- * Adds elements at the end of the list.
- */
- public void addElements(List elements) {
- int nElements= elements.size();
-
- if (nElements > 0) {
- // filter duplicated
- ArrayList elementsToAdd= new ArrayList(nElements);
-
- for (int i= 0; i < nElements; i++) {
- Object elem= elements.get(i);
- if (!fElements.contains(elem)) {
- elementsToAdd.add(elem);
- }
- }
- fElements.addAll(elementsToAdd);
- if (fTable != null) {
- fTable.add(elementsToAdd.toArray());
- }
- dialogFieldChanged();
- }
- }
-
- /**
- * Adds an element at a position.
- */
- public void insertElementAt(Object element, int index) {
- if (fElements.contains(element)) {
- return;
- }
- fElements.add(index, element);
- if (fTable != null) {
- fTable.add(element);
- }
-
- dialogFieldChanged();
- }
-
-
- /**
- * Adds an element at a position.
- */
- public void removeAllElements() {
- if (fElements.size() > 0) {
- fElements.clear();
- if (fTable != null) {
- fTable.refresh();
- }
- dialogFieldChanged();
- }
- }
-
- /**
- * Removes an element from the list.
- */
- public void removeElement(Object element) throws IllegalArgumentException {
- if (fElements.remove(element)) {
- if (fTable != null) {
- fTable.remove(element);
- }
- dialogFieldChanged();
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- /**
- * Removes elements from the list.
- */
- public void removeElements(List elements) {
- if (elements.size() > 0) {
- fElements.removeAll(elements);
- if (fTable != null) {
- fTable.remove(elements.toArray());
- }
- dialogFieldChanged();
- }
- }
-
- /**
- * Gets the number of elements
- */
- public int getSize() {
- return fElements.size();
- }
-
-
- public void selectElements(ISelection selection) {
- fSelectionWhenEnabled= selection;
- if (fTable != null) {
- fTable.setSelection(selection, true);
- }
- }
-
- public void selectFirstElement() {
- Object element= null;
- if (fViewerSorter != null) {
- Object[] arr= fElements.toArray();
- fViewerSorter.sort(fTable, arr);
- if (arr.length > 0) {
- element= arr[0];
- }
- } else {
- if (fElements.size() > 0) {
- element= fElements.get(0);
- }
- }
- if (element != null) {
- selectElements(new StructuredSelection(element));
- }
- }
-
-
- public void postSetSelection(final ISelection selection) {
- if (isOkToUse(fTableControl)) {
- Display d= fTableControl.getDisplay();
- d.asyncExec(new Runnable() {
- @Override
- public void run() {
- if (isOkToUse(fTableControl)) {
- selectElements(selection);
- }
- }
- });
- }
- }
-
- /**
- * Refreshes the table.
- */
- public void refresh() {
- fTable.refresh();
- }
-
- // ------- list maintenance
-
- private List moveUp(List elements, List move) {
- int nElements= elements.size();
- List res= new ArrayList(nElements);
- Object floating= null;
- for (int i= 0; i < nElements; i++) {
- Object curr= elements.get(i);
- if (move.contains(curr)) {
- res.add(curr);
- } else {
- if (floating != null) {
- res.add(floating);
- }
- floating= curr;
- }
- }
- if (floating != null) {
- res.add(floating);
- }
- return res;
- }
-
- private void moveUp(List toMoveUp) {
- if (toMoveUp.size() > 0) {
- setElements(moveUp(fElements, toMoveUp));
- fTable.reveal(toMoveUp.get(0));
- }
- }
-
- private void moveDown(List toMoveDown) {
- if (toMoveDown.size() > 0) {
- setElements(reverse(moveUp(reverse(fElements), toMoveDown)));
- fTable.reveal(toMoveDown.get(toMoveDown.size() - 1));
- }
- }
-
- private List reverse(List p) {
- List reverse= new ArrayList(p.size());
- for (int i= p.size()-1; i >= 0; i--) {
- reverse.add(p.get(i));
- }
- return reverse;
- }
-
-
- private void remove() {
- removeElements(getSelectedElements());
- }
-
- private void up() {
- moveUp(getSelectedElements());
- }
-
- private void down() {
- moveDown(getSelectedElements());
- }
-
- private boolean canMoveUp() {
- if (isOkToUse(fTableControl)) {
- int[] indc= fTableControl.getSelectionIndices();
- for (int i= 0; i < indc.length; i++) {
- if (indc[i] != i) {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean canMoveDown() {
- if (isOkToUse(fTableControl)) {
- int[] indc= fTableControl.getSelectionIndices();
- int k= fElements.size() - 1;
- for (int i= indc.length - 1; i >= 0 ; i--, k--) {
- if (indc[i] != k) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Returns the selected elements.
- */
- public List getSelectedElements() {
- List result= new ArrayList();
- if (fTable != null) {
- ISelection selection= fTable.getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator iter= ((IStructuredSelection)selection).iterator();
- while (iter.hasNext()) {
- result.add(iter.next());
- }
- }
- }
- return result;
- }
-
- // ------- ListViewerAdapter
-
- private class ListViewerAdapter implements IStructuredContentProvider, ISelectionChangedListener {
-
- // ------- ITableContentProvider Interface ------------
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // will never happen
- }
-
- public boolean isDeleted(Object element) {
- return false;
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public Object[] getElements(Object obj) {
- return fElements.toArray();
- }
-
- // ------- ISelectionChangedListener Interface ------------
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- doListSelected(event);
- }
-
- }
-
-
- protected void doListSelected(SelectionChangedEvent event) {
- updateButtonState();
- if (fListAdapter != null) {
- fListAdapter.selectionChanged(this);
- }
- }
-
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogField.java
deleted file mode 100644
index ccc1841b784..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogField.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.cdt.debug.mi.internal.ui.SWTUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Dialog Field containing a single button: e.g. radio or checkbox button.
- */
-public class SelectionButtonDialogField extends DialogField {
-
- private Button fButton;
- private boolean fIsSelected;
- private DialogField[] fAttachedDialogFields;
- private int fButtonStyle;
-
- /**
- * Creates a selection button.
- * Allowed button styles: SWT.RADIO, SWT.CHECK, SWT.TOGGLE, SWT.PUSH
- */
- public SelectionButtonDialogField(int buttonStyle) {
- super();
- fIsSelected= false;
- fAttachedDialogFields= null;
- fButtonStyle= buttonStyle;
- }
-
- /**
- * Attaches a field to the selection state of the selection button.
- * The attached field will be disabled if the selection button is not selected.
- */
- public void attachDialogField(DialogField dialogField) {
- attachDialogFields(new DialogField[] { dialogField });
- }
-
- /**
- * Attaches fields to the selection state of the selection button.
- * The attached fields will be disabled if the selection button is not selected.
- */
- public void attachDialogFields(DialogField[] dialogFields) {
- fAttachedDialogFields= dialogFields;
- for (int i= 0; i < dialogFields.length; i++) {
- dialogFields[i].setEnabled(fIsSelected);
- }
- }
-
- /**
- * Returns true is teh gived field is attached to the selection button.
- */
- public boolean isAttached(DialogField editor) {
- if (fAttachedDialogFields != null) {
- for (int i=0; i < fAttachedDialogFields.length; i++) {
- if (fAttachedDialogFields[i] == editor) {
- return true;
- }
- }
- }
- return false;
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Button button= getSelectionButton(parent);
- GridData gd= new GridData();
- gd.horizontalSpan= nColumns;
- gd.horizontalAlignment= GridData.FILL;
- if (fButtonStyle == SWT.PUSH) {
- gd.widthHint = SWTUtil.getButtonWidthHint(button);
- }
-
- button.setLayoutData(gd);
-
- return new Control[] { button };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
- // ------- ui creation
-
- /**
- * Returns the selection button widget. When called the first time, the widget will be created.
- * @param The parent composite when called the first time, or null
- * after.
- */
- public Button getSelectionButton(Composite group) {
- if (fButton == null) {
- assertCompositeNotNull(group);
-
- fButton= new Button(group, fButtonStyle);
- fButton.setFont(group.getFont());
- fButton.setText(fLabelText);
- fButton.setEnabled(isEnabled());
- fButton.setSelection(fIsSelected);
- fButton.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- doWidgetSelected(e);
- }
- @Override
- public void widgetSelected(SelectionEvent e) {
- doWidgetSelected(e);
- }
- });
- }
- return fButton;
- }
-
- protected void doWidgetSelected(SelectionEvent e) {
- if (isOkToUse(fButton)) {
- changeValue(fButton.getSelection());
- }
- }
-
- private void changeValue(boolean newState) {
- if (fIsSelected != newState) {
- fIsSelected= newState;
- if (fAttachedDialogFields != null) {
- boolean focusSet= false;
- for (int i= 0; i < fAttachedDialogFields.length; i++) {
- fAttachedDialogFields[i].setEnabled(fIsSelected);
- if (fIsSelected && !focusSet) {
- focusSet= fAttachedDialogFields[i].setFocus();
- }
- }
- }
- dialogFieldChanged();
- } else if (fButtonStyle == SWT.PUSH) {
- dialogFieldChanged();
- }
- }
-
- // ------ model access
-
- /**
- * Returns the selection state of the button.
- */
- public boolean isSelected() {
- return fIsSelected;
- }
-
- /**
- * Sets the selection state of the button.
- */
- public void setSelection(boolean selected) {
- changeValue(selected);
- if (isOkToUse(fButton)) {
- fButton.setSelection(selected);
- }
- }
-
- // ------ enable / disable management
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (isOkToUse(fButton)) {
- fButton.setEnabled(isEnabled());
- }
- }
-
-
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogFieldGroup.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogFieldGroup.java
deleted file mode 100644
index 75f30fc0ed1..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/SelectionButtonDialogFieldGroup.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Dialog field describing a group with buttons (Checkboxes, radio buttons..)
- */
-public class SelectionButtonDialogFieldGroup extends DialogField {
-
- private Composite fButtonComposite;
-
- private Button[] fButtons;
- private String[] fButtonNames;
- private boolean[] fButtonsSelected;
- private boolean[] fButtonsEnabled;
-
- private int fGroupBorderStyle;
- private int fGroupNumberOfColumns;
- private int fButtonsStyle;
-
- /**
- * Creates a group without border.
- */
- public SelectionButtonDialogFieldGroup(int buttonsStyle, String[] buttonNames, int nColumns) {
- this(buttonsStyle, buttonNames, nColumns, SWT.NONE);
- }
-
-
- /**
- * Creates a group with border (label in border).
- * Accepted button styles are: SWT.RADIO, SWT.CHECK, SWT.TOGGLE
- * For border styles see Group
- */
- public SelectionButtonDialogFieldGroup(int buttonsStyle, String[] buttonNames, int nColumns, int borderStyle) {
- super();
-
- Assert.isTrue(buttonsStyle == SWT.RADIO || buttonsStyle == SWT.CHECK || buttonsStyle == SWT.TOGGLE);
- fButtonNames= buttonNames;
-
- int nButtons= buttonNames.length;
- fButtonsSelected= new boolean[nButtons];
- fButtonsEnabled= new boolean[nButtons];
- for (int i= 0; i < nButtons; i++) {
- fButtonsSelected[i]= false;
- fButtonsEnabled[i]= true;
- }
- if (fButtonsStyle == SWT.RADIO) {
- fButtonsSelected[0]= true;
- }
-
- fGroupBorderStyle= borderStyle;
- fGroupNumberOfColumns= (nColumns <= 0) ? nButtons : nColumns;
-
- fButtonsStyle= buttonsStyle;
-
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- if (fGroupBorderStyle == SWT.NONE) {
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(1));
-
- Composite buttonsgroup= getSelectionButtonsGroup(parent);
- GridData gd= new GridData();
- gd.horizontalSpan= nColumns - 1;
- buttonsgroup.setLayoutData(gd);
-
- return new Control[] { label, buttonsgroup };
- }
- Composite buttonsgroup= getSelectionButtonsGroup(parent);
- GridData gd= new GridData();
- gd.horizontalSpan= nColumns;
- buttonsgroup.setLayoutData(gd);
-
- return new Control[] { buttonsgroup };
- }
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public int getNumberOfControls() {
- return (fGroupBorderStyle == SWT.NONE) ? 2 : 1;
- }
-
- // ------- ui creation
-
- private Button createSelectionButton(int index, Composite group, SelectionListener listener) {
- Button button= new Button(group, fButtonsStyle | SWT.LEFT);
- button.setFont(group.getFont());
- button.setText(fButtonNames[index]);
- button.setEnabled(isEnabled() && fButtonsEnabled[index]);
- button.setSelection(fButtonsSelected[index]);
- button.addSelectionListener(listener);
- button.setLayoutData(new GridData());
- return button;
- }
-
- /**
- * Returns the group widget. When called the first time, the widget will be created.
- * @param The parent composite when called the first time, or null
- * after.
- */
- public Composite getSelectionButtonsGroup(Composite parent) {
- if (fButtonComposite == null) {
- assertCompositeNotNull(parent);
-
- GridLayout layout= new GridLayout();
- layout.makeColumnsEqualWidth= true;
- layout.numColumns= fGroupNumberOfColumns;
-
- if (fGroupBorderStyle != SWT.NONE) {
- Group group= new Group(parent, fGroupBorderStyle);
- if (fLabelText != null && fLabelText.length() > 0) {
- group.setText(fLabelText);
- }
- fButtonComposite= group;
- } else {
- fButtonComposite= new Composite(parent, SWT.NULL);
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- }
-
- fButtonComposite.setLayout(layout);
-
- SelectionListener listener= new SelectionListener() {
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- doWidgetSelected(e);
- }
- @Override
- public void widgetSelected(SelectionEvent e) {
- doWidgetSelected(e);
- }
- };
- int nButtons= fButtonNames.length;
- fButtons= new Button[nButtons];
- for (int i= 0; i < nButtons; i++) {
- fButtons[i]= createSelectionButton(i, fButtonComposite, listener);
- }
- int nRows= nButtons / fGroupNumberOfColumns;
- int nFillElements= nRows * fGroupNumberOfColumns - nButtons;
- for (int i= 0; i < nFillElements; i++) {
- createEmptySpace(fButtonComposite);
- }
- }
- return fButtonComposite;
- }
-
- /**
- * Returns a button from the group or null if not yet created.
- */
- public Button getSelectionButton(int index) {
- if (index >= 0 && index < fButtons.length) {
- return fButtons[index];
- }
- return null;
- }
-
- protected void doWidgetSelected(SelectionEvent e) {
- Button button= (Button)e.widget;
- for (int i= 0; i < fButtons.length; i++) {
- if (fButtons[i] == button) {
- fButtonsSelected[i]= button.getSelection();
- dialogFieldChanged();
- return;
- }
- }
- }
-
- // ------ model access
-
- /**
- * Returns the selection state of a button contained in the group.
- * @param The index of the button
- */
- public boolean isSelected(int index) {
- if (index >= 0 && index < fButtonsSelected.length) {
- return fButtonsSelected[index];
- }
- return false;
- }
-
- /**
- * Sets the selection state of a button contained in the group.
- */
- public void setSelection(int index, boolean selected) {
- if (index >= 0 && index < fButtonsSelected.length) {
- if (fButtonsSelected[index] != selected) {
- fButtonsSelected[index]= selected;
- if (fButtons != null) {
- Button button= fButtons[index];
- if (isOkToUse(button)) {
- button.setSelection(selected);
- }
- }
- }
- }
- }
-
- // ------ enable / disable management
-
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (fButtons != null) {
- boolean enabled= isEnabled();
- for (int i= 0; i < fButtons.length; i++) {
- Button button= fButtons[i];
- if (isOkToUse(button)) {
- button.setEnabled(enabled && fButtonsEnabled[i]);
- }
- }
- }
- }
-
- /**
- * Sets the enable state of a button contained in the group.
- */
- public void enableSelectionButton(int index, boolean enable) {
- if (index >= 0 && index < fButtonsEnabled.length) {
- fButtonsEnabled[index]= enable;
- if (fButtons != null) {
- Button button= fButtons[index];
- if (isOkToUse(button)) {
- button.setEnabled(isEnabled() && enable);
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/Separator.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/Separator.java
deleted file mode 100644
index 83c2ff67e03..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/Separator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Dialog field describing a separator.
- */
-public class Separator extends DialogField {
-
- private Label fSeparator;
- private int fStyle;
-
- public Separator() {
- this(SWT.NONE);
- }
-
- /**
- * @param style of the separator. See Label for possible
- * styles.
- */
- public Separator(int style) {
- super();
- fStyle= style;
- }
-
- // ------- layout helpers
-
- /**
- * Creates the separator and fills it in a MGridLayout.
- * @param height The heigth of the separator
- */
- public Control[] doFillIntoGrid(Composite parent, int nColumns, int height) {
- assertEnoughColumns(nColumns);
-
- Control separator= getSeparator(parent);
- separator.setLayoutData(gridDataForSeperator(nColumns, height));
-
- return new Control[] { separator };
- }
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- return doFillIntoGrid(parent, nColumns, 4);
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
- protected static GridData gridDataForSeperator(int span, int height) {
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.verticalAlignment= GridData.BEGINNING;
- gd.heightHint= height;
- gd.horizontalSpan= span;
- return gd;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created separator.
- * @param parent The parent composite or null if the widget has
- * already been created.
- */
- public Control getSeparator(Composite parent) {
- if (fSeparator == null) {
- assertCompositeNotNull(parent);
- fSeparator= new Label(parent, fStyle);
- }
- return fSeparator;
- }
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonDialogField.java
deleted file mode 100644
index 000c76c4d88..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonDialogField.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.cdt.debug.mi.internal.ui.SWTUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog field containing a label, text control and a button control.
- */
-public class StringButtonDialogField extends StringDialogField {
-
- private Button fBrowseButton;
- private String fBrowseButtonLabel;
- private IStringButtonAdapter fStringButtonAdapter;
-
- private boolean fButtonEnabled;
-
- public StringButtonDialogField(IStringButtonAdapter adapter) {
- super();
- fStringButtonAdapter= adapter;
- fBrowseButtonLabel= "!Browse...!"; //$NON-NLS-1$
- fButtonEnabled= true;
- }
-
- /**
- * Sets the label of the button.
- */
- public void setButtonLabel(String label) {
- fBrowseButtonLabel= label;
- }
-
- // ------ adapter communication
-
- /**
- * Programmatical pressing of the button
- */
- public void changeControlPressed() {
- fStringButtonAdapter.changeControlPressed(this);
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(1));
- Text text= getTextControl(parent);
- text.setLayoutData(gridDataForText(nColumns - 2));
- Button button= getChangeControl(parent);
- button.setLayoutData(gridDataForButton(button, 1));
-
- return new Control[] { label, text, button };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 3;
- }
-
- protected static GridData gridDataForButton(Button button, int span) {
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= false;
- gd.horizontalSpan= span;
- gd.widthHint = SWTUtil.getButtonWidthHint(button);
- return gd;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created buttom widget.
- * @param parent The parent composite or null if the widget has
- * already been created.
- */
- public Button getChangeControl(Composite parent) {
- if (fBrowseButton == null) {
- assertCompositeNotNull(parent);
-
- fBrowseButton= new Button(parent, SWT.PUSH);
- fBrowseButton.setText(fBrowseButtonLabel);
- fBrowseButton.setEnabled(isEnabled() && fButtonEnabled);
- fBrowseButton.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- changeControlPressed();
- }
- @Override
- public void widgetSelected(SelectionEvent e) {
- changeControlPressed();
- }
- });
-
- }
- return fBrowseButton;
- }
-
- // ------ enable / disable management
-
- /**
- * Sets the enable state of the button.
- */
- public void enableButton(boolean enable) {
- if (isOkToUse(fBrowseButton)) {
- fBrowseButton.setEnabled(isEnabled() && enable);
- }
- fButtonEnabled= enable;
- }
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (isOkToUse(fBrowseButton)) {
- fBrowseButton.setEnabled(isEnabled() && fButtonEnabled);
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonStatusDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonStatusDialogField.java
deleted file mode 100644
index 1513758478d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringButtonStatusDialogField.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog field containing a label, text control, status label and a button control.
- * The status label can be either a image or text label, and can be usd to give
- * additional information about the current element chosen.
- */
-public class StringButtonStatusDialogField extends StringButtonDialogField {
-
- private Label fStatusLabelControl;
- private Object fStatus; // String or ImageDescriptor
-
- private String fWidthHintString;
- private int fWidthHint;
-
- public StringButtonStatusDialogField(IStringButtonAdapter adapter) {
- super(adapter);
- fStatus= null;
- fWidthHintString= null;
- fWidthHint= -1;
- }
-
- // ------ set status
-
- /**
- * Sets the status string.
- */
- public void setStatus(String status) {
- if (isOkToUse(fStatusLabelControl)) {
- fStatusLabelControl.setText(status);
- }
- fStatus= status;
- }
-
- /**
- * Sets the status image.
- * Caller is responsible to dispose image
- */
- public void setStatus(Image image) {
- if (isOkToUse(fStatusLabelControl)) {
- if (image == null) {
- fStatusLabelControl.setImage(null);
- } else {
- fStatusLabelControl.setImage(image);
- }
- }
- fStatus= image;
- }
-
- /**
- * Sets the staus string hint of the status label.
- * The string is used to calculate the size of the status label.
- */
- public void setStatusWidthHint(String widthHintString) {
- fWidthHintString= widthHintString;
- fWidthHint= -1;
- }
-
- /**
- * Sets the width hint of the status label.
- */
- public void setStatusWidthHint(int widthHint) {
- fWidthHint= widthHint;
- fWidthHintString= null;
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(1));
- Text text= getTextControl(parent);
- text.setLayoutData(gridDataForText(nColumns - 3));
- Label status= getStatusLabelControl(parent);
- status.setLayoutData(gridDataForStatusLabel(parent, 1));
- Button button= getChangeControl(parent);
- button.setLayoutData(gridDataForButton(button, 1));
-
- return new Control[] { label, text, status, button };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 4;
- }
-
- protected GridData gridDataForStatusLabel(Control aControl, int span) {
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.BEGINNING;
- gd.grabExcessHorizontalSpace= false;
- gd.horizontalIndent= 0;
- if (fWidthHintString != null) {
- GC gc= new GC(aControl);
- gd.widthHint= gc.textExtent(fWidthHintString).x;
- gc.dispose();
- } else if (fWidthHint != -1) {
- gd.widthHint= fWidthHint;
- } else {
- gd.widthHint= SWT.DEFAULT;
- }
- return gd;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created status label widget.
- * @param parent The parent composite or null when the widget has
- * already been created.
- */
- public Label getStatusLabelControl(Composite parent) {
- if (fStatusLabelControl == null) {
- assertCompositeNotNull(parent);
- fStatusLabelControl= new Label(parent, SWT.LEFT);
- fStatusLabelControl.setFont(parent.getFont());
- fStatusLabelControl.setEnabled(isEnabled());
- if (fStatus instanceof Image) {
- fStatusLabelControl.setImage((Image)fStatus);
- } else if (fStatus instanceof String) {
- fStatusLabelControl.setText((String)fStatus);
- } else {
- // must be null
- }
- }
- return fStatusLabelControl;
- }
-
- // ------ enable / disable management
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (isOkToUse(fStatusLabelControl)) {
- fStatusLabelControl.setEnabled(isEnabled());
- }
- }
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringDialogField.java
deleted file mode 100644
index ff320aa36c6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/StringDialogField.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.dialogfields;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog field containing a label and a text control.
- */
-public class StringDialogField extends DialogField {
-
- private String fText;
- private Text fTextControl;
- private ModifyListener fModifyListener;
-
- public StringDialogField() {
- super();
- fText= ""; //$NON-NLS-1$
- }
-
- // ------- layout helpers
-
- /*
- * @see DialogField#doFillIntoGrid
- */
- @Override
- public Control[] doFillIntoGrid(Composite parent, int nColumns) {
- assertEnoughColumns(nColumns);
-
- Label label= getLabelControl(parent);
- label.setLayoutData(gridDataForLabel(1));
- Text text= getTextControl(parent);
- text.setLayoutData(gridDataForText(nColumns - 1));
-
- return new Control[] { label, text };
- }
-
- /*
- * @see DialogField#getNumberOfControls
- */
- @Override
- public int getNumberOfControls() {
- return 2;
- }
-
- protected static GridData gridDataForText(int span) {
- GridData gd= new GridData();
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= false;
- gd.horizontalSpan= span;
- return gd;
- }
-
- // ------- focus methods
-
- /*
- * @see DialogField#setFocus
- */
- @Override
- public boolean setFocus() {
- if (isOkToUse(fTextControl)) {
- fTextControl.setFocus();
- fTextControl.setSelection(0, fTextControl.getText().length());
- }
- return true;
- }
-
- // ------- ui creation
-
- /**
- * Creates or returns the created text control.
- * @param parent The parent composite or null when the widget has
- * already been created.
- */
- public Text getTextControl(Composite parent) {
- if (fTextControl == null) {
- assertCompositeNotNull(parent);
- fModifyListener= new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- doModifyText(e);
- }
- };
-
- fTextControl= new Text(parent, SWT.SINGLE | SWT.BORDER);
- // moved up due to 1GEUNW2
- fTextControl.setText(fText);
- fTextControl.setFont(parent.getFont());
- fTextControl.addModifyListener(fModifyListener);
-
- fTextControl.setEnabled(isEnabled());
- }
- return fTextControl;
- }
-
- protected void doModifyText(ModifyEvent e) {
- if (isOkToUse(fTextControl)) {
- fText= fTextControl.getText();
- }
- dialogFieldChanged();
- }
-
- // ------ enable / disable management
-
- /*
- * @see DialogField#updateEnableState
- */
- @Override
- protected void updateEnableState() {
- super.updateEnableState();
- if (isOkToUse(fTextControl)) {
- fTextControl.setEnabled(isEnabled());
- }
- }
-
- // ------ text access
-
- /**
- * Gets the text. Can not be null
- */
- public String getText() {
- return fText;
- }
-
- /**
- * Sets the text. Triggers a dialog-changed event.
- */
- public void setText(String text) {
- fText= text;
- if (isOkToUse(fTextControl)) {
- fTextControl.setText(text);
- } else {
- dialogFieldChanged();
- }
- }
-
- /**
- * Sets the text without triggering a dialog-changed event.
- */
- public void setTextWithoutUpdate(String text) {
- fText= text;
- if (isOkToUse(fTextControl)) {
- fTextControl.removeModifyListener(fModifyListener);
- fTextControl.setText(text);
- fTextControl.addModifyListener(fModifyListener);
- }
- }
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
deleted file mode 100644
index ba805ebc8e4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
+++ /dev/null
@@ -1,574 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.preferences;
-
-import com.ibm.icu.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Iterator;
-import org.eclipse.cdt.debug.mi.core.IMIConstants;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.internal.ui.IMIHelpContextIds;
-import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * Page for preferences that apply specifically to GDB MI.
- */
-public class MIPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IPropertyChangeListener {
-
- /**
- * This class exists to provide visibility to the
- * refreshValidState method and to perform more intelligent
- * clearing of the error message.
- */
- protected class MIIntegerFieldEditor extends IntegerFieldEditor {
-
- public MIIntegerFieldEditor(String name, String labelText, Composite parent) {
- super(name, labelText, parent);
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#refreshValidState()
- */
- @Override
- protected void refreshValidState() {
- super.refreshValidState();
- }
-
- /**
- * Clears the error message from the message line if the error
- * message is the error message from this field editor.
- */
- @Override
- protected void clearErrorMessage() {
- if (canClearErrorMessage()) {
- super.clearErrorMessage();
- }
- }
- }
- public class MIPreferenceStore implements IPreferenceStore {
-
- private Preferences fPreferences;
-
- private HashMap fListeners = new HashMap();
-
- public MIPreferenceStore( Preferences pref ) {
- fPreferences = pref;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- @Override
- public void addPropertyChangeListener( final IPropertyChangeListener listener ) {
- Preferences.IPropertyChangeListener l = new Preferences.IPropertyChangeListener() {
-
- @Override
- public void propertyChange( org.eclipse.core.runtime.Preferences.PropertyChangeEvent event ) {
- listener.propertyChange( new PropertyChangeEvent( MIPreferenceStore.this, event.getProperty(), event.getNewValue(), event.getOldValue() ) );
- }
- };
- fListeners.put( listener, l );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#contains(java.lang.String)
- */
- @Override
- public boolean contains( String name ) {
- return getPreferences().contains( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#firePropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
- */
- @Override
- public void firePropertyChangeEvent( String name, Object oldValue, Object newValue ) {
- Iterator it = fListeners.keySet().iterator();
- while( it.hasNext() ) {
- ((IPropertyChangeListener)it.next()).propertyChange( new PropertyChangeEvent( this, name, oldValue, newValue ) );
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getBoolean(java.lang.String)
- */
- @Override
- public boolean getBoolean( String name ) {
- return fPreferences.getBoolean( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultBoolean(java.lang.String)
- */
- @Override
- public boolean getDefaultBoolean( String name ) {
- return fPreferences.getDefaultBoolean( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultDouble(java.lang.String)
- */
- @Override
- public double getDefaultDouble( String name ) {
- return fPreferences.getDefaultDouble( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultFloat(java.lang.String)
- */
- @Override
- public float getDefaultFloat( String name ) {
- return fPreferences.getDefaultFloat( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultInt(java.lang.String)
- */
- @Override
- public int getDefaultInt( String name ) {
- return fPreferences.getDefaultInt( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultLong(java.lang.String)
- */
- @Override
- public long getDefaultLong( String name ) {
- return fPreferences.getDefaultLong( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultString(java.lang.String)
- */
- @Override
- public String getDefaultString( String name ) {
- return fPreferences.getDefaultString( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDouble(java.lang.String)
- */
- @Override
- public double getDouble( String name ) {
- return fPreferences.getDouble( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getFloat(java.lang.String)
- */
- @Override
- public float getFloat( String name ) {
- return fPreferences.getFloat( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getInt(java.lang.String)
- */
- @Override
- public int getInt( String name ) {
- return fPreferences.getInt( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getLong(java.lang.String)
- */
- @Override
- public long getLong( String name ) {
- return fPreferences.getLong( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getString(java.lang.String)
- */
- @Override
- public String getString( String name ) {
- return fPreferences.getString( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#isDefault(java.lang.String)
- */
- @Override
- public boolean isDefault( String name ) {
- return fPreferences.isDefault( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#needsSaving()
- */
- @Override
- public boolean needsSaving() {
- return getPreferences().needsSaving();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#putValue(java.lang.String, java.lang.String)
- */
- @Override
- public void putValue( String name, String value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- @Override
- public void removePropertyChangeListener( IPropertyChangeListener listener ) {
- fListeners.remove( listener );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, double)
- */
- @Override
- public void setDefault( String name, double value ) {
- getPreferences().setDefault( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, float)
- */
- @Override
- public void setDefault( String name, float value ) {
- getPreferences().setDefault( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, int)
- */
- @Override
- public void setDefault( String name, int value ) {
- getPreferences().setDefault( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, long)
- */
- @Override
- public void setDefault( String name, long value ) {
- getPreferences().setDefault( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, java.lang.String)
- */
- @Override
- public void setDefault( String name, String defaultObject ) {
- getPreferences().setDefault( name, defaultObject );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, boolean)
- */
- @Override
- public void setDefault( String name, boolean value ) {
- getPreferences().setDefault( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setToDefault(java.lang.String)
- */
- @Override
- public void setToDefault( String name ) {
- getPreferences().setToDefault( name );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, double)
- */
- @Override
- public void setValue( String name, double value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, float)
- */
- @Override
- public void setValue( String name, float value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, int)
- */
- @Override
- public void setValue( String name, int value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, long)
- */
- @Override
- public void setValue( String name, long value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, java.lang.String)
- */
- @Override
- public void setValue( String name, String value ) {
- getPreferences().setValue( name, value );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, boolean)
- */
- @Override
- public void setValue( String name, boolean value ) {
- getPreferences().setValue( name, value );
- }
-
- protected Preferences getPreferences() {
- return fPreferences;
- }
- }
-
- private IWorkbench fWorkbench;
-
- // Debugger timeout preference widgets
- private MIIntegerFieldEditor fDebugTimeoutText;
-
- // Launch timeout preference widgets
- private MIIntegerFieldEditor fLaunchTimeoutText;
-
- private BooleanFieldEditor fRefreshSolibsButton;
-
- private MIPreferenceStore fMICorePreferenceStore = new MIPreferenceStore( MIPlugin.getDefault().getPluginPreferences() );
-
- /**
- * Constructor for MIPreferencePage.
- */
- public MIPreferencePage() {
- super();
- setPreferenceStore( MIUIPlugin.getDefault().getPreferenceStore() );
- setDescription( PreferenceMessages.getString( "MIPreferencePage.0" ) ); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- @Override
- protected Control createContents( Composite parent ) {
- getWorkbench().getHelpSystem().setHelp( getControl(), IMIHelpContextIds.MI_PREFERENCE_PAGE );
- //The main composite
- Composite composite = new Composite( parent, SWT.NULL );
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout( layout );
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData( data );
- createSpacer( composite, 1 );
- createCommunicationPreferences( composite );
- return composite;
- }
-
- /**
- * Creates composite group and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @param labelText the text label of the new composite
- * @return the newly-created composite
- */
- private Composite createGroupComposite( Composite parent, int numColumns, String labelText ) {
- return ControlFactory.createGroup( parent, labelText, numColumns );
- }
-
- /**
- * @see IPreferencePage#performOk()
- */
- @Override
- public boolean performOk() {
- boolean result = super.performOk();
- storeValues();
- MIUIPlugin.getDefault().savePluginPreferences();
- MIPlugin.getDefault().savePluginPreferences();
- return result;
- }
-
- /**
- * Sets the default preferences.
- *
- * @see PreferencePage#performDefaults()
- */
- @Override
- protected void performDefaults() {
- setDefaultValues();
- super.performDefaults();
- }
-
- private void setDefaultValues() {
- fDebugTimeoutText.loadDefault();
- fLaunchTimeoutText.loadDefault();
- fRefreshSolibsButton.loadDefault();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(IWorkbench)
- */
- @Override
- public void init( IWorkbench workbench ) {
- fWorkbench = workbench;
- }
-
- protected void createSpacer( Composite composite, int columnSpan ) {
- Label label = new Label( composite, SWT.NONE );
- GridData gd = new GridData();
- gd.horizontalSpan = columnSpan;
- label.setLayoutData( gd );
- }
-
- private void createCommunicationPreferences( Composite composite ) {
- Composite comp = createGroupComposite( composite, 1, PreferenceMessages.getString( "MIPreferencePage.1" ) ); //$NON-NLS-1$
- //Add in an intermediate composite to allow for spacing
- Composite spacingComposite = new Composite( comp, SWT.NONE );
- GridLayout layout = new GridLayout();
- spacingComposite.setLayout( layout );
- GridData data = new GridData();
- data.horizontalSpan = 2;
- spacingComposite.setLayoutData( data );
- fDebugTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_TIMEOUT, PreferenceMessages.getString( "MIPreferencePage.2" ), spacingComposite ); //$NON-NLS-1$
- fDebugTimeoutText.setPropertyChangeListener( this );
- fLaunchTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, PreferenceMessages.getString( "MIPreferencePage.3" ), spacingComposite ); //$NON-NLS-1$
- fLaunchTimeoutText.setPropertyChangeListener( this );
- fRefreshSolibsButton = createCheckbox( IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, PreferenceMessages.getString( "MIPreferencePage.6" ), spacingComposite ); //$NON-NLS-1$
- }
-
- /**
- * Store the preference values based on the state of the component widgets
- */
- private void storeValues() {
- fDebugTimeoutText.store();
- fLaunchTimeoutText.store();
- fRefreshSolibsButton.store();
- }
-
- private MIIntegerFieldEditor createTimeoutField( String preference, String label, Composite parent ) {
- MIIntegerFieldEditor toText = new MIIntegerFieldEditor( preference, label, parent );
- GridData data = new GridData();
- data.widthHint = convertWidthInCharsToPixels( 10 );
- toText.getTextControl( parent ).setLayoutData( data );
- toText.setPreferenceStore( getMICorePreferenceStore() );
- toText.setPage( this );
- toText.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE );
- toText.setValidRange( IMIConstants.MIN_REQUEST_TIMEOUT, IMIConstants.MAX_REQUEST_TIMEOUT );
- String minValue = Integer.toString( IMIConstants.MIN_REQUEST_TIMEOUT );
- String maxValue = Integer.toString( IMIConstants.MAX_REQUEST_TIMEOUT );
- toText.setErrorMessage( MessageFormat.format( PreferenceMessages.getString( "MIPreferencePage.4" ), new String[]{ minValue, maxValue } ) ); //$NON-NLS-1$
- toText.load();
- return toText;
- }
-
- private BooleanFieldEditor createCheckbox( String preference, String label, Composite parent ) {
- BooleanFieldEditor field = new BooleanFieldEditor( preference, label, parent );
- field.setPage( this );
- field.setPreferenceStore( new MIPreferenceStore( MIPlugin.getDefault().getPluginPreferences() ) );
- field.load();
- return field;
- }
-
- protected MIPreferenceStore getMICorePreferenceStore() {
- return fMICorePreferenceStore;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- @Override
- public void dispose() {
- fDebugTimeoutText.dispose();
- fLaunchTimeoutText.dispose();
- fRefreshSolibsButton.dispose();
- super.dispose();
- }
-
- protected MIIntegerFieldEditor getLaunchTimeoutText() {
- return fLaunchTimeoutText;
- }
-
- protected MIIntegerFieldEditor getDebugTimeoutText() {
- return fDebugTimeoutText;
- }
-
- /**
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- @Override
- public void propertyChange(PropertyChangeEvent event) {
-
- if (event.getProperty().equals(FieldEditor.IS_VALID)) {
- boolean newValue = ((Boolean) event.getNewValue()).booleanValue();
- // If the new value is true then we must check all field editors.
- // If it is false, then the page is invalid in any case.
- MIIntegerFieldEditor launchTimeout = getLaunchTimeoutText();
- MIIntegerFieldEditor debugTimeout = getDebugTimeoutText();
- if (newValue) {
- if (launchTimeout != null && event.getSource() != launchTimeout) {
- launchTimeout.refreshValidState();
- }
- if (debugTimeout != null && event.getSource() != debugTimeout) {
- debugTimeout.refreshValidState();
- }
- }
- setValid(launchTimeout.isValid() && debugTimeout.isValid());
- getContainer().updateButtons();
- updateApplyButton();
- }
- }
-
- protected boolean canClearErrorMessage() {
- MIIntegerFieldEditor launchTimeout = getLaunchTimeoutText();
- MIIntegerFieldEditor debugTimeout = getDebugTimeoutText();
- boolean validLaunch = false;
- boolean validDebug = false;
- if (launchTimeout != null) {
- validLaunch = launchTimeout.isValid();
- }
- if (debugTimeout != null) {
- validDebug = debugTimeout.isValid();
- }
- return validLaunch && validDebug;
- }
-
- private IWorkbench getWorkbench() {
- return fWorkbench;
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
deleted file mode 100644
index 2ae2b0266b4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.preferences;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class PreferenceMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.preferences.PreferenceMessages";//$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- private PreferenceMessages() {
- }
-
- public static String getString( String key ) {
- try {
- return RESOURCE_BUNDLE.getString( key );
- }
- catch( MissingResourceException e ) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
deleted file mode 100644
index 52edd439374..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2010 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-# IBM Corporation
-###############################################################################
-
-MIPreferencePage.0=General settings for GDB MI.
-MIPreferencePage.1=Communication
-MIPreferencePage.2=&Debugger timeout (ms):
-MIPreferencePage.3=&Launch timeout (ms):
-MIPreferencePage.4=Value must be an integer between {0} and {1}.
-MIPreferencePage.6=Automatically refresh modules
-
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
deleted file mode 100644
index 1eba323ba53..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.propertypages;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * The property page for the gdb/mi-based debugger options.
- */
-public class OptionsPropertyPage extends PropertyPage {
-
- private Button fRefreshSolibsButton;
-
- /**
- * Constructor for OptionsPropertyPage.
- */
- public OptionsPropertyPage() {
- noDefaultAndApplyButton();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents( Composite parent ) {
- Composite comp = ControlFactory.createComposite( parent, 1 );
- fRefreshSolibsButton = createCheckButton( comp, PropertyMessages.getString( "OptionsPropertyPage.1" ) ); //$NON-NLS-1$
- initialize();
- return comp;
- }
-
- private Button createCheckButton( Composite parent, String label ) {
- Button button = new Button( parent, SWT.CHECK | SWT.LEFT );
- button.setText( label );
- // FieldEditor GridData
- GridData data = new GridData();
- button.setLayoutData( data );
- return button;
- }
-
- private void initialize() {
- boolean solibUpdate = true;
- ICDISession session = getElement().getAdapter( ICDISession.class );
- if ( session instanceof Session ) {
- solibUpdate = ((Session)session).getSharedLibraryManager().isAutoUpdate();
- }
- fRefreshSolibsButton.setSelection( solibUpdate );
-
- }
-
- @Override
- protected void performApply() {
- storeValues();
- super.performApply();
- }
-
- @Override
- public boolean performOk() {
- storeValues();
- return super.performOk();
- }
-
- private void storeValues() {
- ICDISession session = getElement().getAdapter( ICDISession.class );
- final ICDITarget target = getElement().getAdapter( ICDITarget.class );
- if ( session instanceof Session ) {
- final boolean solibUpdate = fRefreshSolibsButton.getSelection();
- final Session miSession = ((Session)session);
- miSession.getSharedLibraryManager().setAutoUpdate( solibUpdate );
- if ( target.isSuspended() && solibUpdate ) {
- DebugPlugin.getDefault().asyncExec( new Runnable() {
-
- @Override
- public void run() {
- if ( target.isSuspended() ) {
- if ( solibUpdate ) {
- try {
- miSession.getSharedLibraryManager().update();
- }
- catch( CDIException e ) {
- }
- }
- }
- }
- } );
- }
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.java
deleted file mode 100644
index eabe4d9dce6..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.internal.ui.propertypages;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Comment for .
- */
-public class PropertyMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.propertypages.PropertyMessages";//$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- private PropertyMessages() {
- }
-
- public static String getString( String key ) {
- // TODO Auto-generated method stub
- try {
- return RESOURCE_BUNDLE.getString( key );
- }
- catch( MissingResourceException e ) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
deleted file mode 100644
index d47a940b7d7..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 QNX Software Systems and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-###############################################################################
-OptionsPropertyPage.1=Automatically refresh modules
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/IMILaunchConfigurationComponent.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/IMILaunchConfigurationComponent.java
deleted file mode 100644
index c363b9eeaf0..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/IMILaunchConfigurationComponent.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * The common interface for UI components of the launch configuration tabs.
- */
-public interface IMILaunchConfigurationComponent {
-
- /**
- * Creates the top level control for this component under the given parent composite.
- *
- * Implementors are responsible for ensuring that the created control can be accessed via getControl
- *
- *
- * @param parent the parent composite
- */
- public void createControl( Composite parent );
-
- /**
- * Returns the top level control for this component.
- *
- * May return null if the control has not been created yet.
- *
- *
- * @return the top level control or null
- */
- public Control getControl();
-
- /**
- * Initializes the given component with default values.
- * This method may be called before this tab's control is created.
- *
- * @param configuration launch configuration
- */
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration );
-
- /**
- * Initializes this component's controls with values from the given
- * launch configuration.
- *
- * @param configuration launch configuration
- */
- public void initializeFrom( ILaunchConfiguration configuration );
-
- /**
- * Notifies this component that it has been disposed.
- * Marks the end of this component's lifecycle, allowing
- * to perform any cleanup required.
- */
- public void dispose();
-
- /**
- * Copies values from this component into the given launch configuration.
- *
- * @param configuration launch configuration
- */
- public void performApply( ILaunchConfigurationWorkingCopy configuration );
-
- /**
- * Returns whether this component is in a valid state in the context
- * of the specified launch configuration.
- *
- * @param launchConfig launch configuration which provides context
- * for validating this component.
- * This value must not be null.
- *
- * @return whether this component is in a valid state
- */
- public boolean isValid(ILaunchConfiguration launchConfig);
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/MIUIUtils.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/MIUIUtils.java
deleted file mode 100644
index b0277bba31d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/MIUIUtils.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui;
-
-import org.eclipse.cdt.debug.mi.internal.ui.GDBSolibBlock;
-import org.eclipse.cdt.debug.mi.internal.ui.SolibSearchPathBlock;
-import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IListAdapter;
-
-/**
- * This class provides utilities for clients of the MI UI.
- */
-public class MIUIUtils {
-
- public static IMILaunchConfigurationComponent createGDBSolibBlock( IMILaunchConfigurationComponent solibSearchBlock, boolean autoSolib, boolean stopOnSolibEvents ) {
- return new GDBSolibBlock( solibSearchBlock, autoSolib, stopOnSolibEvents );
- }
-
- public static IMILaunchConfigurationComponent createGDBSolibBlock( boolean autoSolib, boolean stopOnSolibEvents ) {
- return new GDBSolibBlock( new SolibSearchPathBlock(), autoSolib, stopOnSolibEvents );
- }
-
- public static IMILaunchConfigurationComponent createSolibSearchPathBlock( String[] customButtonLabels, IListAdapter listAdapter ) {
- return new SolibSearchPathBlock( customButtonLabels, listAdapter );
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/MiConsolePageParticipant.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/MiConsolePageParticipant.java
deleted file mode 100644
index 98a30180bb5..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/MiConsolePageParticipant.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 STMicroelectronics and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- * Alena Laskavaia (QNX) - Fix for 186172
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui.console;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import org.eclipse.cdt.debug.mi.core.GDBProcess;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.ui.console.actions.MiConsoleSaveAction;
-import org.eclipse.cdt.debug.mi.ui.console.actions.MiConsoleVerboseModeAction;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.console.IConsoleConstants;
-import org.eclipse.ui.console.IConsolePageParticipant;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.console.IConsole;
-
-/**
- * Enhances ProcessConsole when the process attached is a GDBProcess
- * @since 6.1
- *
- */
-public class MiConsolePageParticipant implements IConsolePageParticipant, IDebugEventSetListener, Observer {
-
- private MiConsoleSaveAction fSaveConsole = null;
- private MiConsoleVerboseModeAction fVerboseMode = null;
- private org.eclipse.debug.ui.console.IConsole fConsole = null;
- private org.eclipse.cdt.debug.mi.core.GDBProcess GDBProcess = null;
-
- @Override
- public void activated() {
- }
-
- @Override
- public void deactivated() {
- }
-
- @Override
- public void dispose() {
- if (GDBProcess != null) {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- }
- fSaveConsole = null;
- fVerboseMode = null;
- GDBProcess = null;
- fConsole = null;
- }
-
- @Override
- public void init(IPageBookViewPage page, IConsole console) {
-
- if(console instanceof org.eclipse.debug.ui.console.IConsole)
- {
- fConsole = (org.eclipse.debug.ui.console.IConsole) console;
- if(fConsole.getProcess() instanceof GDBProcess) {
-
- GDBProcess = (GDBProcess) fConsole.getProcess();
-
- // add two new actions: save console content and verbose console mode switcher
- IActionBars bars = page.getSite().getActionBars();
- bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator());
- fSaveConsole = new MiConsoleSaveAction(fConsole);
- bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, fSaveConsole);
- fVerboseMode = new MiConsoleVerboseModeAction(fConsole);
- bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, fVerboseMode);
- bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator());
-
- // add a debug event listener
- DebugPlugin.getDefault().addDebugEventListener(this);
- // if we miss change event update enablement manually
- fVerboseMode.updateStateAndEnablement();
- Target target = GDBProcess.getTarget();
- if (target != null) {
- // register this object as MISession observer
- target.getMISession().addObserver(this);
- }
- }
- }
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- @Override
- public void handleDebugEvents(DebugEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- DebugEvent event = events[i];
- if (event.getSource().equals(GDBProcess)) {
- if (fVerboseMode != null) {
- fVerboseMode.updateStateAndEnablement();
- Target target = GDBProcess.getTarget();
- if (target != null) {
- // register this object as MISession observer
- target.getMISession().addObserver(this);
- }
- }
- }
- }
- }
-
- /**
- * Handle MISession notification
- */
- @Override
- public void update(Observable arg0, Object arg1) {
- if((arg1!=null) && (arg1 instanceof VerboseModeChangedEvent) && (fVerboseMode != null)) {
- try {
- fVerboseMode.updateStateAndEnablement();
- } catch (Exception e) {
- }
- }
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/VerboseModeChangedEvent.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/VerboseModeChangedEvent.java
deleted file mode 100644
index 3db6cb4c84a..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/VerboseModeChangedEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 STMicroelectronics.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui.console;
-
-import org.eclipse.cdt.debug.mi.core.MISession;
-import org.eclipse.cdt.debug.mi.core.event.MIEvent;
-
-/**
- * MISession event, verbose console mode changed
- * @since 6.1
- *
- */
-public class VerboseModeChangedEvent extends MIEvent {
-
- private static final long serialVersionUID = 1L;
-
- public VerboseModeChangedEvent(MISession session, int token) {
- super(session, token);
- setPropagate(false);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/IMiConsoleImagesConst.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/IMiConsoleImagesConst.java
deleted file mode 100644
index 5459ce6312d..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/IMiConsoleImagesConst.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2014 STMicroelectronics.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui.console.actions;
-
-/** @since 6.2 */
-public interface IMiConsoleImagesConst {
-
- public static final String IMG_SAVE_CONSOLE = "icons/obj16/save_console.gif"; //$NON-NLS-1$
- public static final String IMG_VERBOSE_CONSOLE = "icons/obj16/verbose_mode_co.gif"; //$NON-NLS-1$
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.java
deleted file mode 100644
index 37f1157cd4b..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2014 STMicroelectronics.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui.console.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-/** @since 6.2 */
-public class MiConsoleMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.ui.console.actions.MiConsoleMessages"; //$NON-NLS-1$
-
- public static String saveActionTooltip;
- public static String verboseActionTooltip;
-
- public static String confirmOverWrite;
- public static String infoIOError;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, MiConsoleMessages.class);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.properties
deleted file mode 100644
index 4ac24931069..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleMessages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 STMicroelectronics
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# STMicroelectronics - initial API and implementation
-###############################################################################
-saveActionTooltip=Save console content
-verboseActionTooltip=Verbose console mode
-confirmOverWrite=File exists, do you want overwrite it?
-infoIOError=Error during save console content. Task failed.
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleSaveAction.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleSaveAction.java
deleted file mode 100644
index 1a226d9516e..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleSaveAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2014 STMicroelectronics.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.mi.ui.console.actions;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
-import org.eclipse.debug.ui.console.IConsole;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-
-/**
- * Save console content
- * @since 6.2
- */
-public class MiConsoleSaveAction extends Action{
-
- private IConsole fConsole;
- private String fileName;
-
- public MiConsoleSaveAction(IConsole console) {
- super();
- setToolTipText(MiConsoleMessages.saveActionTooltip);
- setImageDescriptor(MIUIPlugin.imageDescriptorFromPlugin(MIUIPlugin.PLUGIN_ID,IMiConsoleImagesConst.IMG_SAVE_CONSOLE));
- fConsole = console;
- }
-
- @Override
- public void run() {
-
- FileDialog fileDialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
- fileName = fileDialog.open();
- if(fileName==null) {
- return;
- }
-
- Runnable saveJob = new Runnable() {
- @Override
- public void run() {
- saveContent();
- }
- };
- BusyIndicator.showWhile(Display.getCurrent(), saveJob);
-
- }
-
- protected void saveContent() {
- boolean confirmed = true;
-
- try {
- File f = new File(fileName);
- if(f.exists()) {
- confirmed = MessageDialog.openQuestion(Display.getCurrent().getActiveShell(), "Confirm overwrite", MiConsoleMessages.confirmOverWrite);
- }
- if(confirmed) {
- BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
- out.write(fConsole.getDocument().get());
- out.close();
- }
- } catch (IOException e) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error",MiConsoleMessages.infoIOError);
- }
-
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleVerboseModeAction.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleVerboseModeAction.java
deleted file mode 100644
index 43861f18aa4..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/ui/console/actions/MiConsoleVerboseModeAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2014 STMicroelectronics and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * STMicroelectronics - Process console enhancements
- * Alena Laskavaia (QNX) - Fix for 186172
- *******************************************************************************/
-package org.eclipse.cdt.debug.mi.ui.console.actions;
-
-import org.eclipse.cdt.debug.mi.core.GDBProcess;
-import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
-import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
-import org.eclipse.debug.ui.console.IConsole;
-import org.eclipse.jface.action.Action;
-
-/**
- * Verbose console mode switcher
- * @since 6.2
- */
-public class MiConsoleVerboseModeAction extends Action {
- private IConsole fConsole;
-
- public MiConsoleVerboseModeAction(IConsole console) {
- super();
- setToolTipText(MiConsoleMessages.verboseActionTooltip);
- setImageDescriptor(MIUIPlugin.imageDescriptorFromPlugin(MIUIPlugin.PLUGIN_ID, IMiConsoleImagesConst.IMG_VERBOSE_CONSOLE));
- fConsole = console;
- }
-
- public void updateStateAndEnablement() {
- // initialize button
- GDBProcess gdbProcess = (GDBProcess) fConsole.getProcess();
- setEnabled(!gdbProcess.isTerminated());
- Target target = gdbProcess.getTarget();
- if (target != null) {
- setChecked(target.isVerboseModeEnabled());
- } else {
- setChecked(false);
- }
- }
-
- @Override
- public void run() {
- GDBProcess fProcess = (GDBProcess) fConsole.getProcess();
- fProcess.getTarget().enableVerboseMode(isChecked());
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/.classpath b/debug/org.eclipse.cdt.debug.ui.tests/.classpath
deleted file mode 100644
index 008f088c0bc..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/.cvsignore b/debug/org.eclipse.cdt.debug.ui.tests/.cvsignore
deleted file mode 100644
index ba077a4031a..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/.project b/debug/org.eclipse.cdt.debug.ui.tests/.project
deleted file mode 100644
index 05c3409f881..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.eclipse.cdt.debug.ui.tests
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.pde.PluginNature
-
-
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs b/debug/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f1a5b0952d1..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Jan 28 09:57:10 CST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/Changelog b/debug/org.eclipse.cdt.debug.ui.tests/Changelog
deleted file mode 100644
index 89f305af7cf..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/Changelog
+++ /dev/null
@@ -1,69 +0,0 @@
-2005-07-22 Alain Magloire
- Fix to Copyright.
-
-2004-10-17 Alain Magloire
- Remove deprecated method in CDI adjust the implementation.
- * core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
- * core/org/eclipse/cdt/debug/core/tests/DebugTests.java
- * core/org/eclipse/cdt/debug/core/tests/LocationTests.java
-
-2004-10-15 Alain Magloire
- Adjust to the change in the CDI
- * core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
- * core/org/eclipse/cdt/debug/core/tests/DebugTests.java
- * core/org/eclipse/cdt/debug/core/tests/LocationTests.java
-
-2004-09-07 Mikhail Khodjaiants
- Moved to the new breakpoint management API.
- * core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
- * core/org/eclipse/cdt/debug/core/tests/DebugTests.java
- * core/org/eclipse/cdt/debug/core/tests/LocationTests.java
-
-2003-07-03 Peter Graves
-
- Major cleanup. Pulled all resouces out of the source tree, and fixed the
- tests to get them from the new location.
- Made sure the debug sessions were all terminated before we try to delete the
- the projects (if the tests failed, the session would not be terminated, and
- then we would not be able to remove the projects.)
- Also updated the breakpoint tests to only create and build the test project
- once per run, not once per test method.
-
-2003-04-04 Alain Magloire
-
- * src/org/eclipse/cdt/debug/testplugin/util/VeryfyDialog.java:
- Get rig of some warnings.
-
-2003-03-27 Alain Magloire
-
- Adjust the code because of refactoring.
- ICFolder and ICResource are removed.
-
-2003-01-29 Peter Graves
-
- Fixed warnings when accessing static methods
- * src/org/eclipse/cdt/debug/testplugin/util/DialogCheck.java:
- * src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java:
- * src/org/eclipse/cdt/debug/testplugin/TestWorkbench.java:
- * ChangeLog: Make all the entries have the same formatting
-
-2003-01-22 Judy N. Green
-
- * /home/tools/org.eclipse.cdt.debug.ui.tests/.project
- * /home/tools/org.eclipse.cdt.debug.ui.tests/.classpath
- updated classpath and .project to reflect classpath changes.
-
-2003-01-21 Peter Graves
-
- * src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java: Updated to use new parameters to
- ICDISession.createCSession
-
-2002-12-17 Peter Graves
-
- * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
- to move closer to automated running.
-
-2002-10-30 Alain Magloire
-
- * core/org/eclipse/cdt/debug/core/tests/TargetTests.java: Test number
- 24183 is no longer valid, the method was remove from the CDI API.
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 822f1872118..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.cdt.debug.ui.tests
-Bundle-SymbolicName: org.eclipse.cdt.debug.ui.tests;singleton:=true
-Bundle-Version: 6.0.0.qualifier
-Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
-Export-Package: org.eclipse.cdt.debug.core.tests,
- org.eclipse.cdt.debug.testplugin,
- org.eclipse.cdt.debug.testplugin.util
-Require-Bundle: org.eclipse.ui.ide,
- org.eclipse.core.resources,
- org.junit,
- org.eclipse.cdt.debug.core,
- org.eclipse.cdt.debug.mi.core,
- org.eclipse.cdt.core,
- org.eclipse.ui,
- org.eclipse.core.runtime.compatibility,
- org.eclipse.cdt.gdb;bundle-version="7.0.0"
-Bundle-ActivationPolicy: lazy
-Plugin-Class: org.eclipse.cdt.debug.testplugin.CTestPlugin
-Bundle-Vendor: Eclipse CDT
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/about.html b/debug/org.eclipse.cdt.debug.ui.tests/about.html
deleted file mode 100644
index 9c7ba0a57bc..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/about.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-About
-
-
-
About This Content
-
-
May 2, 2006
-
License
-
-
The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at http://www.eclipse.org/legal/epl-v10.html.
-For purposes of the EPL, "Program" will mean the Content.
-
-
If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at http://www.eclipse.org.
-
-
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/build.properties b/debug/org.eclipse.cdt.debug.ui.tests/build.properties
deleted file mode 100644
index 643f886aac7..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/,\
- core/
-bin.includes = about.html,\
- plugin.xml,\
- resources/,\
- .,\
- test.xml,\
- META-INF/
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/.cvsignore b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/.cvsignore
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java
deleted file mode 100644
index d2117d8784b..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.extensions.TestSetup;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.testplugin.CDebugHelper;
-import org.eclipse.cdt.debug.testplugin.CProjectHelper;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-public abstract class AbstractDebugTest extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- NullProgressMonitor monitor;
- static ICProject testProject = null;
- static ICDISession session = null;
- static ICDITarget targets[] = null;
- ICDITarget currentTarget;
- static boolean oneTimeSetupDone = false;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- if (oneTimeSetupDone == false) {
- oneTimeSetUp(); // this can happened when run junit failed test from UI, without invoking suite()
- oneTimeSetupDone = false; // re-set it back so tarDownOnes will run
- }
- /***********************************************************************
- * The tests assume that they have a working workspace and workspace
- * root object to use to create projects/files in, so we need to get
- * them setup first.
- */
- workspace = ResourcesPlugin.getWorkspace();
- root = workspace.getRoot();
- monitor = new NullProgressMonitor();
- if (workspace == null)
- fail("Workspace was not setup"); //$NON-NLS-1$
- if (root == null)
- fail("Workspace root was not setup"); //$NON-NLS-1$
- }
-
- void createDebugSession() throws IOException, MIException, CModelException {
- session = CDebugHelper.createSession(getProjectBinary(), testProject);
- assertNotNull(session);
- targets = session.getTargets();
- assertNotNull(targets);
- assertTrue(targets.length > 0);
- currentTarget = targets[0];
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- *
- * Example code test the packages in the project
- * "com.qnx.tools.ide.cdt.core"
- */
- protected void oneTimeSetUp() throws CoreException, InvocationTargetException, IOException {
- ResourcesPlugin.getWorkspace().getDescription().setAutoBuilding(false);
- /***********************************************************************
- * Create a new project and import the test source.
- */
- Path imputFile = new Path(getProjectZip());
- testProject = CProjectHelper.createCProjectWithImport(getProjectName(), imputFile);
- if (testProject == null)
- fail("Unable to create project"); //$NON-NLS-1$
- /* Build the test project.. */
-
- testProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
- oneTimeSetupDone = true;
- }
-
- protected String getProjectName() {
- return "filetest";
- }
-
- protected String getProjectZip() {
- return "resources/debugTest.zip";
- }
-
- protected String getProjectBinary() {
- return "main";
- }
-
-
- public static Display getDisplay() {
- return PlatformUI.getWorkbench().getDisplay();
- }
- /**
- * Dispatch ui events for at least msec - milliseconds
- *
- * @param msec -
- * milliseconds delay
- */
- public static void uimsleep(int msec) {
- long cur = System.currentTimeMillis();
- long pass = 0;
- Display display = getDisplay();
- while (pass < msec) {
- if (!display.readAndDispatch())
- display.sleep();
- pass = System.currentTimeMillis() - cur;
- }
- }
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void oneTimeTearDown() throws CoreException {
- if (targets != null) {
- try {
- targets[0].terminate();
- } catch (CDIException e) {
- }
- }
- if (session != null) {
- try {
- session.terminate();
- } catch (CDIException e) {
- }
- }
- CProjectHelper.delete(testProject);
- if (oneTimeSetupDone == false) {
- oneTimeTearDown(); // this can happened when run junit failed test from UI, without invoking suite()
- }
-
- }
-
- static class DebugTestWrapper extends TestSetup {
- private AbstractDebugTest newInstance;
-
- public DebugTestWrapper(Class clazz) {
- super(new TestSuite(clazz));
- /***********************************************************************
- * Create a wrapper suite around the test suite we created above to
- * allow us to only do the general setup once for all the tests. This is
- * needed because the creation of the source and target projects takes a
- * long time and we really only need to do it once. We could do the
- * setup in the constructor, but we need to be able to remove everything
- * when we are done.
- */
- try {
- newInstance = (AbstractDebugTest) clazz.newInstance();
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- @Override
- protected void setUp() throws FileNotFoundException, IOException, InterruptedException,
- InvocationTargetException, CoreException {
- newInstance.oneTimeSetUp();
- }
-
- @Override
- protected void tearDown() throws FileNotFoundException, IOException, CoreException {
- newInstance.oneTimeTearDown();
- }
- }
-
- void pause() {
- uimsleep(200);
- }
-
- public ICDILocator getCurrentLocator() throws CDIException {
- return getCurrentFrame().getLocator();
- }
-
- public ICDIStackFrame getCurrentFrame() throws CDIException {
- return currentTarget.getCurrentThread().getStackFrames()[0];
- }
-
- void waitSuspend(ICDITarget currentTarget) {
- int loop;
- loop = 0;
- while ((currentTarget.isSuspended() == false) && (currentTarget.isTerminated() == false) && (loop < 20)) {
- uimsleep(500);
- loop++;
- }
- assertFalse("Target should be suspended, but it is terminated " + currentTarget.isTerminated(), currentTarget
- .isTerminated());
- assertTrue("Target should be suspended but it is not", currentTarget.isSuspended());
-
- }
-
- public void resumeCurrentTarget() throws CDIException{
- currentTarget.resume(false);
- }
-
- void setBreakOnMain() throws CDIException {
- ICDILocation location = null;
- location = currentTarget.createFunctionLocation("", "main"); //$NON-NLS-1$
- currentTarget.setFunctionBreakpoint(ICBreakpointType.TEMPORARY, (ICDIFunctionLocation) location, null, false);
- }
-
- @Override
- protected void tearDown() throws Exception {
- /* clean up the session */
- if (session == null) {
- session.terminate();
- session = null;
- }
- super.tearDown();
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java
deleted file mode 100644
index b6e11c85928..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-/**
- *
- * AllDedbugTests.java
- * This is the main entry point for running this suite of JUnit tests
- * for all tests within the package "org.eclipse.cdt.debug.core"
- *
- * @author Judy N. Green
- * @since Jul 19, 2002
- */
-public class AllDebugTests extends TestSuite {
-
- public static Test suite() {
- TestSuite suite = new AllDebugTests();
-
- // Just add more test cases here as you create them for
- // each class being tested
-
- suite.addTest(DebugTests.suite());
- suite.addTest(BreakpointTests.suite());
- suite.addTest(LocationTests.suite());
- suite.addTest(EventBreakpointTests.suite());
- return suite;
- }
-} // End of AllDebugTests.java
-
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
deleted file mode 100644
index d7acdc6bded..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
+++ /dev/null
@@ -1,616 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.IOException;
-import java.math.BigInteger;
-
-import junit.framework.Test;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDICondition;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the CDI break point interfaces.
- * It will currenly use the mi implementation.
- *
- */
-public class BreakpointTests extends AbstractDebugTest {
-
-
- public static Test suite() {
- return new DebugTestWrapper(BreakpointTests.class) {};
- }
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- createDebugSession();
- assertNotNull(currentTarget);
- currentTarget.deleteAllBreakpoints();
- pause();
- }
- @Override
- protected void tearDown() throws Exception {
- /* clean up the session */
- targets[0].terminate();
- int x = 0;
- while ((!targets[0].isTerminated()) && (x < 30)) {
- Thread.sleep(100);
- }
- if (!targets[0].isTerminated())
- targets[0].terminate();
- super.tearDown();
- }
-
-
- /***************************************************************************
- * A couple tests to make sure setting breakpoints on functions works as
- * expected.
- */
- public void testFunctionBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
-
- ICDITarget cdiTarget = currentTarget;
- ICDIFunctionLocation location;
- boolean caught = false;
-
-
- /***********************************************************************
- * Create a break point on a generic function
- **********************************************************************/
-
- location = cdiTarget.createFunctionLocation(null, "func1"); //$NON-NLS-1$
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
-
- /***********************************************************************
- * Create a break point on main
- **********************************************************************/
-
- location = cdiTarget.createFunctionLocation(null, "main"); //$NON-NLS-1$
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
-
- /***********************************************************************
- * Try to create a break point on a function name that does not exist We
- * expect that this will cause the setLocationBreakpoint to throw a
- * CDIException
- **********************************************************************/
-
- location = cdiTarget.createFunctionLocation(null, "badname"); //$NON-NLS-1$
- assertNotNull(location);
- try {
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
- } catch (CDIException e) {
- caught = true;
- }
- assertTrue(caught);
-
- cdiTarget.deleteAllBreakpoints();
-
- /***********************************************************************
- * Create a break point on a generic function and see if it will get hit
- * and stop program execution.
- **********************************************************************/
-
- location = cdiTarget.createFunctionLocation(null, "func1"); //$NON-NLS-1$
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
- targets = session.getTargets();
- /*
- * We better only have one target connected to this session or something
- * is not right...
- */
- assertTrue(targets.length == 1);
- /*
- * Resume the target, this should cause it to run till it hits the
- * breakpoint
- */
- resumeCurrentTarget();
- /**
- * Give the process up to 10 seconds to become either terminated or
- * suspended. It sould hit the breakponint almost immediatly so we
- * should only sleep for max 100 ms
- */
- waitSuspend(cdiTarget);
- ICDILocator locator = getCurrentLocator();
- assertTrue(locator.getLineNumber() == 6);
- assertTrue(locator.getFunction().equals("func1")); //$NON-NLS-1$
- assertTrue(locator.getFile().endsWith("main.c")); //$NON-NLS-1$
- }
-
- /***************************************************************************
- * A couple tests to make sure setting breakpoints on line numbers works as
- * expected.
- */
- public void testLineBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
- ICDITarget cdiTarget = currentTarget;
- ICDILineLocation location;
- boolean caught = false;
-
-
- /***********************************************************************
- * Create a break point in a generic function
- **********************************************************************/
- location = cdiTarget.createLineLocation("main.c", 7);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
-
- /***********************************************************************
- * Create a break point in main
- **********************************************************************/
- location = cdiTarget.createLineLocation("main.c", 18);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
-
- /***********************************************************************
- * Try to create a break point on a line that does not exist We expect
- * that this will cause the setLocationBreakpoint to throw a
- * CDIException
- **********************************************************************/
-
- location = cdiTarget.createLineLocation("main.c", 30);
- assertNotNull(location);
- try {
- cdiTarget.setLineBreakpoint(0, location, null, false);
- } catch (CDIException e) {
- caught = true;
- }
- assertTrue(caught);
-
- caught = false;
- /***********************************************************************
- * Try to create a break point on a line that does not have code on it
- **********************************************************************/
-
- location = cdiTarget.createLineLocation("main.c", 11);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
-
- /***********************************************************************
- * Create a break point in a generic function without passing the source
- * file name. At the time of writing this would just silently fail, so
- * to make sure it works, we will do it once with a valid line number
- * and once with an invalid line number, and the first should always
- * succeed and the second should always throw an exception.
- **********************************************************************/
- location = cdiTarget.createLineLocation(null, 7);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
- caught = false;
- location = cdiTarget.createLineLocation(null, 30);
- assertNotNull(location);
- try {
- cdiTarget.setLineBreakpoint(0, location, null, false);
- } catch (CDIException e) {
- caught = true;
- }
- assertTrue("Ignoring line numbers with no file specified?", caught);
-
- cdiTarget.deleteAllBreakpoints();
-
- /***********************************************************************
- * Create a break point on a line number and see if it will get hit and
- * stop program execution.
- **********************************************************************/
-
- location = cdiTarget.createLineLocation(null, 7);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
- targets = session.getTargets();
- /*
- * We better only have one target connected to this session or something
- * is not right...
- */
- assertTrue(targets.length == 1);
- /*
- * Resume the target, this should cause it to run till it hits the
- * breakpoint
- */
- targets[0].resume();
- /**
- * Give the process up to 10 seconds to become either terminated or
- * suspended. It sould hit the breakponint almost immediatly so we
- * should only sleep for max 100 ms
- */
- for (int x = 0; x < 100; x++) {
- if (targets[0].isSuspended() || targets[0].isTerminated())
- break;
- Thread.sleep(100);
- }
- assertTrue("Suspended: " + targets[0].isSuspended() + " Termiunated: " + targets[0].isTerminated(), targets[0]
- .isSuspended());
- ICDILocator locator = getCurrentLocator();
- assertTrue(locator.getLineNumber() == 7);
- assertTrue(locator.getFunction().equals("func1"));
- assertTrue(locator.getFile().endsWith("main.c"));
-
- }
-
- /***************************************************************************
- * A couple tests to make sure getting breakpoints works as expected
- */
- public void testGetBreak() throws CoreException, MIException, IOException, CDIException {
- ICDITarget cdiTarget = currentTarget;
- ICDIFunctionLocation location;
- ICDIBreakpoint[] breakpoints;
- ICDILocationBreakpoint curbreak;
-
-
- /***********************************************************************
- * Make sure initially we don't have any breakpoints
- **********************************************************************/
- breakpoints = cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length == 0);
-
- /***********************************************************************
- * Make sure if we create a simple breakpoint, that we can get it back
- * from the system
- **********************************************************************/
- /* Create a break point on a generic function */
- location = cdiTarget.createFunctionLocation("main.c", "func1");
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
-
- breakpoints = cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length == 1);
- if (breakpoints[0] instanceof ICDILocationBreakpoint) {
- curbreak = (ICDILocationBreakpoint) breakpoints[0];
- } else
- curbreak = null;
- assertNotNull(curbreak);
-
- //assertTrue(curbreak.getLocator().equals(location));
- {
- ICDILocator locator = curbreak.getLocator();
- String file = locator.getFile();
- String function = locator.getFunction();
- assertTrue("main.c".equals(file));
- assertTrue("func1".equals(function));
- }
-
- /***********************************************************************
- * Make sure if we create multiple break points that we can still get
- * them all back from the system,
- **********************************************************************/
- /* Create another break point on main */
- location = cdiTarget.createFunctionLocation("main.c", "main");
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
-
- breakpoints = cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length == 2);
- if (breakpoints[1] instanceof ICDILocationBreakpoint) {
- curbreak = (ICDILocationBreakpoint) breakpoints[1];
- } else
- curbreak = null;
- assertNotNull(curbreak);
- /*
- * Make sure the location still looks like we expect it to.. .
- */
- //assertTrue(curbreak.getLocation().equals(location));
- {
- ICDILocator locator = curbreak.getLocator();
- String file = locator.getFile();
- String function = locator.getFunction();
- assertTrue("main.c".equals(file));
- assertTrue("main".equals(function));
- }
-
- cdiTarget.deleteAllBreakpoints();
-
-
- }
-
- /***************************************************************************
- * A couple tests to make sure deleting breakpoints works as expected
- */
- public void testDelBreak() throws CoreException, MIException, IOException, CDIException {
- ICDITarget cdiTarget = currentTarget;
- ICDIFunctionLocation location;
- ICDILocator savedLocation;
- ICDIBreakpoint[] breakpoints, savedbreakpoints;
- ICDILocationBreakpoint curbreak;
-
- /* Make sure initially we don't have any breakpoints */
- breakpoints = cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length == 0);
-
- /***********************************************************************
- *
- * Test to make sure if we create a new breakpoint, we can delete it by
- * passing a refrence to it to deleteBreakpoint()
- *
- **********************************************************************/
-
- /* Create a break point on a generic function */
- location = cdiTarget.createFunctionLocation("main.c", "func1");
- assertNotNull(location);
- curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
- cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
- pause();
- /**
- * we should not have any breakpoints left.
- */
- breakpoints = cdiTarget.getBreakpoints();
- assertTrue(breakpoints.length == 0);
-
- /***********************************************************************
- *
- * Test to make sure if we create multiple new breakpoint, we can delete
- * one of them by passing a refrence to it to deleteBreakpoint()
- *
- **********************************************************************/
-
- /* Create a break point on a generic function */
- location = cdiTarget.createFunctionLocation("main.c", "func1");
- assertNotNull(location);
- curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
- savedLocation = curbreak.getLocator();
-
- location = cdiTarget.createFunctionLocation("main.c", "main");
- assertNotNull(location);
- curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
- cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
- pause();
- breakpoints = cdiTarget.getBreakpoints();
- /***********************************************************************
- * Make sure there is only 1 breakpoint left, and it's the one we expect
- */
- assertTrue(breakpoints.length == 1);
- curbreak = (ICDILocationBreakpoint) breakpoints[0];
- assertNotNull(curbreak);
- assertTrue(curbreak.getLocator().equals(savedLocation));
- /***********************************************************************
- * Then delete the other breakpoint.
- */
- cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
- pause();
- breakpoints = cdiTarget.getBreakpoints();
- assertTrue(breakpoints.length == 0);
-
- /***********************************************************************
- * Make sure deleteBreakpoints works when given 1 breakpoint to delete
- **********************************************************************/
- savedbreakpoints = new ICDIBreakpoint[1];
- int lineStart = 6;
- int maxBreakpoints = 5;
- for (int x = 0; x < maxBreakpoints; x++) {
- ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + lineStart);
- ICDILocationBreakpoint bp = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
- assertNotNull(bp);
- assertEquals(x + lineStart, (bp.getLocator().getLineNumber()));
- savedbreakpoints[0] = bp;
- }
- cdiTarget.deleteBreakpoints(savedbreakpoints);
- pause();
- /* We should now have N-1 breakpoints left. */
- breakpoints = cdiTarget.getBreakpoints();
- assertTrue(breakpoints.length == maxBreakpoints-1);
- /* Make sure we have the correct N-1 breakpoints left, we deleted one at line N */
- for (int x = 0; x < breakpoints.length; x++) {
- curbreak = (ICDILocationBreakpoint) breakpoints[x];
- assertNotEquals(((ICDILocationBreakpoint)savedbreakpoints[0]).getLocator().getLineNumber(), curbreak.getLocator().getLineNumber());
- }
- cdiTarget.deleteAllBreakpoints();
- pause();
- assertTrue(cdiTarget.getBreakpoints().length == 0);
-
- /***********************************************************************
- * Make sure deleteBreakpoints works when given more then 1 but less
- * then all breakpoints to delete
- **********************************************************************/
- savedbreakpoints = new ICDIBreakpoint[2];
- for (int x = 0; x < maxBreakpoints; x++) {
- ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + lineStart);
- savedbreakpoints[x % 2] = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
- assertNotNull(savedbreakpoints[x % 2]);
- }
- cdiTarget.deleteBreakpoints(savedbreakpoints);
- pause();
-
- /* We should now have maxBreakpoints-2 breakpoints left. */
- breakpoints = cdiTarget.getBreakpoints();
- assertEquals(maxBreakpoints-2, breakpoints.length );
- /* Make sure we have the correct 6 breakpoints left */
- for (int x = 0; x < breakpoints.length; x++) {
- curbreak = (ICDILocationBreakpoint) breakpoints[x];
- assertEquals(x+lineStart, curbreak.getLocator().getLineNumber());
- }
- cdiTarget.deleteAllBreakpoints();
- pause();
- assertTrue(cdiTarget.getBreakpoints().length == 0);
-
- /***********************************************************************
- * Make sure deleteBreakpoints works when given all the breakpoints
- **********************************************************************/
- savedbreakpoints = new ICDIBreakpoint[maxBreakpoints];
- for (int x = 0; x < maxBreakpoints; x++) {
- ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + lineStart);
- savedbreakpoints[x] = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
- assertNotNull(savedbreakpoints[x]);
- }
- cdiTarget.deleteBreakpoints(savedbreakpoints);
- pause();
- /* We should now have 0 breakpoints left. */
- breakpoints = cdiTarget.getBreakpoints();
- assertTrue(breakpoints.length == 0);
-
- /***********************************************************************
- * Make sure deleteAllBreakpoints works
- **********************************************************************/
-
- for (int x = 0; x < maxBreakpoints; x++) {
- ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + lineStart);
- curbreak = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
- assertNotNull(curbreak);
- }
- cdiTarget.deleteAllBreakpoints();
- pause();
- /* We should now have 0 breakpoints left. */
- breakpoints = cdiTarget.getBreakpoints();
- assertTrue(breakpoints.length == 0);
-
- }
-
- private void assertNotEquals(int notExpected, int actual) {
- if (notExpected==actual)
- fail("not expected:<"+actual+">");
-
- }
- /***************************************************************************
- * A couple tests to make sure setting breakpoints with conditions seems to
- * work as expected.
- */
- public void testCondBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
- boolean caught = false;
- ICDITarget cdiTarget = currentTarget;
- ICDICondition cond;
-
- /***********************************************************************
- * Create a break point on a line number with a condition and make sure
- * it does not suspend execution of the application until the condition
- * is true
- **********************************************************************/
- cdiTarget.deleteAllBreakpoints();
- pause();
- ICDILineLocation lineLocation = cdiTarget.createLineLocation(null, 23);
- assertNotNull(lineLocation);
- cond = cdiTarget.createCondition(0, "a>10");
- cdiTarget.setLineBreakpoint(0, lineLocation, cond, false);
- pause();
- resumeCurrentTarget();
- /**
- * Give the process up to 10 seconds to become either terminated or
- * suspended. It sould hit the breakponint almost immediatly so we
- * should only sleep for max 100 ms
- */
- waitSuspend(cdiTarget);
- ICDIStackFrame frame = getCurrentFrame();
- ICDILocator locator = getCurrentLocator();
- assertTrue(locator.getLineNumber() == 23);
- assertTrue(locator.getFunction().equals("main"));
- assertTrue(locator.getFile().endsWith("main.c"));
- /* Get the value of a and and make sure it is 11 */
- assertTrue(targets[0].evaluateExpressionToString(frame, "a"), targets[0].evaluateExpressionToString(frame, "a").equals("11"));
-
- }
- public void testCondBreak2() throws CoreException, MIException, IOException, CDIException, InterruptedException {
-
- ICDITarget cdiTarget = currentTarget;
-
- /***********************************************************************
- * Create a break point on a generic function with an empty condition
- **********************************************************************/
- ICDICondition cond = cdiTarget.createCondition(0, "");
- ICDIFunctionLocation location = cdiTarget.createFunctionLocation(null, "func1");
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, cond, false);
-
- /***********************************************************************
- * Create a break point on a generic function with an valid condition
- **********************************************************************/
- cond = cdiTarget.createCondition(0, "x<10");
- ICDILineLocation location2 = cdiTarget.createLineLocation("main.c", 9);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location2, cond, false);
- }
-
- public void testCondBreakError() {
- ICDITarget cdiTarget = currentTarget;
- ICDICondition cond;
- ICDIFunctionLocation location;
- /***********************************************************************
- * Create a break point on a generic function with an invalid condition
- * We expect to get a CDIException when we try to set the breakpoint.
- **********************************************************************/
- boolean caught = false;
- cond = cdiTarget.createCondition(0, "nonexist<10");
- location = cdiTarget.createFunctionLocation(null, "func1");
- assertNotNull(location);
- try {
- cdiTarget.setFunctionBreakpoint(0, location, cond, false);
- } catch (CDIException e) {
- caught = true;
- }
- assertTrue("Setting wrong condition should fail",caught);
- }
-
- public void testHitCond() throws CoreException, MIException, IOException, CDIException, InterruptedException {
- setBreakOnMain();
- testCondBreak2();
- resumeCurrentTarget();
- waitSuspend(currentTarget);
- }
- public void xfail_testHitCondWithError() throws CoreException, MIException, IOException, CDIException, InterruptedException {
- // this currently fails sometimes - after set bad breakpoint it does not hit any
- // only reproducible when setting invalid condition breakpoint, reason unknown
- setBreakOnMain();
- testCondBreak2();
- testCondBreakError();
- pause();
- /* We should now have 3 breakpoints left. */
- ICDIBreakpoint[] breakpoints = currentTarget.getBreakpoints();
- assertTrue(breakpoints.length == 3);
- resumeCurrentTarget();
- waitSuspend(currentTarget);
- }
- /***************************************************************************
- * A test to make sure setting address breakpoints works as
- * expected.
- */
- public void testAddressBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
-
-
- ICDIAddressLocation location;
- boolean caught = false;
-
- setBreakOnMain();
- currentTarget.resume(false);
- waitSuspend(currentTarget);
- currentTarget.stepOver(1);
- pause();
- BigInteger address = getCurrentLocator().getAddress();
- /***********************************************************************
- * Create a break point on first instruction
- **********************************************************************/
-
- location = currentTarget.createAddressLocation(address);
- assertNotNull(location);
- currentTarget.setAddressBreakpoint(0, location, null, false);
-
- // restart
- currentTarget.restart();
- pause();
- waitSuspend(currentTarget);
-
- ICDILocator locator = getCurrentLocator();
- assertTrue(locator.getLineNumber() == 18);
- assertTrue(locator.getFunction().equals("main")); //$NON-NLS-1$
- assertTrue(locator.getFile().endsWith("main.c")); //$NON-NLS-1$
- }
-
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java
deleted file mode 100644
index 793bcdf43ae..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.testplugin.CDebugHelper;
-import org.eclipse.cdt.debug.testplugin.CProjectHelper;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the debug stuff. It currenly
- * uses the mi debugger.
- *
- */
-public class DebugTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- ICProject testProject;
- NullProgressMonitor monitor;
- ICDISession session;
-
-
- /**
- * Constructor for DebugTests
- * @param name
- */
- public DebugTests(String name) {
- super(name);
- /***
- * The assume that they have a working workspace
- * and workspace root object to use to create projects/files in,
- * so we need to get them setup first.
- */
- workspace= ResourcesPlugin.getWorkspace();
- root= workspace.getRoot();
- monitor = new NullProgressMonitor();
- if (workspace==null)
- fail("Workspace was not setup");
- if (root==null)
- fail("Workspace root was not setup");
-
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- *
- * Example code test the packages in the project
- * "com.qnx.tools.ide.cdt.core"
- */
- @Override
- protected void setUp() throws CoreException, InvocationTargetException, IOException {
- ResourcesPlugin.getWorkspace().getDescription().setAutoBuilding(false);
- /***
- * Create a new project and import the test source.
- */
- IPath importFile = new Path("resources/debugTest.zip");
- testProject=CProjectHelper.createCProjectWithImport("filetest", importFile);
- if (testProject==null)
- fail("Unable to create project");
- /* Build the test project.. */
-
- testProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
-
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @Override
- protected void tearDown() throws CoreException, CDIException {
- if (session!=null) {
- session.terminate();
- session=null;
- }
- CProjectHelper.delete(testProject);
- }
-
- public static TestSuite suite() {
- return new TestSuite(DebugTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
- /***
- * Can we setup a debug?
- * This is sort of a catch all sanity tests to make sure we can create a debug
- * session with a break point and start it without having any exceptions thrown.
- * It's not ment to be a real proper test.
- */
- public void testDebug() throws CoreException, MIException, IOException, CDIException {
- ICDITarget cdiTarget;
- ICDIFunctionLocation location;
-
- session=CDebugHelper.createSession("main",testProject);
- assertNotNull(session);
- ICDITarget[] targets = session.getTargets();
- assertNotNull(targets);
- assertTrue(targets.length > 0);
- cdiTarget = targets[0];
- assertNotNull(cdiTarget);
- location=cdiTarget.createFunctionLocation(null, "func1");
- assertNotNull(location);
- cdiTarget.setFunctionBreakpoint(0, location, null, false);
- cdiTarget.resume();
- session.terminate();
- session=null;
-
- }
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java
deleted file mode 100644
index 1c6120b4ee1..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement3;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.gdb.eventbkpts.IEventBreakpointConstants;
-
-public class EventBreakpointTests extends AbstractDebugTest {
- public static Test suite() {
- return new DebugTestWrapper(EventBreakpointTests.class){};
- }
-
- @Override
- protected String getProjectName() {
- return "catchpoints";
- }
-
- @Override
- protected String getProjectZip() {
- return "resources/debugCxxTest.zip";
- }
-
- @Override
- protected String getProjectBinary() {
- return "catchpoints.exe";
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- createDebugSession();
- assertNotNull(currentTarget);
- currentTarget.deleteAllBreakpoints();
- pause();
- }
-
-
- public void testCatch() throws CModelException, IOException, MIException, CDIException {
- eventbreakpoints(IEventBreakpointConstants.EVENT_TYPE_CATCH, "");
- }
-
- public void testThrow() throws CModelException, IOException, MIException, CDIException {
- eventbreakpoints(IEventBreakpointConstants.EVENT_TYPE_THROW, "");
- }
-
- private void eventbreakpoints(String type, String arg) throws CModelException, IOException, MIException, CDIException {
- ICDIBreakpoint[] breakpoints;
- ICDIEventBreakpoint curbreak;
-
- setBreakOnMain();
- currentTarget.restart();
- waitSuspend(currentTarget);
- ICDILocator locator = getCurrentLocator();
- assertEquals("Debug should be stopped in function 'main' but it is stopped in: " + locator.getFunction(),
- "main", locator.getFunction());
-
- currentTarget.deleteAllBreakpoints();
- pause();
- assertTrue(currentTarget instanceof ICDIBreakpointManagement3);
- ((ICDIBreakpointManagement3) currentTarget).setEventBreakpoint(type, arg, ICBreakpointType.REGULAR, null, false, true);
- pause();
- breakpoints = currentTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertEquals(1, breakpoints.length);
- if (breakpoints[0] instanceof ICDIEventBreakpoint) {
- curbreak = (ICDIEventBreakpoint) breakpoints[0];
- } else
- curbreak = null;
- assertNotNull("Found breakpoint is not an event breakpoint",curbreak);
- currentTarget.resume(false);
- waitSuspend(currentTarget);
- // it is stopped we are fine, it did hit breakpoint
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java
deleted file mode 100644
index 5eb3fa0d70c..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the CDI Location interfaces.
- * It will currenly use the mi implementation.
- *
- */
-public class LocationTests extends AbstractDebugTest {
- public static Test suite() {
- return new DebugTestWrapper(LocationTests.class){};
- }
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- createDebugSession();
- assertNotNull(currentTarget);
- currentTarget.deleteAllBreakpoints();
- pause();
- }
-
- /***
- * A couple tests to make sure comparing Locations works as expected.
- */
- public void testIsEquals() throws CoreException, MIException, IOException, CDIException {
- ICDITarget cdiTarget = currentTarget;
- ICDILineLocation lineLocation, lineLocation2;
- ICDIFunctionLocation functionLocation, functionLocation2;
- ICDIBreakpoint[] breakpoints;
- ICDILocationBreakpoint curbreak;
-
-
- /**********************************************************************
- * Simple test.. this should work.
- **********************************************************************/
- functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
- functionLocation2=cdiTarget.createFunctionLocation("main.c", "func1");
- assertTrue(functionLocation.equals(functionLocation2));
- /**********************************************************************
- * Simple test.. this should work.
- **********************************************************************/
- lineLocation=cdiTarget.createLineLocation("main.c", 10);
- lineLocation2=cdiTarget.createLineLocation("main.c", 10);
- assertTrue(lineLocation.equals(lineLocation2));
-
- /**********************************************************************
- * make sure that the location returned from getLocation on the
- * ICDILocationBreakpoint.getLocation that is returned from
- * setLocationBreakpoint is the same as the breakpoint returned from
- * BreakpointManager.getBreakpoints.getLocation()
- **********************************************************************/
- functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
- assertNotNull(functionLocation);
- functionLocation2=cdiTarget.setFunctionBreakpoint(0, functionLocation, null, false).getLocator();
-
- breakpoints=cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length==1);
- if (breakpoints[0] instanceof ICDILocationBreakpoint) {
- curbreak=(ICDILocationBreakpoint) breakpoints[0];
- } else
- curbreak=null;
- assertNotNull(curbreak);
-
- assertTrue(curbreak.getLocator().equals(functionLocation2));
- cdiTarget.deleteAllBreakpoints();
- pause();
- /* Create a break point on a generic function with a file name that
- * gdb will change to the relitive path of the source file. This
- * should work, but at the time of writing (Sept 25, 2002) does not.
- */
- functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
- assertNotNull(functionLocation);
- cdiTarget.setFunctionBreakpoint(0, functionLocation, null, false);
-
- breakpoints=cdiTarget.getBreakpoints();
- assertNotNull(breakpoints);
- assertTrue(breakpoints.length==1);
- if (breakpoints[0] instanceof ICDILocationBreakpoint) {
- curbreak=(ICDILocationBreakpoint) breakpoints[0];
- } else
- curbreak=null;
- assertNotNull(curbreak);
-
- assertTrue("PR:23879",curbreak.getLocator().equals(functionLocation));
-
- }
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/MapEntrySourceContainerTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/MapEntrySourceContainerTests.java
deleted file mode 100644
index 10144aa170d..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/MapEntrySourceContainerTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.debug.internal.core.sourcelookup.MapEntrySourceContainer;
-import org.eclipse.core.runtime.IPath;
-
-@SuppressWarnings("restriction")
-public class MapEntrySourceContainerTests extends TestCase {
-
- public static Test suite() {
- return new TestSuite(MapEntrySourceContainerTests.class);
- }
-
- public MapEntrySourceContainerTests(String name) {
- super(name);
- }
-
- public void testUNCPath() {
- String uncPath = "//server/path/on/server";
- IPath path = MapEntrySourceContainer.createPath(uncPath);
- assertEquals(uncPath, path.toString());
-
- uncPath = "\\\\server\\path\\on\\server";
- path = MapEntrySourceContainer.createPath(uncPath);
- assertEquals(uncPath, path.toOSString());
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/ProjectWithSpaceTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/ProjectWithSpaceTests.java
deleted file mode 100644
index 8db0d548a51..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/ProjectWithSpaceTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
-import org.eclipse.cdt.debug.core.cdi.ICDILocator;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Create a project with space and do sanity test for debugger
- */
-public class ProjectWithSpaceTests extends AbstractDebugTest {
- public static Test suite() {
- return new DebugTestWrapper(ProjectWithSpaceTests.class) {
- };
- }
-
- @Override
- protected String getProjectName() {
- return "with space";
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- createDebugSession();
- assertNotNull(currentTarget);
- currentTarget.deleteAllBreakpoints();
- pause();
- }
-
- @Override
- protected void tearDown() throws Exception {
- /* clean up the session */
- targets[0].terminate();
- int x = 0;
- while ((!targets[0].isTerminated()) && (x < 30)) {
- Thread.sleep(100);
- }
- if (!targets[0].isTerminated())
- targets[0].terminate();
- super.tearDown();
- }
-
- /**
- * Basic sanity test
- */
- public void testLineBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
- ICDITarget cdiTarget = currentTarget;
- ICDILineLocation location;
- boolean caught = false;
- /***********************************************************************
- * Create a break point in a generic function
- **********************************************************************/
- location = cdiTarget.createLineLocation("main.c", 7);
- assertNotNull(location);
- cdiTarget.setLineBreakpoint(0, location, null, false);
-
- targets = session.getTargets();
- /*
- * We better only have one target connected to this session or something
- * is not right...
- */
- assertTrue(targets.length == 1);
- /*
- * Resume the target, this should cause it to run till it hits the
- * breakpoint
- */
- ICDITarget target = targets[0];
- target.resume(false);
- /**
- * Give the process up to 10 seconds to become either terminated or
- * suspended. It sould hit the breakponint almost immediatly so we
- * should only sleep for max 100 ms
- */
- for (int x = 0; x < 100; x++) {
- if (target.isSuspended() || target.isTerminated())
- break;
- Thread.sleep(100);
- }
- assertTrue("Suspended: " + target.isSuspended() + " Terminated: " + target.isTerminated(),
- target.isSuspended());
- ICDILocator locator = getCurrentLocator();
- assertTrue(locator.getLineNumber() == 7);
- assertTrue(locator.getFunction().equals("func1"));
- assertTrue(locator.getFile().endsWith("main.c"));
- }
-}
\ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java
deleted file mode 100644
index a18ecb7731e..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.core.tests;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.debug.testplugin.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.cdt.debug.mi.core.*;
-import org.eclipse.cdt.debug.core.cdi.*;
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the CDI Target interfaces.
- * It will currenly use the mi implementation.
- *
- */
-public class TargetTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- ICProject testProject;
- NullProgressMonitor monitor;
-
-
- /**
- * Constructor for TargetTests
- * @param name
- */
- public TargetTests(String name) {
- super(name);
- /***
- * The assume that they have a working workspace
- * and workspace root object to use to create projects/files in,
- * so we need to get them setup first.
- */
- workspace= ResourcesPlugin.getWorkspace();
- root= workspace.getRoot();
- monitor = new NullProgressMonitor();
- if (workspace==null)
- fail("Workspace was not setup");
- if (root==null)
- fail("Workspace root was not setup");
-
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- *
- * Example code test the packages in the project
- * "com.qnx.tools.ide.cdt.core"
- */
- @Override
- protected void setUp() throws CoreException,FileNotFoundException {
-
- /***
- * Setup the various files, paths and projects that are needed by the
- * tests
- */
- testProject=CProjectHelper.createCProject("filetest");
- if (testProject==null)
- fail("Unable to create project");
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @Override
- protected void tearDown() throws CoreException {
- CProjectHelper.delete(testProject);
- }
-
- public static TestSuite suite() {
- return new TestSuite(TargetTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
- /***
- * A couple tests to make sure various evaluations work as expected
- */
- public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException {
-
- /***
- * Tests to come
- */
-
- }
-
-
-}
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/pom.xml b/debug/org.eclipse.cdt.debug.ui.tests/pom.xml
deleted file mode 100644
index 2c49f49ccaa..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.cdt
- cdt-parent
- 9.0.0-SNAPSHOT
- ../../pom.xml
-
-
- 6.0.0-SNAPSHOT
- org.eclipse.cdt.debug.ui.tests
- eclipse-test-plugin
-
-
-
-
- org.eclipse.tycho
- tycho-surefire-plugin
- ${tycho-version}
-
- true
- ${tycho.testArgLine} ${base.ui.test.vmargs}
-
- **/AllDebugTests.*
-
- true
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip b/debug/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip
deleted file mode 100644
index d29256144f7081f2ed29dec99ed83e6a9d7649de..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 3550
zcma)(Q*+{qL;xCy^Jo5P7ozZbgt2Rlo36HF!7UMhD7rQIpo&t}N#HYg2~{UYWi*^eI$PU@
zJ`@EnA9i45ha+L3T!)8YJ|7Cy9c+7eqn}GBt;dclT%TOs!4gY|H=ZsZr~lbT1Y+2G
zKwBDgEu&Pt+JKkr_s)YYp*y7^ORuY>xYS`mC%=Fx)7-)D$s^x?-a)59)
z_W}H!sx;0TmwE9aQdq}u1EnfEHdbcg8NWxYoCp5LoPo0-Xl~V(u^n5-R5O!@iWM|e
zqW(NfCM|D0Jn$=)D%JntLQAeyqf4p!#u|Y@UO-Nu*h@3YC^g>dk0P!Y)Fy^$pqr6<
zY%`vZ6pZE&=lmr(9bAm;rzs+OTn2>?N`2(xnaBBlVMVCKe$d+uI<*E({@N)4EN7jk
z(QSeVbDAjF*cs(75r#DLs$-`)#ZyDq4Xxxc4Evg3@yCtQjtkMe_GaXJ{4)5w7_SB=
zV|m^|Jou47DE~YP-rzf{hCfKqHPuLajj5jJ{JD
zydv=z(ZyZ-Co!f5)HJ(|cX+2sNl5;DbV_XYQ`cb4A(4RR+nIEN!$QU!At8@}
zF))Iv@#Dp~ffPV#_SeD2K+N~8$^z;!S
zY8Jk5r7*Alv>?%tq=3VPeyodV!S(G}W+n4L$?{J}`}f~L^_Ti~VX35NOE&6VYW3&+
zrw#IIs3;ja@K?%>V$wQ?g#i;yQR9X4yJneL
zp?Cg!(gBYlu;h^HAdWngT(A+atw>eP3`KFY@O6Sci)s`qy%f?cLyu
z$<`G}h17*nQ}gva-2`M4h=?P{j2l6~5Ainps6^T|>AB4VR2xr-3-LoddhBE=7L1=T
zvQLz6FYGNhfI{4@Fx@C91wF?4uzKe-G-aGsG9g|uQ%K1C&I9!x+5#s3!caV
z2NQaV;lL7BCF*y{q~qW6@i*AMa^OxVbtNH_!jI%e?#zA7**yq*wK+KPXg2t%1GC#^
zlP6o)Lsr+ghOhbVc=x)`F8B9>${0Pl&O>Y|4s7KlgZQl^f6eHeuc2=ABa4qV)^TrI
znd+?vIt*FxmI9ux_P%+7_N+DFp03nTh?%RV7uTk}=Gi|6iTc5f+1*KgK78mpsOO1;
zfA51yVRP_pK(yrjU&1_}XOV6gU&azhUGT`q;AC*n(Q~g2%Zvb|o3{AcdNOwsqYiyq
z-xU8!a{spvo-1Qw!KZ)-JrvOs{%0?aDpObM3Cqq;(Ju%@*bChE3bi@<7Fers%jMIwF@QfV*AjCWICQiFk;Cae-3eruD5Vf>HNd_H!5*fFM~)rb;d6BN!Ywj&CMVH993MQs9Yx;^f+F1QX0
z{ql73V#Xlm{gI=$m2i!lemTjg_b2E&B?(UIVsahY9XNE?6UfVuSWUg?87$p%e*K8M
zRJ}`&4omNLiyjF(n|3U!wf!dYg1f8c9osZVqNKq3BWiF!@EPC4p}q_!aFai?eQ}3`
z#W~cothH))jp4$RSNa<7+TgZBY@T-obHB?V5AZ1fn>CX8mha2r)?FQWZ&kW|wWIjh
z2t%U_4YFe~Q2Ml{9D-!!S+D`^hpw3cz5@g?kD+cVw09X$^YnGa5Mh>rnL5t)4a(;y
z)jGkKaM)z*d02|X53H{1#!y#(|L7&yHPh~$Fq?T2N*gKcut)Z4u3X^BV5*`zBPXMS
zHRY5Tzp1+4bO`q3U?nqVs%vWqVzk~8buY=}2epn=Td!)P)w^>P?D>n5C1IKDvn_7H
z2TkGREB=cMd0|c&OQe*pF?MaeT!qXhoV<`}Vf$$}s0689*?21X2gLVczsA0=xuKFD
zE&iasZAh*M%$EYi$<(%@5vc_|>Z~Y_WGCbjLpCNc-s(6`K9!n1o8pZr>jM)~d83=`
zGx^^6Gdq-~*3%rClNKfBWXbz50^POoyFdOEe^?j(9#9h#nM89eJ&b(HU7*qW;QWdNq`%ur7pkHR|8QuyvFt{e~@F+nSSp+5~1TRz80DnZq;rF0FOX##DM9Z^Hk
z;ryDidjU7&ETtB2JJuaJOenqWta=&oqDpW7uD&bdK)hA&Oh?esg1#rr{FBscd}UUH
zey6K->aGgyVl&_+D@%Ej-Z3xBqA)C<(pX;GlHGiA!cQDs(yTbmGB1*MN-wZ@q_`5D
zo4JDnl$VLqwj$Iur507%rk?LAyt~Gxp_Ai^2~R5a|75pODcU2vV>Bo0n*6vit;)aT
z#YHso&7%E6mMKShUL;1=kW#~*P}Jf-#1^1;8n#v_Sbt|<>I+VJU($C`pDfgpGbu@b
zEclZ~$RcH*D>qu#%+TlQF`93|#*%AF-bTq#TRYL&g6n)Y>mk!ly>c{l+{tvrp>bA0
zPv16h^Ka@7wiK_Bz1*xs@8mz#e=eIoN%LxM$h+W$)fJ&LzY_}i4?letGg3
z3+vZ7#y-|b++vq`6t@o>{ny8)ZXF=^VP_Hpo@pj7+Dp)Ho9ew(SKuTR4Jo%+95)yX
z*0#5KmE?oGZjs{pg#y}htA>@tkMQeJ+k*_4t0
zm#AaA6m>y?P#LImFx1l@=H(Y0bgA+Do3rnkU}WhNM@L%yv2LF6f&*S#B1X%7DMHE6
zTpOR7+bO&{&oxfA2Y4)W?bgjt_gC?wM(wX%>Jf2Ps)DBzRO#-w2AovuBH5}*PKGrr
z9o2IcYh2@d#RPdZO5gEQs|no@U@NrVi)+5uUoOYp_Sfn*mBYtZB-?RzOj8)=mo}Jr
z(a3`EK(wQLeK&F*H7gXX01}y4HePi-V~KjDp85p{`e9qEAI|miV955+ERVM6*>@-K
z^g%_QK^HUk<82$UMZx!D3pZ*l25+aB3%|AT`HY6z+VG1-q2WCy1sIGOv&v{0^|A`W
zzu_}Wpa>IF^PPIwRo=ASicN@@Sz#u-${Q&eJIUX@(eFa}syF)Y_ODLq-=lu7#FdEt
q+ZZnI_%BKQ?_s|`pxiuz^5Zxyrxhr(3gvP93@s
z(77tn@j|20wo|?94_?`*{5xn?eg9jvOzzf|%sxB&pWplZb4|~&+fI{sCA7DAy$Cf~
zz!I`-XF#RX^YfYi+xqhL_1%(BEYZ;YV%%3<_o8BcSwr`9xBbp-E+1O5CcFE3J_!mu
zc`~KnzH0B(2{$gTmA|pW`s+>i8CQO`2Xx>3qT_s}^5lnHdzZ)m
zmo~<$`)5|!{yA^`*#PPXTHB^wATX_3;o^M@rIeRSxx_($#56_){)ojd-cKg
zeQax{&0ba*7J0>W_mk$l*xWn!BKQ1PwEQj{;LXmlbWQY|Fh&N37c2}60XU9*~{M+zA~i+@;rOp*5jX^r+2O
zb4K?QHcW>yRw^j1?Bn{A!|&8&|F5|84zRBh6b0}|{$@nbz%ngPQ
zQ-nF!c@@kTJ^X=W=(mQu!k~Qp>pA5MvohO0Y;*Dp
z&;Mk*i?vhx*~Wz@<+ePZ%G;1DqN8xQEi>OCsORO6k0vjhO6M>ic=XG*|E}K@v8S@%
zb$>qzYkKtTiA!O&+I)kh*IA1Bj09~K|4i?DU9KP&BA8e{`|hTyAIW9c7WXcZnzP#P
z$9K^irV19DAI;prr+IL}J!iZ9hMHCSN3ZE=8ZG(KJcIX3z+O(V%{v%hZqXu+=5U`VR$K&WYPwHb4A-==Q&{>UXZ}=i2r#Ls_vP+~vET|Em6Vw=0(Q
zv&@?LqqZwyG4EE>E9vP!{)Mmjnf+B9l+uLa#PS&jo_3u
z3LA_s_c+?ho=Lj>^8yjux$x*RYo;m=0CiP@=XnK`N6XHIT>^z@OB
zzhBq|-|!1(!%z60Im0Ymb#hP4o|u!CD?2L{M0aUPIqsV!Alab>G?bk~dRhvDKF|_t
zAP(?mWD;RO6rRZW7*u$o0;Hl8T_bX|fU-FP^aK3@%k=2Fko^maG6eX^42wW?J;=^S
dwdoqL@PUO(fHy1HKo$lThMPcRtyw{40|2J*b3Fh6
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java b/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java
deleted file mode 100644
index 8a64105c348..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.testplugin;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
-import org.eclipse.cdt.debug.mi.core.command.MIVersion;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-
-
-/**
- * Helper methods to set up a Debug session.
- */
-public class CDebugHelper {
-
-
-
- /**
- * Creates a ICDISession.
- */
- public static ICDISession createSession(String exe) throws IOException, MIException {
- MIPlugin mi;
- ICDISession session;
- String os = System.getProperty("os.name");
- String exename;
- mi=MIPlugin.getDefault();
-
- exename=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.debug.ui.tests").find(new Path("/")).getFile();
- exename+="core/org/eclipse/cdt/debug/core/tests/resources/";
- os=os.toLowerCase();
- /* We need to get the correct executable to execute
- */
- if (os.indexOf("windows")!=-1)
- exename+="win/"+ exe +".exe";
- else if (os.indexOf("qnx")!=-1)
- exename+="qnx/" + exe;
- else if (os.indexOf("linux")!=-1)
- exename+="linux/"+exe;
- else if (os.indexOf("sol")!=-1)
- exename+="sol/" + exe;
- else
- return(null);
- session=mi.createCSession(null, MIVersion.MI1, new File(exename), new File("."), null, null);
- return(session);
- }
- /**
- * Creates a ICDISession.
- */
- public static ICDISession createSession(String exe, ICProject project) throws IOException, MIException, CModelException {
- MIPlugin mi;
- String workspacePath= Platform.getLocation().toOSString();
- ICDISession session;
- mi=MIPlugin.getDefault();
-
- try {
- project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
- IBinary bins[] = project.getBinaryContainer().getBinaries();
- if (bins.length!=1) {
- //SHOULD NOT HAPPEN
- return(null);
- }
-
- session=mi.createCSession(null, MIVersion.MI1, new File(workspacePath +bins[0].getPath().toOSString()), new File("."), null, null);
- return(session);
- }
-
-
-}
-
diff --git a/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java b/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java
deleted file mode 100644
index 2f3e5a8d5e4..00000000000
--- a/debug/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.testplugin;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.zip.ZipFile;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.CProjectNature;
-import org.eclipse.cdt.core.ICDescriptor;
-import org.eclipse.cdt.core.ICDescriptorOperation;
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.IArchive;
-import org.eclipse.cdt.core.model.IArchiveContainer;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.cdt.core.model.IBinaryContainer;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-/**
- * Helper methods to set up a ICProject.
- */
-public class CProjectHelper {
- /**
- * Creates a ICProject.
- */
- public static ICProject createCProjectWithImport(String projectName, IPath zipFile) throws CoreException, InvocationTargetException, IOException {
- IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- IProject project= root.getProject(projectName);
- if (!project.exists()) {
- project.create(null);
- } else {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- if (!project.isOpen()) {
- project.open(null);
- }
- File zip = CTestPlugin.getDefault().getFileInPlugin(zipFile);
- importFilesFromZip(new ZipFile(zip),project.getFullPath(),null);
-
- if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
- addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
- }
-
- ICProject cproject = CCorePlugin.getDefault().getCoreModel().create(project);
- /* Try to guess at the correct binary parser.. elf or pe at this point.. */
- ICDescriptorOperation op = new ICDescriptorOperation() {
-
- @Override
- public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
- descriptor.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
- String os = System.getProperty("os.name");
- boolean pe=(os.toLowerCase().indexOf("windows")!=-1);
- descriptor.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, pe?"org.eclipse.cdt.core.PE":"org.eclipse.cdt.core.ELF");
- }
- };
- CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(project, op, null);
- return cproject;
- }
-
-
- /**
- * Creates a ICProject.
- */
- public static ICProject createCProject(String projectName) throws CoreException {
- IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- IProject project= root.getProject(projectName);
- if (!project.exists()) {
- project.create(null);
- } else {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- if (!project.isOpen()) {
- project.open(null);
- }
-
- if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
- addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
- }
-
- ICProject cproject = CCorePlugin.getDefault().getCoreModel().create(project);
-
- return cproject;
- }
-
- /**
- * Removes a ICProject.
- */
- public static void delete(ICProject cproject) throws CoreException {
- cproject.getProject().delete(true, true, null);
- }
-
-
-
- /**
- * Attempts to find an archive with the given name in the workspace
- */
- public static IArchive findArchive(ICProject testProject,String name) throws CModelException {
- int x;
- IArchive[] myArchives;
- IArchiveContainer archCont;
- archCont=testProject.getArchiveContainer();
- myArchives=archCont.getArchives();
- if (myArchives.length<1)
- return(null);
- for (x=0;x
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
index 2f0121e15aa..cb17d044763 100644
--- a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.ui; singleton:=true
-Bundle-Version: 7.5.0.qualifier
+Bundle-Version: 8.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.ui.CDebugUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -17,7 +17,6 @@ Export-Package:
org.eclipse.cdt.debug.internal.ui.disassembly.commands;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.disassembly.dsf;x-friends:="org.eclipse.cdt.dsf.ui",
org.eclipse.cdt.debug.internal.ui.disassembly.editor;x-internal:=true,
- org.eclipse.cdt.debug.internal.ui.disassembly.rendering;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.disassembly.viewer;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.editors;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.elements.adapters;x-internal:=true,
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties
index 322d0a9cbb9..9c798eda526 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties
@@ -29,7 +29,6 @@ CDebuggerPage.name=C Debugger UI Page
MemoryPreferencePage.name=Memory View
CDebugPreferencePage.name=Debug
SourcePreferencePage.name=Source Lookup Path
-DebuggerTypesPreferencePage.name=Debugger Types
BreakpointActionPage.name=Breakpoint Action UI Page
RunMenu.label=&Run
@@ -103,12 +102,6 @@ RestoreDefaultTypeAction.tooltip=Restore Original Type Of Variable
CastToArrayAction.label=Display As Array...
CastToArrayAction.tooltip=Display Variable As Array
-EnableVariablesAction.label=Enable
-EnableVariablesAction.tooltip=Enable Selected Variables
-
-DisableVariablesAction.label=Disable
-DisableVariablesAction.tooltip=Disable Selected Variables
-
DefaultSourceLocator.name=Default C/C++ Source Locator
OldDefaultSourceLocator.name=Default C/C++ Source Locator (old)
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 6e970e573c4..d31bd8b93ae 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -246,11 +246,6 @@
class="org.eclipse.cdt.debug.internal.ui.preferences.SourcePreferencePage"
id="org.eclipse.cdt.debug.ui.SourcePreferencePage">
-
@@ -327,37 +322,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -772,32 +625,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1180,25 +956,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1425,63 +1107,6 @@
type="org.eclipse.debug.ui.actions.IAddMemoryBlocksTarget">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1505,22 +1130,6 @@
point="org.eclipse.core.runtime.preferences">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2167,20 +1671,6 @@
commandId="org.eclipse.cdt.debug.ui.command.resumeWithoutSignal"
helpContextId="resume_without_signal_action_context">
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/debug/org.eclipse.cdt.debug.ui/pom.xml b/debug/org.eclipse.cdt.debug.ui/pom.xml
index a9582cb41c8..4afb7b550ba 100644
--- a/debug/org.eclipse.cdt.debug.ui/pom.xml
+++ b/debug/org.eclipse.cdt.debug.ui/pom.xml
@@ -11,7 +11,7 @@
../../pom.xml
- 7.5.0-SNAPSHOT
+ 8.0.0-SNAPSHOTorg.eclipse.cdt.debug.uieclipse-plugin
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
index 3b4195fe385..f142f4d8016 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
@@ -24,35 +24,20 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.resources.FileStorage;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.ICDIEventBreakpointHit;
-import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo;
-import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryEvent;
-import org.eclipse.cdt.debug.core.cdi.ICDISignalExitInfo;
-import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
-import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointScope;
-import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger;
-import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
-import org.eclipse.cdt.debug.core.model.CDebugElementState;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
-import org.eclipse.cdt.debug.core.model.ICDebugElement;
import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
+import org.eclipse.cdt.debug.core.model.ICDynamicPrintf;
import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
import org.eclipse.cdt.debug.core.model.ICModule;
-import org.eclipse.cdt.debug.core.model.ICDynamicPrintf;
import org.eclipse.cdt.debug.core.model.ICSignal;
import org.eclipse.cdt.debug.core.model.ICStackFrame;
-import org.eclipse.cdt.debug.core.model.ICThread;
import org.eclipse.cdt.debug.core.model.ICTracepoint;
import org.eclipse.cdt.debug.core.model.ICType;
import org.eclipse.cdt.debug.core.model.ICValue;
-import org.eclipse.cdt.debug.core.model.ICVariable;
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
import org.eclipse.cdt.debug.core.model.IDummyStackFrame;
import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
@@ -80,13 +65,10 @@ import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IDisconnect;
import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IRegister;
import org.eclipse.debug.core.model.IRegisterGroup;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.core.model.ITerminate;
-import org.eclipse.debug.core.model.IThread;
import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
import org.eclipse.debug.core.model.IWatchExpression;
import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
import org.eclipse.debug.ui.DebugUITools;
@@ -272,42 +254,12 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
}
if ( element instanceof IWatchExpression && ((IWatchExpression)element).hasErrors() )
overlays[OverlayImageDescriptor.BOTTOM_LEFT] = CDebugImages.DESC_OVRS_ERROR;
- if ( element instanceof ICVariable && ((ICVariable)element).isArgument() )
- overlays[OverlayImageDescriptor.TOP_RIGHT] = CDebugImages.DESC_OVRS_ARGUMENT;
- if ( element instanceof ICGlobalVariable && !(element instanceof IRegister) )
- overlays[OverlayImageDescriptor.TOP_RIGHT] = CDebugImages.DESC_OVRS_GLOBAL;
return getImageCache().getImageFor( new OverlayImageDescriptor( baseImage, overlays ) );
}
return null;
}
private Image getBaseImage( Object element ) {
- if ( element instanceof ICDebugTarget ) {
- ICDebugTarget target = (ICDebugTarget)element;
- if ( target.isPostMortem() ) {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED ) );
- }
- if ( target.isTerminated() || target.isDisconnected() ) {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED ) );
- }
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_DEBUG_TARGET ) );
- }
- if ( element instanceof ICThread ) {
- ICThread thread = (ICThread)element;
- ICDebugTarget target = (ICDebugTarget)thread.getDebugTarget();
- if ( target.isPostMortem() ) {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED ) );
- }
- if ( thread.isSuspended() ) {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED ) );
- }
- else if ( thread.isTerminated() ) {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED ) );
- }
- else {
- return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_THREAD_RUNNING ) );
- }
- }
if ( element instanceof IMarker ) {
IBreakpoint bp = getBreakpoint( (IMarker)element );
if ( bp != null && bp instanceof ICBreakpoint ) {
@@ -323,12 +275,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
if ( element instanceof IExpression ) {
return getExpressionImage( (IExpression)element );
}
- if ( element instanceof IRegister ) {
- return getRegisterImage( (IRegister)element );
- }
- if ( element instanceof IVariable ) {
- return getVariableImage( (IVariable)element );
- }
if ( element instanceof ICModule ) {
return getModuleImage( (ICModule)element );
}
@@ -485,10 +431,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
if ( element instanceof IWatchExpression ) {
return getWatchExpressionText( (IWatchExpression)element );
}
- if ( element instanceof IVariable ) {
- label.append( getVariableText( (IVariable)element ) );
- return label.toString();
- }
if ( element instanceof IValue ) {
label.append( getValueText( (IValue)element ) );
return label.toString();
@@ -518,8 +460,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
}
if ( element instanceof IDebugTarget )
label.append( getTargetText( (IDebugTarget)element, showQualified ) );
- else if ( element instanceof IThread )
- label.append( getThreadText( (IThread)element, showQualified ) );
if ( element instanceof ITerminate ) {
if ( ((ITerminate)element).isTerminated() ) {
label.insert( 0, CDebugUIMessages.getString( "CDTDebugModelPresentation.0" ) ); //$NON-NLS-1$
@@ -615,30 +555,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
return overlays;
}
-
- protected Image getVariableImage( IVariable element ) {
- if ( element instanceof ICVariable ) {
- ICType type = null;
- try {
- type = ((ICVariable)element).getType();
- }
- catch( DebugException e ) {
- // use default image
- }
- if ( type != null && (type.isPointer() || type.isReference()) )
- return fDebugImageRegistry.get( (((ICVariable)element).isEnabled()) ? CDebugImages.DESC_OBJS_VARIABLE_POINTER : CDebugImages.DESC_OBJS_VARIABLE_POINTER_DISABLED );
- else if ( type != null && (type.isArray() || type.isStructure()) )
- return fDebugImageRegistry.get( (((ICVariable)element).isEnabled()) ? CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE : CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE_DISABLED );
- else
- return fDebugImageRegistry.get( (((ICVariable)element).isEnabled()) ? CDebugImages.DESC_OBJS_VARIABLE_SIMPLE : CDebugImages.DESC_OBJS_VARIABLE_SIMPLE_DISABLED );
- }
- return null;
- }
-
- protected Image getRegisterImage( IRegister element ) {
- return ( ( element instanceof ICVariable && ((ICVariable)element).isEnabled() ) ) ? fDebugImageRegistry.get( CDebugImages.DESC_OBJS_REGISTER ) : fDebugImageRegistry.get( CDebugImages.DESC_OBJS_REGISTER_DISABLED );
- }
-
protected Image getExpressionImage( IExpression element ) {
return fDebugImageRegistry.get( DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_EXPRESSION ) );
}
@@ -659,34 +575,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
return null;
}
- protected String getVariableText( IVariable var ) throws DebugException {
- StringBuffer label = new StringBuffer();
- if ( var instanceof ICVariable ) {
- ICType type = null;
- try {
- type = ((ICVariable)var).getType();
- }
- catch( DebugException e ) {
- // don't display type
- }
- if ( type != null && isShowVariableTypeNames() ) {
- String typeName = CDebugUIUtils.getVariableTypeName( type );
- if ( typeName != null && typeName.length() > 0 ) {
- label.append( typeName ).append( ' ' );
- }
- }
- String name = var.getName();
- if ( name != null )
- label.append( name.trim() );
- String valueString = getValueText( var.getValue() );
- if ( !isEmpty( valueString ) ) {
- label.append( " = " ); //$NON-NLS-1$
- label.append( valueString );
- }
- }
- return label.toString();
- }
-
protected String getValueText( IValue value ) {
return CDebugUIUtils.getValueText( value );
}
@@ -739,75 +627,9 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
}
protected String getTargetText( IDebugTarget target, boolean qualified ) throws DebugException {
- ICDebugTarget t = target.getAdapter( ICDebugTarget.class );
- if ( t != null ) {
- if ( !t.isPostMortem() ) {
- CDebugElementState state = t.getState();
- if ( state.equals( CDebugElementState.EXITED ) || state.equals( CDebugElementState.TERMINATED )) {
- Object info = t.getCurrentStateInfo();
- String label = CDebugUIMessages.getString( "CDTDebugModelPresentation.3" ); //$NON-NLS-1$
- String reason = ""; //$NON-NLS-1$
- if ( info != null && info instanceof ICDISignalExitInfo ) {
- ICDISignalExitInfo sigInfo = (ICDISignalExitInfo)info;
- reason = ' ' + MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.5" ), sigInfo.getName(), sigInfo.getDescription() ); //$NON-NLS-1$
- }
- else if ( info != null && info instanceof ICDIExitInfo ) {
- reason = ' ' + MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.6" ), Integer.valueOf( ((ICDIExitInfo)info).getCode() ) ); //$NON-NLS-1$
- }
- return MessageFormat.format( label, target.getName(), reason );
- }
- else if ( state.equals( CDebugElementState.SUSPENDED ) ) {
- return MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.7" ), target.getName() ); //$NON-NLS-1$
- }
- }
- }
return target.getName();
}
- protected String getThreadText( IThread thread, boolean qualified ) throws DebugException {
- ICDebugTarget target = thread.getDebugTarget().getAdapter( ICDebugTarget.class );
- if ( target.isPostMortem() ) {
- return getFormattedString( CDebugUIMessages.getString( "CDTDebugModelPresentation.8" ), thread.getName() ); //$NON-NLS-1$
- }
- if ( thread.isTerminated() ) {
- return getFormattedString( CDebugUIMessages.getString( "CDTDebugModelPresentation.9" ), thread.getName() ); //$NON-NLS-1$
- }
- if ( thread.isStepping() ) {
- return getFormattedString( CDebugUIMessages.getString( "CDTDebugModelPresentation.10" ), thread.getName() ); //$NON-NLS-1$
- }
- if ( !thread.isSuspended() ) {
- return getFormattedString( CDebugUIMessages.getString( "CDTDebugModelPresentation.11" ), thread.getName() ); //$NON-NLS-1$
- }
- if ( thread.isSuspended() ) {
- String reason = ""; //$NON-NLS-1$
- ICDebugElement element = thread.getAdapter( ICDebugElement.class );
- if ( element != null ) {
- Object info = element.getCurrentStateInfo();
- if ( info instanceof ICDISignalReceived ) {
- ICDISignal signal = ((ICDISignalReceived)info).getSignal();
- reason = MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.13" ), signal.getName(), signal.getDescription() ); //$NON-NLS-1$
- }
- else if ( info instanceof ICDIWatchpointTrigger ) {
- reason = MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.14" ), ((ICDIWatchpointTrigger)info).getOldValue(), ((ICDIWatchpointTrigger)info).getNewValue() ); //$NON-NLS-1$
- }
- else if ( info instanceof ICDIWatchpointScope ) {
- reason = CDebugUIMessages.getString( "CDTDebugModelPresentation.15" ); //$NON-NLS-1$
- }
- else if ( info instanceof ICDIBreakpointHit ) {
- reason = CDebugUIMessages.getString( "CDTDebugModelPresentation.16" ); //$NON-NLS-1$
- }
- else if ( info instanceof ICDISharedLibraryEvent ) {
- reason = CDebugUIMessages.getString( "CDTDebugModelPresentation.17" ); //$NON-NLS-1$
- }
- else if ( info instanceof ICDIEventBreakpointHit ) {
- reason = MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.20" ), ((ICDIEventBreakpointHit)info).getEventBreakpointType() ); //$NON-NLS-1$
- }
- }
- return MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.18" ), thread.getName(), reason ); //$NON-NLS-1$
- }
- return MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.19" ), thread.getName() ); //$NON-NLS-1$
- }
-
protected String getStackFrameText( IStackFrame f, boolean qualified ) throws DebugException {
if ( f instanceof ICStackFrame ) {
ICStackFrame frame = (ICStackFrame)f;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
index 977412ba9cf..db8c69f07bc 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
@@ -14,14 +14,12 @@ package org.eclipse.cdt.debug.internal.ui;
import java.net.URI;
import java.util.Iterator;
-import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
import org.eclipse.cdt.debug.core.model.ICStackFrame;
import org.eclipse.cdt.debug.core.model.ICType;
import org.eclipse.cdt.debug.core.model.ICValue;
import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
-import org.eclipse.cdt.debug.internal.ui.disassembly.rendering.DisassemblyEditorInput;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.breakpoints.CBreakpointPropertyDialogAction;
import org.eclipse.core.filesystem.URIUtil;
@@ -146,16 +144,6 @@ public class CDebugUIUtils {
valueString = "."; //$NON-NLS-1$
label.append( valueString );
}
- else if ( type != null && type.isFloatingPointType() ) {
- Number floatingPointValue = CDebugUtils.getFloatingPointValue( (ICValue)value );
- if ( CDebugUtils.isNaN( floatingPointValue ) )
- valueString = "NAN"; //$NON-NLS-1$
- if ( CDebugUtils.isPositiveInfinity( floatingPointValue ) )
- valueString = CDebugUIMessages.getString( "CDTDebugModelPresentation.23" ); //$NON-NLS-1$
- if ( CDebugUtils.isNegativeInfinity( floatingPointValue ) )
- valueString = CDebugUIMessages.getString( "CDTDebugModelPresentation.24" ); //$NON-NLS-1$
- label.append( valueString );
- }
else if ( valueString.length() > 0 ) {
label.append( valueString );
}
@@ -221,13 +209,6 @@ public class CDebugUIUtils {
if ( input instanceof IPathEditorInput ) {
return ((IPathEditorInput)input).getPath().toOSString();
}
- if ( input instanceof DisassemblyEditorInput ) {
- String sourceFile = ((DisassemblyEditorInput)input).getSourceFile();
- if ( sourceFile != null ) {
- return sourceFile;
- }
- return ((DisassemblyEditorInput)input).getModuleFile();
- }
if ( input instanceof IURIEditorInput)
{
IPath uriPath = URIUtil.toPath(((IURIEditorInput)input).getURI());
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CRegisterManagerProxies.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CRegisterManagerProxies.java
deleted file mode 100644
index e746c9bf6cd..00000000000
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CRegisterManagerProxies.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 CodeSourcery and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CodeSourcery - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.debug.internal.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.cdt.debug.core.model.ICDebugElement;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
-import org.eclipse.cdt.debug.internal.ui.elements.adapters.CRegisterManagerProxy;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.contexts.IDebugContextManager;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Singleton that keeps track of CRegisterManagerProxy objects
- */
-public class CRegisterManagerProxies {
-
- private static CRegisterManagerProxies fgInstance = new CRegisterManagerProxies();
-
- private Map fMap;
-
- public static CRegisterManagerProxies getInstance() {
- return fgInstance;
- }
-
- public CRegisterManagerProxies() {
- super();
- fMap = new HashMap();
- }
-
- public void dispose() {
- for ( CRegisterManagerProxy proxy : fMap.values() ) {
- DebugPlugin.getDefault().removeDebugEventListener( proxy );
- proxy.dispose();
- }
- fMap.clear();
- }
-
- public CRegisterManagerProxy getRegisterManagerProxy( ICDebugTarget target ) {
- CRegisterManagerProxy proxy = fMap.get( target );
- if ( proxy == null ) {
- synchronized( this ) {
- proxy = fMap.get( target );
- if ( proxy == null ) {
- proxy = new CRegisterManagerProxy( ((CDebugTarget)target).getRegisterManager() );
- DebugPlugin.getDefault().addDebugEventListener( proxy );
- IDebugContextService service = getContextService();
- if ( service != null ) {
- ISelection s = service.getActiveContext();
- if ( s instanceof IStructuredSelection && ((IStructuredSelection)s).size() == 1 ) {
- Object context = ((IStructuredSelection)s).getFirstElement();
- proxy.setContext( ( context instanceof ICDebugElement ) ? (ICDebugElement)context : target );
- }
- service.addDebugContextListener( proxy );
- }
- fMap.put( target, proxy );
- }
- }
- }
- return proxy;
- }
-
- private IDebugContextService getContextService() {
- IWorkbenchWindow window = SelectedResourceManager.getDefault().getActiveWindow();
- if ( window != null ) {
- IDebugContextManager manager = DebugUITools.getDebugContextManager();
- return manager.getContextService( window );
- }
- return null;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
deleted file mode 100644
index a4d554637ee..00000000000
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.cdt.debug.core.model.ICDebugTarget;
-import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IPageListener;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Manages the current evaluation context (stack frame) for evaluation actions.
- * In each page, the selection is tracked in each debug view (if any). When a debug
- * target selection exists, the "debuggerActive" System property is set to true.
- * This property is used to make the "Run to Line" and "Resume at Line" actions
- * visible in editors only if there is a running debug session.
- */
-public class EvaluationContextManager implements IWindowListener, IPageListener, ISelectionListener, IPartListener2 {
- private final static String DEBUGGER_ACTIVE = CDebugUIPlugin.getUniqueIdentifier() + ".debuggerActive"; //$NON-NLS-1$
- protected static EvaluationContextManager fgManager;
- private Map fContextsByPage = null;
-
- protected EvaluationContextManager() {
- }
-
- public static void startup() {
- Runnable r = new Runnable() {
- @Override
- public void run() {
- if (fgManager == null) {
- fgManager = new EvaluationContextManager();
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- fgManager.windowOpened(windows[i]);
- }
- workbench.addWindowListener(fgManager);
- }
- }
- };
- CDebugUIPlugin.getStandardDisplay().asyncExec(r);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
- */
- @Override
- public void windowActivated(IWorkbenchWindow window) {
- windowOpened(window);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
- */
- @Override
- public void windowDeactivated(IWorkbenchWindow window) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
- */
- @Override
- public void windowClosed(IWorkbenchWindow window) {
- window.removePageListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
- */
- @Override
- public void windowOpened(IWorkbenchWindow window) {
- IWorkbenchPage[] pages = window.getPages();
- for(int i = 0; i < pages.length; i++) {
- window.addPageListener(this);
- pageOpened(pages[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPageListener#pageActivated(org.eclipse.ui.IWorkbenchPage)
- */
- @Override
- public void pageActivated(IWorkbenchPage page) {
- pageOpened(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPageListener#pageClosed(org.eclipse.ui.IWorkbenchPage)
- */
- @Override
- public void pageClosed(IWorkbenchPage page) {
- page.removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- page.removePartListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPageListener#pageOpened(org.eclipse.ui.IWorkbenchPage)
- */
- @Override
- public void pageOpened(IWorkbenchPage page) {
- page.addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- page.addPartListener(this);
- IWorkbenchPartReference ref = page.getActivePartReference();
- if (ref != null) {
- partActivated(ref);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- IWorkbenchPage page = part.getSite().getPage();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() == 1) {
- Object element = ss.getFirstElement();
- if (element instanceof IAdaptable) {
- ICDebugTarget target = ((IAdaptable)element).getAdapter(ICDebugTarget.class);
- if (target != null) {
- setContext(page, target);
- return;
- }
- }
- }
- }
- // no context in the given view
- removeContext(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partActivated(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partBroughtToTop(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partClosed(IWorkbenchPartReference partRef) {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(partRef.getId())) {
- removeContext(partRef.getPage());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partDeactivated(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partOpened(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partHidden(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partVisible(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partInputChanged(IWorkbenchPartReference partRef) {
- }
-
- /**
- * Sets the evaluation context for the given page, and notes that
- * a valid execution context exists.
- *
- * @param page
- * @param frame
- */
- private void setContext(IWorkbenchPage page, ICDebugTarget target) {
- if (fContextsByPage == null) {
- fContextsByPage = new HashMap();
- }
- fContextsByPage.put(page, target);
- System.setProperty(DEBUGGER_ACTIVE, Boolean.TRUE.toString());
- }
-
- /**
- * Removes an evaluation context for the given page, and determines if
- * any valid execution context remain.
- *
- * @param page
- */
- private void removeContext(IWorkbenchPage page) {
- if (fContextsByPage != null) {
- fContextsByPage.remove(page);
- if (fContextsByPage.isEmpty()) {
- System.setProperty(DEBUGGER_ACTIVE, Boolean.FALSE.toString());
- }
- }
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
index 5e60116ca7d..0b4f3ece6af 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
@@ -19,10 +19,7 @@ LoadSymbolsActionDelegate.Unable_to_load_symbols_of_shared_library_1=Unable to l
LoadSymbolsActionDelegate.Operation_failed_1=Operation failed.
LoadSymbolsForAllAction.Load_Symbols_For_All_1=Load Symbols For All
LoadSymbolsForAllAction.Load_symbols_for_all_shared_libraries_1=Load symbols for all shared libraries.
-LoadSymbolsForAllActionDelegate.Error(s)_occurred_loading_the_symbols_1=Error(s) occurred loading the symbols.
LoadSymbolsForAllAction.Load_Symbols_For_All_2=Load Symbols For All
-LoadSymbolsForAllActionDelegate.Error_1=Error
-LoadSymbolsForAllActionDelegate.0=Operation failed.
LoadModuleSymbolsActionDelegate.0=Unable to load symbols.
LoadSymbolsForAllAction.Unable_to_load_symbols_1=Unable to load symbols.
SignalZeroObjectActionDelegate.0=Unable to resume ignoring the signal.
@@ -64,14 +61,10 @@ MoveToLineAdapter.1=Missing document
MoveToLineAdapter.2=Empty editor
MoveToLineAdapter.3=Operation is not supported.
MoveToLineAdapter.4=Move To Line failed.
-AddGlobalsActionDelegate.title=Global Variables
-AddGlobalsActionDelegate.Error(s)_occured_adding_globals_1=Error(s) occurred adding globals.
ManageFunctionBreakpointActionDelegate.Error_1=Error
ManageFunctionBreakpointActionDelegate.Operation_failed_1=Operation failed.
SignalActionDelegate.0=Unable to deliver the signal to the target.
SignalActionDelegate.1=Operation failed.
-AddGlobalsActionDelegate.0=Select Variables:
-AddGlobalsActionDelegate.1=Add global variables failed.
VariableFormatActionDelegate.0=Unable to set format.
ExpressionDialog.0=Add Watch Expression
ExpressionDialog.1=Expression to watch:
@@ -88,18 +81,9 @@ CastToArrayActionDelegate.5=The 'Length' field must not be empty.
CastToArrayActionDelegate.6=Invalid length.
CastToArrayActionDelegate.7=The length must be greater than 0.
CastToArrayActionDelegate.8=Unable to display this variable as an array.
-EnableVariablesActionDelegate.0=Exceptions occurred enabling the variable(s).
-EnableVariablesActionDelegate.1=Enable variable(s) failed.
AddFunctionBreakpointActionDelegate.0=Cannot add function breakpoint.
AddLineBreakpointActionDelegate.0=Cannot add line breakpoint.
AddWatchpointActionDelegate.0=Cannot add watchpoint.
-AddWatchpointDialog.0=Add Watchpoint
-AddWatchpointDialog.1=Expression to watch:
-AddWatchpointDialog.2=Access
-AddWatchpointDialog.3=Write
-AddWatchpointDialog.4=Read
-AddWatchpointDialog.5=Memory space:
-AddWatchpointDialog.6=Units:
AddWatchpointOnVariableActionDelegate.No_Element_Size=Failed to get variable/expression size
AddWatchpointOnVariableActionDelegate.Error_Dlg_Title=Error
ResumeAtLineAdapter.0=Empty editor
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
deleted file mode 100644
index c799394ac5e..00000000000
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.ui.actions;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.cdt.debug.core.ICGlobalVariableManager;
-import org.eclipse.cdt.debug.core.model.IExecFileInfo;
-import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
-import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionDelegate;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-
-/**
- * A delegate for the "Add Globals" action.
- */
-public class AddGlobalsActionDelegate extends ActionDelegate implements IViewActionDelegate, ISelectionListener, IPartListener {
-
-
- class SortedListSelectionDialog extends ListSelectionDialog {
-
- public SortedListSelectionDialog( Shell parentShell, Object input, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String message ) {
- super( parentShell, input, contentProvider, labelProvider, message );
- }
-
- @Override
- protected Control createDialogArea( Composite parent ) {
- Control da = super.createDialogArea( parent );
- getViewer().setSorter( new ViewerSorter() );
- return da;
- }
- }
-
- private IGlobalVariableDescriptor[] fGlobals;
-
- private IViewPart fView = null;
-
- private IAction fAction;
-
- private IStructuredSelection fSelection;
-
- private IStatus fStatus = null;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
- */
- @Override
- public void init( IViewPart view ) {
- fView = view;
- view.getSite().getPage().addPartListener( this );
- view.getSite().getPage().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(IWorkbenchPart, ISelection)
- */
- @Override
- public void selectionChanged( IWorkbenchPart part, ISelection selection ) {
- if ( part != null && part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) ) {
- if ( selection instanceof IStructuredSelection ) {
- setSelection( (IStructuredSelection)selection );
- }
- else {
- setSelection( null );
- }
- update( getAction() );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- @Override
- public void run( IAction action ) {
- final IStructuredSelection selection = getSelection();
- if ( selection == null || selection.size() != 1 )
- return;
- BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
-
- @Override
- public void run() {
- try {
- doAction( selection.getFirstElement() );
- setStatus( null );
- }
- catch( DebugException e ) {
- setStatus( e.getStatus() );
- }
- }
- } );
- IStatus status = getStatus();
- if ( status != null && !status.isOK() ) {
- if ( status.isMultiStatus() ) {
- status = new MultiStatus( status.getPlugin(), status.getCode(), status.getChildren(), ActionMessages.getString( "AddGlobalsActionDelegate.Error(s)_occured_adding_globals_1" ), status.getException() ); //$NON-NLS-1$
- }
- IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow();
- if ( window != null ) {
- CDebugUIPlugin.errorDialog( getErrorDialogMessage(), status );
- }
- else {
- CDebugUIPlugin.log( status );
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
- */
- @Override
- public void selectionChanged( IAction action, ISelection selection ) {
- setAction( action );
- if ( getView() != null ) {
- update( action );
- }
- }
-
- protected void update( IAction action ) {
- if ( action != null ) {
- action.setEnabled( getEnableStateForSelection( getSelection() ) );
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partActivated(IWorkbenchPart)
- */
- @Override
- public void partActivated( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- @Override
- public void partBroughtToTop( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partClosed(IWorkbenchPart)
- */
- @Override
- public void partClosed( IWorkbenchPart part ) {
- if ( part.equals( getView() ) ) {
- dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partDeactivated(IWorkbenchPart)
- */
- @Override
- public void partDeactivated( IWorkbenchPart part ) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPartListener#partOpened(IWorkbenchPart)
- */
- @Override
- public void partOpened( IWorkbenchPart part ) {
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected void setView( IViewPart viewPart ) {
- fView = viewPart;
- }
-
- protected void setAction( IAction action ) {
- fAction = action;
- }
-
- protected IAction getAction() {
- return fAction;
- }
-
- private void setSelection( IStructuredSelection selection ) {
- fSelection = selection;
- }
-
- private IStructuredSelection getSelection() {
- return fSelection;
- }
-
- @Override
- public void dispose() {
- if ( getView() != null ) {
- getView().getViewSite().getPage().removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
- getView().getViewSite().getPage().removePartListener( this );
- }
- }
-
- protected boolean getEnableStateForSelection( IStructuredSelection selection ) {
- if ( selection == null || selection.size() != 1 ) {
- return false;
- }
- Object element = selection.getFirstElement();
- return (element != null && element instanceof IDebugElement && ((IDebugElement)element).getDebugTarget().getAdapter( IExecFileInfo.class ) != null);
- }
-
- private SortedListSelectionDialog createDialog() {
- return new SortedListSelectionDialog( getView().getSite().getShell(), fGlobals, new IStructuredContentProvider() {
-
- @Override
- public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public Object[] getElements( Object parent ) {
- return getGlobals();
- }
- }, new LabelProvider() {
-
- @Override
- public String getText( Object element ) {
- if ( element instanceof IGlobalVariableDescriptor ) {
- String path = ""; //$NON-NLS-1$
- if ( ((IGlobalVariableDescriptor)element).getPath() != null ) {
- path = ((IGlobalVariableDescriptor)element).getPath().toString();
- int index = path.lastIndexOf( '/' );
- if ( index != -1 )
- path = path.substring( index + 1 );
- }
- return (path.length() > 0 ? ('\'' + path + "\'::") : "") + ((IGlobalVariableDescriptor)element).getName(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
- }, ActionMessages.getString( "AddGlobalsActionDelegate.0" ) ); //$NON-NLS-1$
- }
-
- protected IGlobalVariableDescriptor[] getGlobals() {
- return fGlobals;
- }
-
- protected void doAction( Object element ) throws DebugException {
- if ( getView() == null )
- return;
- if ( element != null && element instanceof IDebugElement ) {
- IExecFileInfo info = ((IDebugElement)element).getDebugTarget().getAdapter( IExecFileInfo.class );
- ICGlobalVariableManager gvm = ((IDebugElement)element).getDebugTarget().getAdapter( ICGlobalVariableManager.class );
- if ( info != null && gvm != null ) {
- fGlobals = info.getGlobals();
- ListSelectionDialog dlg = createDialog();
- dlg.setTitle(ActionMessages.getString("AddGlobalsActionDelegate.title")); //$NON-NLS-1$
- dlg.setInitialSelections( gvm.getDescriptors() );
- if ( dlg.open() == Window.OK ) {
- List