Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.classpath9
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.cvsignore1
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.options1
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.project34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.settings/org.eclipse.jdt.core.prefs74
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/ChangeLog1219
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/ChangeLog-20032151
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF30
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/about.html24
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/build.properties27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointHit.java43
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java1152
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/CdiResources.properties33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java75
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EndSteppingRange.java22
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ErrorInfo.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java542
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExitInfo.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java271
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FileLocation.java22
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Format.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/FunctionFinished.java73
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/LineLocation.java22
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Location.java155
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Locator.java71
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MI2CDIException.java30
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java66
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/MemoryManager.java195
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ProcessManager.java91
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java472
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java236
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionConfiguration.java40
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SessionObject.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryEvent.java22
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java443
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalExitInfo.java43
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalManager.java217
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SignalReceived.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java503
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/ThreadManager.java113
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java756
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointScope.java43
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/WatchpointTrigger.java59
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ChangedEvent.java136
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/CreatedEvent.java135
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DestroyedEvent.java112
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/DisconnectedEvent.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ExitedEvent.java69
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/MemoryChangedEvent.java61
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java83
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/event/SuspendedEvent.java101
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressBreakpoint.java26
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/AddressLocation.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Argument.java45
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ArgumentDescriptor.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Breakpoint.java155
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CObject.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/CoreFileConfiguration.java108
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java100
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Exceptionpoint.java56
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Expression.java139
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionBreakpoint.java26
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/FunctionLocation.java23
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java61
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariableDescriptor.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Instruction.java76
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LineBreakpoint.java24
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariable.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocalVariableDescriptor.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/LocationBreakpoint.java87
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MappedSourceLocation.java66
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java377
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MixedInstruction.java58
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java124
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterDescriptor.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RegisterGroup.java62
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/RuntimeOptions.java115
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/SharedLibrary.java85
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Signal.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/StackFrame.java275
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java1400
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/TargetConfiguration.java173
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java596
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorage.java63
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/ThreadStorageDescriptor.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Value.java161
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java557
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableDescriptor.java421
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Watchpoint.java128
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java24
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateValue.java24
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java66
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java141
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java32
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolValue.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharValue.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedValue.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleValue.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatValue.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java56
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointValue.java85
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java47
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionValue.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java32
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralValue.java97
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerValue.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java47
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceValue.java102
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructValue.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidValue.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java32
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharValue.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/design.txt110
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CLIProcessor.java272
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CommandQueue.java62
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/CoreProcess.java83
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java55
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/EventThread.java60
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java582
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/IMITTY.java43
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIException.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIFormat.java107
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIInferior.java421
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIProcess.java58
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MISession.java896
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/Queue.java82
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java562
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/SessionProcess.java127
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/TxThread.java105
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLICatch.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLICommand.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIExecAbort.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIHandle.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoLine.java42
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoProc.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoProgram.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoSharedLibrary.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoSignals.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIInfoThreads.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIJump.java49
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIPType.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLISharedLibrary.java30
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLISignal.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLITargetAttach.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CLIWhatis.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/Command.java115
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java469
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakAfter.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakCondition.java42
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakDelete.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakDisable.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakEnable.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakInsert.java138
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakList.java74
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java64
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MICommand.java206
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java145
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java64
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java95
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java154
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataWriteMemory.java98
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIDataWriteRegisterValues.java72
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java45
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java26
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java40
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java32
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java32
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java30
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java28
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java26
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSet.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetAutoSolib.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetBreakpointPending.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetEnvironment.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetNewConsole.java23
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetSolibSearchPath.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBSetStopOnSolibEvents.java26
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShow.java47
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowAddressSize.java40
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowDirectories.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowEndian.java42
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowExitCode.java49
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowPrompt.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowSolibSearchPath.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInfoSharedLibrary.java41
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInterpreterExec.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIInterpreterExecConsole.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackInfoDepth.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListArguments.java73
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListFrames.java79
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackListLocals.java55
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIStackSelectFrame.java29
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetDetach.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetDownload.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MITargetSelect.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIThreadListIds.java49
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIThreadSelect.java49
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarAssign.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarCreate.java78
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarDelete.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarEvaluateExpression.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoExpression.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoNumChildren.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarInfoType.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarListChildren.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarSetFormat.java57
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarShowAttributes.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarShowFormat.java29
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVarUpdate.java54
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/MIVersion.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/RawCommand.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoriesMessages.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoriesMessages.properties11
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoryDescriptor.java136
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/CommandFactoryManager.java85
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/StandardCommandFactory.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/LinuxCLIInfoSharedLibrary.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/LinuxCLIInfoSharedLibraryInfo.java72
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/linux/StandardLinuxCommandFactory.java77
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIInfoPID.java85
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIInfoThreads.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIVarUpdate.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIVarUpdateInfo.java132
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOsCLIInfoThreadsInfo.java78
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java49
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java60
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java106
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java105
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinCLIInfoSharedLibrary.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinCLIInfoSharedLibraryInfo.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinMIEnvironmentCD.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/WinMIGDBSetAutoSolib.java27
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointChangedEvent.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointCreatedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointDeletedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIBreakpointHitEvent.java111
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIChangedEvent.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICreatedEvent.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIDestroyedEvent.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIDetachedEvent.java31
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIErrorEvent.java81
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIEvent.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIFunctionFinishedEvent.java108
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIGDBExitEvent.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorCreatedEvent.java29
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorExitEvent.java82
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIInferiorSignalExitEvent.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MILocationReachedEvent.java83
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIMemoryChangedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIMemoryCreatedEvent.java46
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRegisterChangedEvent.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRegisterCreatedEvent.java44
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIRunningEvent.java47
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibChangedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibCreatedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibEvent.java34
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISharedLibUnloadedEvent.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISignalChangedEvent.java37
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISignalEvent.java101
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MISteppingRangeEvent.java82
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIStoppedEvent.java99
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIThreadCreatedEvent.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIThreadExitEvent.java36
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarChangedEvent.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarCreatedEvent.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIVarDeletedEvent.java38
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIWatchpointScopeEvent.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MIWatchpointTriggerEvent.java158
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLICatchInfo.java82
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java100
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoProcInfo.java74
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoProgramInfo.java80
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoSharedLibraryInfo.java192
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoSignalsInfo.java115
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoThreadsInfo.java93
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIPTypeInfo.java54
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIWhatisInfo.java54
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIArg.java131
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIAsm.java117
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIAsyncRecord.java75
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakInsertInfo.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakListInfo.java84
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakWatchInfo.java24
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIBreakpoint.java275
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIConsoleStreamOutput.java18
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIConst.java123
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataDisassembleInfo.java125
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataEvaluateExpressionInfo.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListChangedRegistersInfo.java73
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListRegisterNamesInfo.java90
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataListRegisterValuesInfo.java53
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIDataReadMemoryInfo.java154
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIEnvironmentPWDInfo.java55
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIExecAsyncOutput.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java152
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowAddressSizeInfo.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowDirectoriesInfo.java65
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndianInfo.java55
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowExitCodeInfo.java39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowInfo.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowSolibSearchPathInfo.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIInfo.java86
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java68
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIList.java59
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MILogStreamOutput.java18
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIMemory.java107
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MINotifyAsyncOutput.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIOOBRecord.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIOutput.java50
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java578
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIRegisterValue.java98
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIResult.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIResultRecord.java64
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIShared.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MISigHandle.java58
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MISrcAsm.java91
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackInfoDepthInfo.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListArgumentsInfo.java83
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListFramesInfo.java84
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStackListLocalsInfo.java63
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStatusAsyncOutput.java18
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIStreamRecord.java43
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MITargetStreamOutput.java19
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIThreadListIdsInfo.java70
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIThreadSelectInfo.java61
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MITuple.java58
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIValue.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVar.java77
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarChange.java45
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarCreateInfo.java66
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarDeleteInfo.java52
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarEvaluateExpressionInfo.java47
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoExpressionInfo.java57
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoNumChildrenInfo.java54
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarInfoTypeInfo.java48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java88
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarShowAttributesInfo.java51
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarShowFormatInfo.java60
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarUpdateInfo.java103
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/plugin.properties23
-rwxr-xr-xdebug/org.eclipse.cdt.debug.mi.core/plugin.xml129
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/pom.xml17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/schema/commandFactories.exsd161
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java243
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java105
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java304
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java289
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java174
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBProcess.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java123
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger2.java161
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java138
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IGDBServerMILaunchConfigurationConstants.java25
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java67
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java96
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MICoreUtils.java35
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java642
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPluginResources.properties39
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java212
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MITTYAdapter.java55
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MinGWDebugger.java21
398 files changed, 0 insertions, 39011 deletions
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 0afe529148..0000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="mi"/>
- <classpathentry kind="src" path="cdi"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
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 ba077a4031..0000000000
--- 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 76c7d9926f..0000000000
--- 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 ccce5584ad..0000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.cdt.debug.mi.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
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 397ee5a8e4..0000000000
--- 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 83856982c5..0000000000
--- 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 =<PENDING>
- * 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 60b4520919..0000000000
--- 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 <format> [<regnum1> <value1>...<regnumN> <valueN>]
-
- * 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 77a4f13a8a..0000000000
--- 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 d7c511887d..0000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/about.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
-
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 22, 2007</p>
-<h3>License</h3>
-
-<p>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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>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 <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body></html> \ 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 479aeaeea5..0000000000
--- 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 d4791c4800..0000000000
--- 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 86104fe7c8..0000000000
--- 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 4f53848df8..0000000000
--- 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 853458e607..0000000000
--- 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 4f27c0e1b0..0000000000
--- 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 2c879f69fd..0000000000
--- 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 2552616430..0000000000
--- 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 60a709b89f..0000000000
--- 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 11bdda88bb..0000000000
--- 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 961ce4b0a8..0000000000
--- 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 121a913842..0000000000
--- 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 abcde577f7..0000000000
--- 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 7875a60263..0000000000
--- 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 4b59142950..0000000000
--- 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 18954dcd14..0000000000
--- 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 c9d282043d..0000000000
--- 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 53a19daf91..0000000000
--- 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 f14bd8ec78..0000000000
--- 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 c0c0749cd4..0000000000
--- 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 f808b3e510..0000000000
--- 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 390e32336e..0000000000
--- 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 e825d86416..0000000000
--- 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.<br>
- * 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.<br>
- * 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 c6888c2a8d..0000000000
--- 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 6a071ac1da..0000000000
--- 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 0843508509..0000000000
--- 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 97d8ebe4c7..0000000000
--- 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 c34c06b86b..0000000000
--- 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 89a6512b16..0000000000
--- 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 12a8273ccf..0000000000
--- 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 ddefd728a2..0000000000
--- 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 af37613642..0000000000
--- 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 3483ccf8b5..0000000000
--- 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 8b3e936c14..0000000000
--- 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 ea0a92a9f9..0000000000
--- 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 36eb17b271..0000000000
--- 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 64c2df8603..0000000000
--- 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 847c54a658..0000000000
--- 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 6cc91079c9..0000000000
--- 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 65b8d3f1da..0000000000
--- 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 8821d46877..0000000000
--- 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 bc396f8cba..0000000000
--- 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 b17e5bc812..0000000000
--- 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 2254094974..0000000000
--- 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 3abd32bb71..0000000000
--- 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 182662dd98..0000000000
--- 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 fe12e7b1d2..0000000000
--- 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 ae1787bc78..0000000000
--- 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 721686fe78..0000000000
--- 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 e5f129c3cf..0000000000
--- 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 952b4b2d2e..0000000000
--- 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 5aa8177aff..0000000000
--- 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 020908b5bf..0000000000
--- 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 3be6d86a5b..0000000000
--- 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 73d2ca9e71..0000000000
--- 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 3d0eee9c3f..0000000000
--- 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 43831601a1..0000000000
--- 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 62fde45a0d..0000000000
--- 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 86f840add6..0000000000
--- 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 f986ac43d0..0000000000
--- 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 3062adce85..0000000000
--- 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 b3f03cf406..0000000000
--- 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 fd531173df..0000000000
--- 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 2c3e53ee4c..0000000000
--- 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 d0e11cab84..0000000000
--- 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 c5f78c0453..0000000000
--- 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 f75789cfbe..0000000000
--- 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 f7c7df62b2..0000000000
--- 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 0d2115ad7e..0000000000
--- 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 84d4a5cbdf..0000000000
--- 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 a1846d3dc2..0000000000
--- 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 1550706b18..0000000000
--- 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 d4d604a124..0000000000
--- a/