Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-01-08 16:08:05 -0500
committerPawel Piech2009-01-08 16:08:05 -0500
commit5b471873662a87a77cfd854c98fca9c9948aa878 (patch)
tree3da8dcf3820bf3c2d4ebd17e4e8f3043e9773676
parent47093064424981f85335cfdaf25368c54cd840f8 (diff)
parentc1e6da229b8ffcea160498f034bfa6bc8ff6f230 (diff)
downloadorg.eclipse.cdt-5b471873662a87a77cfd854c98fca9c9948aa878.tar.gz
org.eclipse.cdt-5b471873662a87a77cfd854c98fca9c9948aa878.tar.xz
org.eclipse.cdt-5b471873662a87a77cfd854c98fca9c9948aa878.zip
Migrated DSF and DSF-GDB to the CDT project.
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.classpath7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.project34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters155
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF27
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/about.html24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/build.properties18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gifbin0 -> 1042 bytes
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/connect.gifbin0 -> 189 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/exec_obj.gifbin0 -> 527 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/arguments_tab.gifbin0 -> 95 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/debugger_tab.gifbin0 -> 348 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/main_tab.gifbin0 -> 354 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml146
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java296
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java204
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ConnectActionDelegate.java83
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfTerminateCommand.java99
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java219
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbDisconnectCommand.java77
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbRestartCommand.java127
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ProcessInfo.java55
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java84
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java553
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AbstractCDebuggerTab.java352
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java280
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java439
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java147
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java728
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java169
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java365
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbServerDebuggerPage.java187
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java84
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchImages.java85
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.java45
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties225
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java129
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SerialPortSettingsBlock.java206
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java620
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/TCPSettingsBlock.java199
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java394
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java254
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMModelProxyStrategy.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java115
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java188
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/.classpath7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/.options1
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/.project34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters115
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/about.html24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/build.properties17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml71
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGDBLaunchConfigurationConstants.java117
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/actions/IConnect.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java102
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java149
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java472
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GDBDebugger.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GDBServerDebugger.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java298
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java380
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchMessages.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchMessages.properties159
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java288
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ServicesLaunchSequence.java135
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java163
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java568
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory_7_0.java99
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java306
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java884
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java154
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java116
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java781
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java151
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactoryNS.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java97
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBProcesses.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/SessionType.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java504
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControlDMContext.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java496
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBInferiorProcess.java71
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/IGDBControl.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java200
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/ExpressionService.java927
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIBackend.java91
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIContainerDMContext.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIExecutionDMContext.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIProcessDMContext.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIProcesses.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java267
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java1009
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java1658
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIDisassembly.java200
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIFormat.java109
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java958
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIModules.java228
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java677
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java646
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java719
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java698
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java1713
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/BreakpointActionAdapter.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/MILogActionEnabler.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/MIResumeActionEnabler.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractCLIProcess.java350
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java772
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CLIEventProcessor.java354
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CLIEventProcessor_7_0.java290
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/LargePipedInputStream.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java173
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIControlDMContext.java74
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIInferiorProcess.java545
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java272
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java360
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/Adjustable.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIAttach.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIDetach.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIExecAbort.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoSharedLibrary.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoThreads.java45
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIMonitorListProcesses.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLISource.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaCommand.java61
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetAttributes.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetChildCount.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetChildren.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetValue.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetVar.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakAfter.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakCondition.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakDelete.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakDisable.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakEnable.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakInsert.java140
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakList.java62
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakWatch.java55
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java351
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataDisassemble.java93
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataEvaluateExpression.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataListRegisterNames.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataListRegisterValues.java150
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java150
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemory.java118
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIEnvironmentCD.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIEnvironmentDirectory.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecContinue.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecFinish.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecInterrupt.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecNext.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecNextInstruction.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReturn.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecRun.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecStep.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecStepInstruction.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecUntil.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecFile.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileSymbolFile.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBExit.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSet.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetAutoSolib.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetNonStop.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSolibSearchPath.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetStopOnSolibEvents.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSysroot.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShowExitCode.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInferiorTTYSet.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInterpreterExec.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInterpreterExecConsole.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java86
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackInfoDepth.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListArguments.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListFrames.java68
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListLocals.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackSelectFrame.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetSelect.java45
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadInfo.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadListIds.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadSelect.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarAssign.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarCreate.java68
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarDelete.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarEvaluateExpression.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoExpression.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoNumChildren.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoPathExpression.java51
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoType.java48
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarListChildren.java49
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarSetFormat.java71
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarShowAttributes.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarShowFormat.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java51
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/IMIDMEvent.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIBreakpointChangedEvent.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIBreakpointHitEvent.java92
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIDetachedEvent.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIErrorEvent.java101
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIEvent.java57
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIFunctionFinishedEvent.java114
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIGDBExitEvent.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIInferiorExitEvent.java81
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIInferiorSignalExitEvent.java85
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MILocationReachedEvent.java48
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIRunningEvent.java59
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISharedLibEvent.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISignalChangedEvent.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISignalEvent.java104
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISteppingRangeEvent.java49
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIStoppedEvent.java94
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadCreatedEvent.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadExitEvent.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadGroupCreatedEvent.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadGroupExitedEvent.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIWatchpointScopeEvent.java92
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIWatchpointTriggerEvent.java184
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java105
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java95
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIMonitorListProcessesInfo.java100
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetAttributesInfo.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetChildCountInfo.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetChildrenInfo.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetValueInfo.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetVarInfo.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java132
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIAsyncRecord.java76
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java86
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java294
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIConsoleStreamOutput.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIConst.java124
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java164
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataEvaluateExpressionInfo.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java79
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java104
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataReadMemoryInfo.java248
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataWriteMemoryInfo.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIExecAsyncOutput.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java136
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBShowExitCodeInfo.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfo.java100
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java145
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIList.java61
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java148
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MILogStreamOutput.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java97
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MINotifyAsyncOutput.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIOOBRecord.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIOutput.java58
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java560
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java98
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResultRecord.java69
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackInfoDepthInfo.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java79
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java78
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListLocalsInfo.java55
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStatusAsyncOutput.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStreamRecord.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITargetStreamOutput.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThread.java139
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java135
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadListIdsInfo.java89
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIValue.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVar.java79
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarAssignInfo.java45
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarChange.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarCreateInfo.java90
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarDeleteInfo.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarEvaluateExpressionInfo.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoExpressionInfo.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoNumChildrenInfo.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoPathExpressionInfo.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoTypeInfo.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java84
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarSetFormatInfo.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarShowAttributesInfo.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarShowFormatInfo.java57
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java103
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/.classpath7
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/.externalToolBuilders/TestAppBuilder.launch21
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/.project38
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/META-INF/MANIFEST.MF18
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/TestAppBuilder.xml19
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/about.html24
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/build.properties5
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/BreakpointTestApp.cc47
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/ExpressionTestApp.cc298
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/GDBMIGenericTestApp.cc15
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile14
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/MemoryTestApp.cc38
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/MultiThread.cc29
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/SpecialTestApp.cc15
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/plugin.xml16
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/ClassAccessor.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/AllTests.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMIBreakInsertCommand.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMICommandConstructCommand.java65
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/AllTests.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/ExampleTest.java117
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/ExpressionServiceTest.java2987
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/GDBProcessesTest.java183
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIBreakpointsTest.java2822
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIDisassemblyTest.java596
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIMemoryTest.java1660
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRegistersTest.java418
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRunControlTest.java568
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/AsyncCompletionWaitor.java125
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BackgroundRunner.java134
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java119
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java104
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java342
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/launching/TestLaunchDelegate.java159
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/launching/TestsPlugin.java97
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/.classpath7
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/.options10
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/.project34
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/.settings/.api_filters11
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF47
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/about.html24
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/build.properties17
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/disassembly.gifbin0 -> 145 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/library_obj.gifbin0 -> 338 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/library_syms_obj.gifbin0 -> 570 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/refresh.gifbin0 -> 385 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/refreshall.gifbin0 -> 578 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/refreshalways.gifbin0 -> 358 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/refreshmanual.gifbin0 -> 244 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/icons/refreshonbreak.gifbin0 -> 331 bytes
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/plugin.properties13
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/plugin.xml599
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java143
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AddressRulerColumn.java185
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyDropAdapter.java121
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyEditor.java111
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyHyperlinkDetector.java101
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java69
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.java98
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.properties89
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java3441
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyRulerColumn.java985
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyTextHover.java149
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyView.java98
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewer.java283
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewerConfiguration.java131
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/EditionFinderJob.java105
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/FunctionOffsetRulerColumn.java65
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/IDisassemblyHelpContextIds.java24
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/IDisassemblyPart.java102
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java78
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyAction.java63
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyBreakpointRulerAction.java77
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerAction.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java167
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/ActionGotoAddress.java65
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/ActionGotoProgramCounter.java26
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/ActionGotoSymbol.java60
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/ActionOpenPreferences.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/BreakpointPropertiesRulerAction.java82
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/BreakpointPropertiesRulerActionDelegate.java30
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/TextOperationAction.java58
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/Addr2Line.java25
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/AddressRangePosition.java66
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java229
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java1423
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyPosition.java49
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyWithSourcePosition.java46
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/ErrorPosition.java40
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/LabelPosition.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/SourceDocumentProvider.java117
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/SourceEditorInput.java35
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/SourceFileInfo.java187
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/SourcePosition.java50
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/SourceReadingJob.java80
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferenceConstants.java84
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java313
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java350
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourceTag.java207
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourceTagProvider.java95
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/DisassemblyIPAnnotation.java79
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/ISourcePresentationCreator.java35
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/ISourceRange.java30
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/ISourceTag.java83
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/ISourceTagListener.java24
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/ISourceTagProvider.java49
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourcePresentationCreatorFactory.java25
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java375
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/IFileRider.java119
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/REDDocument.java46
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/REDFile.java480
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/REDFileRider.java149
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/REDRun.java149
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/REDTextStore.java874
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/StringRider.java100
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/text/StringTextStore.java70
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/util/HSL.java111
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/util/StorageEditorInput.java113
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/DecoratingIntegerFieldEditor.java95
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/DecoratingStringFieldEditor.java113
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/DsfDebugPreferencePage.java109
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/IntegerWithBooleanFieldEditor.java141
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/MessagesForPreferences.java36
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/StringWithBooleanFieldEditor.java146
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/messages.properties16
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/MessagesForVMActions.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/RefreshActionDelegate.java50
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/RefreshAllRetargetAction.java37
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/RefreshHandler.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/RetargetDebugContextAction.java151
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java110
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesPropertyTester.java78
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdateScopesContribution.java110
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdateScopesPropertyTester.java78
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/messages.properties16
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/DetailPaneMaxLengthAction.java44
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/DetailPaneMaxLengthDialog.java180
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/DetailPaneWordWrapAction.java54
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/MessagesForDetailPane.java40
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/TextViewerAction.java86
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/detailsupport/messages.properties25
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java1218
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java71
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/IDsfDebugUIConstants.java113
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/PreferenceInitializer.java65
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java113
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java76
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoCommand.java88
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepOverCommand.java88
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepReturnCommand.java75
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSteppingModeTarget.java80
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java75
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/contexts/DsfSuspendTrigger.java121
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/memory/RefreshAction.java77
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/memory/SelectUpdatePolicyAction.java153
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java855
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerImageProvider.java45
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java264
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/SourceLookupResult.java129
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/AbstractDebugVMAdapter.java76
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/IDebugVMConstants.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java572
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java107
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java51
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/IRefreshAllTarget.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java137
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/AbstractExpressionVMNode.java178
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionColumnPresentation.java74
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java307
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java379
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderContentStragegy.java87
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderModelProxyStrategy.java179
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsBreakpointHitUpdatePolicy.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedEvent.java38
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java68
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsManualUpdatePolicy.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/IExpressionUpdate.java34
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/IExpressionVMNode.java63
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/InvalidExpressionVMContext.java88
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/MessagesForExpressionVM.java37
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/VMExpressionUpdate.java79
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java80
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionDelegate.java33
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/messages.properties21
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractContainerVMNode.java191
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java294
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractThreadVMNode.java328
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/DefaultDsfModelSelectionPolicyFactory.java44
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/DefaultDsfSelectionPolicy.java154
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/DelayedStackRefreshUpdatePolicy.java175
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/ExpandStackEvent.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/FullStackRefreshEvent.java28
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/LaunchRootVMNode.java130
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/LaunchVMUpdateMessages.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java724
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StandardProcessVMNode.java223
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/actions/ExpandStackAction.java87
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/ModulesVMNode.java180
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/ModulesVMProvider.java75
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPane.java525
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java50
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java172
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesMessages.java37
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesMessages.properties25
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValuePreferenceStore.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/IFormattedValuePreferenceStore.java28
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/IFormattedValueVMContext.java20
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/MessagesForNumberFormat.java35
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java126
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java88
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/messages.properties19
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/MessagesForRegisterVM.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterBitFieldCellModifier.java199
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterBitFieldVMNode.java901
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterCellModifier.java158
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterColumnPresentation.java73
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterGroupVMNode.java586
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterRootDMVMNode.java51
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMNode.java960
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMProvider.java271
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java813
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/messages.properties15
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/BreakpointHitUpdatePolicy.java45
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/MessagesForVMUpdate.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/messages.properties12
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/MessagesForVariablesVM.java34
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java543
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java138
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableColumnPresentation.java71
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java995
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMProvider.java140
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/messages.properties16
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java151
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java258
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java74
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerCountingRequestMonitor.java58
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java53
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java275
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMContext.java68
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMNode.java100
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java722
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java379
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java673
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IRootVMNode.java44
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMAdapter.java36
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMAdapterExtension.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMContext.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMEventListener.java40
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMModelProxy.java49
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMModelProxyExtension.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMNode.java116
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMProvider.java114
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/ModelProxyInstalledEvent.java52
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/RootVMNode.java71
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenCountUpdate.java59
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java122
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java358
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMHasChildrenUpdate.java59
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java186
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMAdapter.java102
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java411
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMProvider.java66
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java70
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/IDMVMContext.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/RootDMVMNode.java92
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/package.html32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/IElementPropertiesProvider.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/ILabelAttributeChangedListener.java19
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/IPropertiesUpdate.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelAttribute.java109
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColor.java71
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java158
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelFont.java57
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelImage.java53
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelText.java86
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/MessagesForProperties.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertyBasedLabelProvider.java268
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/messages.properties11
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java1090
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AllUpdateScope.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AutomaticUpdatePolicy.java50
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/ICachingVMProvider.java44
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/ICachingVMProviderExtension.java34
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IElementUpdateTester.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java53
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdateScope.java28
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/ManualUpdatePolicy.java106
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/MultiLevelUpdateHandler.java233
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UpdatePolicyDecorator.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java37
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/ViewModelUpdateMessages.java34
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/ViewModelUpdateMessages.properties14
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/VisibleUpdateScope.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf/.classpath7
-rw-r--r--dsf/org.eclipse.cdt.dsf/.cvsignore1
-rw-r--r--dsf/org.eclipse.cdt.dsf/.options3
-rw-r--r--dsf/org.eclipse.cdt.dsf/.project34
-rw-r--r--dsf/org.eclipse.cdt.dsf/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf/org.eclipse.cdt.dsf/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF23
-rw-r--r--dsf/org.eclipse.cdt.dsf/about.html24
-rw-r--r--dsf/org.eclipse.cdt.dsf/buckminster.cspex32
-rw-r--r--dsf/org.eclipse.cdt.dsf/build.properties17
-rw-r--r--dsf/org.eclipse.cdt.dsf/make/build.xml10
-rw-r--r--dsf/org.eclipse.cdt.dsf/make/dsf.jardesc16
-rw-r--r--dsf/org.eclipse.cdt.dsf/plugin.properties13
-rw-r--r--dsf/org.eclipse.cdt.dsf/plugin.xml5
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ConfinedToDsfExecutor.java38
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/CountingRequestMonitor.java99
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DataRequestMonitor.java50
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java374
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java139
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutor.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfRunnable.java23
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/IDsfStatusConstants.java48
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateExecutor.java59
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/Immutable.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/MultiRequestMonitor.java108
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/Query.java220
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java401
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitorWithProgress.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/Sequence.java682
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/StackTraceWrapper.java32
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ThreadSafe.java35
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ThreadSafeAndProhibitedFromDsfExecutor.java43
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java141
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMEvent.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/CompositeDMContext.java92
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/DMContexts.java157
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/IDMContext.java60
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/IDMData.java22
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/IDMEvent.java21
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/IDMService.java42
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/package.html26
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/IMemoryBlockUpdatePolicyProvider.java29
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlock.java634
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java505
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/AbstractDsfDebugServicesFactory.java69
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator.java886
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java36
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpoints.java140
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/ICachingService.java28
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IDisassembly.java91
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IDsfBreakpointExtension.java44
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IDsfDebugServicesFactory.java22
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IExpressions.java231
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IFormattedValues.java118
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IInstruction.java51
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IMemory.java118
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IMixedInstruction.java34
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IModules.java100
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IProcesses.java181
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IRegisters.java208
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IRunControl.java127
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/ISignals.java25
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/ISourceLookup.java39
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStack.java111
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStack2.java49
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStepQueueManager.java42
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/ISymbols.java54
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/StepQueueManager.java248
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/CommandCache.java549
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommand.java45
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommandControl.java72
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommandControlService.java67
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommandListener.java64
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommandResult.java27
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/ICommandToken.java23
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/IEventListener.java19
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/sourcelookup/DsfSourceLookupDirector.java39
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/sourcelookup/DsfSourceLookupParticipant.java229
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/DsfPlugin.java100
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/AbstractDsfService.java222
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/DsfServiceEventHandler.java43
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/DsfServices.java41
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/DsfServicesTracker.java169
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/DsfSession.java431
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/service/IDsfService.java99
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/.classpath7
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/.cvsignore1
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/.project28
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs65
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF24
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/about.html28
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/build.properties22
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/icons/full/obj16/pda.gifbin0 -> 182 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml106
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java266
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAUIPlugin.java155
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java130
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java225
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java52
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/AnnotationHover.java50
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistProcessor.java103
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistant.java43
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditor.java49
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditorMessages.properties15
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAScanner.java93
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDASourceViewerConfiguration.java64
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PopFrameActionDelegate.java90
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/TextHover.java83
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/WordFinder.java80
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDAMainTab.java190
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDATabGroup.java44
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAVMAdapter.java54
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java71
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAThreadsVMNode.java163
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAVirtualMachineVMNode.java187
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/.classpath8
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/.cvsignore1
-rwxr-xr-xdsf/org.eclipse.cdt.examples.dsf.pda/.options1
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/.project28
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/META-INF/MANIFEST.MF21
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/about.html28
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/build.properties22
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/docs/protocol.html308
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java1378
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest10.pda38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest2.pda48
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest3.pda13
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest6.pda31
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest8.pda14
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest9.pda23
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest_children.pda8
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/plugin.xml72
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/readme.html11
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/counter.pda11
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/drop.pda12
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/example.pda35
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/fibonacci.pda32
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/registers.pda72
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/stack.pda21
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/samples/structures.pda23
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/PDAPlugin.java212
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDALineBreakpoint.java83
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDAWatchpoint.java173
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java258
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunchDelegate.java161
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java137
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java142
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABackend.java320
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java135
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpoints.java403
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDACommandControl.java520
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java554
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARegisters.java556
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARunControl.java672
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java478
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStartedEvent.java26
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDATerminatedEvent.java26
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAThreadDMContext.java48
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java92
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/AbstractPDACommand.java71
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDABitField.java44
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAChildrenCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAClearBreakpointCommand.java36
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDACommandResult.java49
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADataCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADropFrameCommand.java47
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEvalCommand.java45
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEventStopCommand.java44
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAExitCommand.java35
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrame.java47
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommandResult.java31
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAGroupsCommand.java35
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAListResult.java45
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPopDataCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPushDataCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegister.java45
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommand.java35
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommandResult.java41
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAResumeCommand.java42
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetBreakpointCommand.java49
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetDataCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetVarCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommandResult.java42
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommand.java38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommandResult.java32
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepCommand.java47
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepReturnCommand.java47
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASuspendCommand.java42
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMResumeCommand.java39
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMSuspendCommand.java39
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVarCommand.java39
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java53
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourceLookupDirector.java25
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourcePathComputerDelegate.java62
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/BasicTests.java134
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/CommandControlTestsBase.java165
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/PDATestCommand.java29
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/PDATestEvent.java21
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test1.java46
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test10.java82
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test2.java199
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test3.java90
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test6.java84
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test8.java94
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/service/command/Test9.java192
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/tests/dsf/pda/util/Launching.java58
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/.classpath8
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/.externalToolBuilders/PreProcessor.launch15
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/.project38
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF18
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/about.html24
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/build.properties17
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/build_preprocess.xml54
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/alarm.gifbin0 -> 85 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/alarm_triggered.gifbin0 -> 206 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/layout.gifbin0 -> 857 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/remove.gifbin0 -> 163 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/sample.gifbin0 -> 983 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/icons/timer.gifbin0 -> 153 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/plugin.properties13
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/plugin.xml39
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java92
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserAction.java39
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserDialog.java113
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserModelAdapter.java62
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java99
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMContext.java41
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMNode.java314
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FilesystemRootsVMNode.java197
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/package.html127
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmService.java252
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmsVMNode.java107
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesShutdownSequence.java100
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesStartupSequence.java60
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimerService.java184
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersRootVMNode.java58
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMAdapter.java41
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMNode.java169
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMProvider.java121
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java325
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersViewColumnPresentation.java61
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java258
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggersVMNode.java201
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/doc-files/package-1.pngbin0 -> 14399 bytes
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java292
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/AsyncDataViewer.java276
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java438
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithThread.java242
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/IDataGenerator.java70
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java195
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/Async2Plus2.java44
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java62
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java146
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/.classpath7
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/.cvsignore1
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/.project28
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/META-INF/MANIFEST.MF17
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/about.html24
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/build.properties7
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/plugin.properties13
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/plugin.xml18
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/DsfTestPlugin.java69
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/TestDsfExecutor.java50
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java28
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/concurrent/DsfQueryTests.java216
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/concurrent/DsfSequenceProgressTests.java271
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/concurrent/DsfSequenceTests.java315
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/dm/DMContextsTest.java185
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/AbstractService.java110
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/Event1.java16
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/Event2.java15
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/EventTest.java147
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/Service1.java42
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/Service2.java43
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/Service3.java50
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/ShutdownSequence.java75
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/events/StartupSequence.java39
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/service/MultiInstanceTestService.java59
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/service/ServiceTests.java277
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/service/SimpleTestService.java53
876 files changed, 120844 insertions, 0 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.classpath b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.project b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.project
new file mode 100644
index 0000000000..3e2c012e7f
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.dsf.gdb.ui</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters
new file mode 100644
index 0000000000..f17a60ee7f
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component id="org.eclipse.cdt.dsf.gdb.ui" version="2">
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="META-INF/MANIFEST.MF">
+<filter id="923795461">
+<message_arguments>
+<message_argument value="1.1.0.qualifier"/>
+<message_argument value="1.0.0.v20080609"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GDBSolibBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GDBSolibBlock">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GDBSolibBlock"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.IMILaunchConfigurationComponent">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.IMILaunchConfigurationComponent"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/TCPSettingsBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.TCPSettingsBlock">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.TCPSettingsBlock"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbServerDebuggerPage.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbServerDebuggerPage">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbServerDebuggerPage"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/SolibSearchPathBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SolibSearchPathBlock">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SolibSearchPathBlock"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/LaunchUIMessages.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchUIMessages">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchUIMessages"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CLaunchConfigurationTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CLaunchConfigurationTab">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CLaunchConfigurationTab"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/SerialPortSettingsBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SerialPortSettingsBlock">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SerialPortSettingsBlock"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/AbstractCDebuggerTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AbstractCDebuggerTab">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AbstractCDebuggerTab"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbDebuggerPage.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CDebuggerTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/LaunchImages.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchImages">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchImages"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/ProcessPrompter.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ProcessPrompter">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ProcessPrompter"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ICDTLaunchHelpContextIds">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ICDTLaunchHelpContextIds"/>
+<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+</component>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/org.eclipse.jdt.core.prefs b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..e2b74ae779
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Tue Jun 24 11:04:56 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+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.5
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..6165783264
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.cdt.dsf,
+ org.eclipse.cdt.dsf.ui,
+ org.eclipse.debug.ui,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.cdt.dsf.gdb,
+ org.eclipse.cdt.debug.ui,
+ org.eclipse.cdt.core,
+ org.eclipse.cdt.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.core.variables
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.cdt.dsf.gdb.internal.ui.actions;x-internal:=true,
+ org.eclipse.cdt.dsf.gdb.internal.ui.breakpoints;x-internal:=true,
+ org.eclipse.cdt.dsf.gdb.internal.ui.launching;x-internal:=true,
+ org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel;x-internal:=true,
+ org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;x-internal:=true
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/about.html b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/about.html
new file mode 100644
index 0000000000..cb740ae8bc
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/about.html
@@ -0,0 +1,24 @@
+<!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 5, 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/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/build.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/build.properties
new file mode 100644
index 0000000000..4b33d1a92e
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2006, 2008 Wind River Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ icons/,\
+ plugin.properties
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif
new file mode 100644
index 0000000000..805a1d0ab8
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/connect.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/connect.gif
new file mode 100755
index 0000000000..866ad33825
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/connect.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/exec_obj.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/exec_obj.gif
new file mode 100644
index 0000000000..7b3a92e090
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/exec_obj.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/arguments_tab.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/arguments_tab.gif
new file mode 100644
index 0000000000..44660b5f0b
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/arguments_tab.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/debugger_tab.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/debugger_tab.gif
new file mode 100644
index 0000000000..d90a29fead
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/debugger_tab.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/main_tab.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/main_tab.gif
new file mode 100644
index 0000000000..b226e41c52
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/main_tab.gif
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties
new file mode 100644
index 0000000000..affa771608
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2008 Ericsson and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Ericsson - initial API and implementation
+###############################################################################
+pluginName=GDB DSF Debugger Integration UI
+providerName=Eclipse.org
+
+action.connect.label = Connect...
+action.connect.tooltip = Connect to a process
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
new file mode 100644
index 0000000000..2b4ad5f4e7
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.dsf.gdb.launch.localRunLaunchTabGroup"
+ type="org.eclipse.cdt.dsf.gdb.launch.localCLaunch">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchTabGroup"
+ type="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.dsf.gdb.launch.localAttachLaunchTabGroup"
+ type="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch">
+ </launchConfigurationTabGroup>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ configTypeID="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"
+ icon="icons/full/obj16/c_app.gif"
+ id="org.eclipse.cdt.dsf.gdb.launch.localRunLaunchImage">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ configTypeID="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"
+ icon="icons/full/obj16/c_app.gif"
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchImage">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ configTypeID="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"
+ icon="icons/full/obj16/c_app.gif"
+ id="org.eclipse.cdt.dsf.gdb.launch.attachRunLaunchImage">
+ </launchConfigurationTypeImage>
+ </extension>
+
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory"
+ adaptableType="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
+ <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider"/>
+ <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
+ <adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
+ <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory"/>
+ </factory>
+ </extension>
+
+ <extension point="org.eclipse.debug.ui.memoryRenderings">
+ <renderingBindings
+ defaultIds="org.eclipse.debug.ui.rendering.raw_memory"
+ primaryId="org.eclipse.debug.ui.rendering.raw_memory"
+ renderingIds="org.eclipse.debug.ui.rendering.raw_memory,org.eclipse.debug.ui.rendering.ascii,org.eclipse.debug.ui.rendering.signedint,org.eclipse.debug.ui.rendering.unsignedint">
+ <enablement>
+ <instanceof value="org.eclipse.cdt.dsf.debug.model.DsfMemoryBlock"/>
+ </enablement>
+ </renderingBindings>
+ </extension>
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page class="org.eclipse.cdt.dsf.gdb.internal.ui.breakpoints.CBreakpointGdbThreadFilterPage"
+ id="org.eclipse.cdt.dsf.gdb.breakpoint.filtering"
+ name="Filter">
+ <filter name="debugModelId" value="org.eclipse.cdt.dsf.gdb"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.cdt.debug.core.model.ICBreakpoint"/>
+ </enabledWhen>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.debug.core.statusHandlers">
+ <statusHandler
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ProcessPrompter"
+ code="100"
+ id="org.eclipse.cdt.dsf.gdb.ui.processPrompter"
+ plugin="org.eclipse.cdt.dsf.gdb.ui">
+ </statusHandler>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.debug.ui.CDebuggerPage">
+ <debuggerPage
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage"
+ debuggerID="org.eclipse.cdt.dsf.gdb.GdbDebugger"
+ id="org.eclipse.cdt.dsf.gdb.ui.GdbDebuggerPage">
+ </debuggerPage>
+ <debuggerPage
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbServerDebuggerPage"
+ debuggerID="org.eclipse.cdt.dsf.gdb.GdbServerDebugger"
+ id="org.eclipse.cdt.dsf.gdb.ui.GdbServerDebuggerPage">
+ </debuggerPage>
+ </extension>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <viewerContribution
+ id="org.eclipse.cdt.dsf.gdb.ui.debugview.context"
+ targetID="org.eclipse.debug.ui.DebugView">
+ <action
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.actions.ConnectActionDelegate"
+ icon="icons/full/obj16/connect.gif"
+ id="org.eclipse.cdt.dsf.gdb.ui.connect"
+ label="%action.connect.label"
+ menubarPath="threadGroup"
+ tooltip="%action.connect.tooltip">
+ <enablement>
+ <pluginState
+ id="org.eclipse.cdt.dsf.gdb.ui"
+ value="activated">
+ </pluginState>
+ </enablement>
+ </action>
+ <visibility>
+ <pluginState
+ id="org.eclipse.cdt.dsf.gdb.ui"
+ value="activated">
+ </pluginState>
+ </visibility>
+ </viewerContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.viewActions">
+ <viewContribution
+ id="org.eclipse.cdt.dsf.gdb.ui.debugview.toolbar"
+ targetID="org.eclipse.debug.ui.DebugView">
+ <action
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.actions.ConnectActionDelegate"
+ icon="icons/full/obj16/connect.gif"
+ id="org.eclipse.cdt.dsf.gdb.ui.connect"
+ label="%action.connect.label"
+ toolbarPath="threadGroup"
+ tooltip="%action.connect.tooltip">
+ <enablement>
+ <pluginState
+ id="org.eclipse.cdt.dsf.gdb.ui"
+ value="activated">
+ </pluginState>
+ </enablement>
+ </action>
+ </viewContribution>
+ </extension>
+
+</plugin>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
new file mode 100644
index 0000000000..6dd3e7cb61
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import org.eclipse.cdt.debug.core.model.IRestart;
+import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfResumeCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepIntoCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepOverCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepReturnCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfSteppingModeTarget;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfSuspendCommand;
+import org.eclipse.cdt.dsf.debug.ui.contexts.DsfSuspendTrigger;
+import org.eclipse.cdt.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.actions.DefaultRefreshAllTarget;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.actions.IRefreshAllTarget;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.DefaultDsfModelSelectionPolicyFactory;
+import org.eclipse.cdt.dsf.gdb.actions.IConnect;
+import org.eclipse.cdt.dsf.gdb.internal.ui.actions.DsfTerminateCommand;
+import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbConnectCommand;
+import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbDisconnectCommand;
+import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbRestartCommand;
+import org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.GdbViewModelAdapter;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchesListener2;
+import org.eclipse.debug.core.commands.IDisconnectHandler;
+import org.eclipse.debug.core.commands.IResumeHandler;
+import org.eclipse.debug.core.commands.IStepIntoHandler;
+import org.eclipse.debug.core.commands.IStepOverHandler;
+import org.eclipse.debug.core.commands.IStepReturnHandler;
+import org.eclipse.debug.core.commands.ISuspendHandler;
+import org.eclipse.debug.core.commands.ITerminateHandler;
+import org.eclipse.debug.core.model.IDebugModelProvider;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
+import org.eclipse.debug.ui.contexts.ISuspendTrigger;
+import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
+
+/**
+ * This implementation of platform adapter factory only retrieves the adapters
+ * for the launch object. But it also manages the creation and destruction
+ * of the session-based adapters which are returned by the
+ * IDMContext.getAdapter() methods.
+ */
+@ThreadSafe
+@SuppressWarnings({"restriction"})
+public class GdbAdapterFactory
+ implements IAdapterFactory, ILaunchesListener2
+{
+ @Immutable
+ class SessionAdapterSet {
+ final GdbLaunch fLaunch;
+ final GdbViewModelAdapter fViewModelAdapter;
+ final DsfSourceDisplayAdapter fSourceDisplayAdapter;
+ final DsfStepIntoCommand fStepIntoCommand;
+ final DsfStepOverCommand fStepOverCommand;
+ final DsfStepReturnCommand fStepReturnCommand;
+ final DsfSuspendCommand fSuspendCommand;
+ final DsfResumeCommand fResumeCommand;
+ final GdbRestartCommand fRestartCommand;
+ final DsfTerminateCommand fTerminateCommand;
+ final GdbConnectCommand fConnectCommand;
+ final GdbDisconnectCommand fDisconnectCommand;
+ final IDebugModelProvider fDebugModelProvider;
+ final DsfSuspendTrigger fSuspendTrigger;
+ final DsfSteppingModeTarget fSteppingModeTarget;
+ final IModelSelectionPolicyFactory fModelSelectionPolicyFactory;
+ final SteppingController fSteppingController;
+ final DefaultRefreshAllTarget fRefreshAllTarget;
+
+ SessionAdapterSet(GdbLaunch launch) {
+ fLaunch = launch;
+ DsfSession session = launch.getSession();
+
+ // register stepping controller
+ fSteppingController = new SteppingController(session);
+ session.registerModelAdapter(SteppingController.class, fSteppingController);
+
+ fViewModelAdapter = new GdbViewModelAdapter(session, fSteppingController);
+
+ if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
+ fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator(), fSteppingController);
+ } else {
+ fSourceDisplayAdapter = null;
+ }
+ session.registerModelAdapter(ISourceDisplay.class, fSourceDisplayAdapter);
+
+ fSteppingModeTarget= new DsfSteppingModeTarget();
+ fStepIntoCommand = new DsfStepIntoCommand(session, fSteppingModeTarget);
+ fStepOverCommand = new DsfStepOverCommand(session, fSteppingModeTarget);
+ fStepReturnCommand = new DsfStepReturnCommand(session);
+ fSuspendCommand = new DsfSuspendCommand(session);
+ fResumeCommand = new DsfResumeCommand(session);
+ fRestartCommand = new GdbRestartCommand(session, fLaunch);
+ fTerminateCommand = new DsfTerminateCommand(session);
+ fConnectCommand = new GdbConnectCommand(session);
+ fDisconnectCommand = new GdbDisconnectCommand(session);
+ fSuspendTrigger = new DsfSuspendTrigger(session, fLaunch);
+ fModelSelectionPolicyFactory = new DefaultDsfModelSelectionPolicyFactory();
+ fRefreshAllTarget = new DefaultRefreshAllTarget();
+
+ session.registerModelAdapter(ISteppingModeTarget.class, fSteppingModeTarget);
+ session.registerModelAdapter(IStepIntoHandler.class, fStepIntoCommand);
+ session.registerModelAdapter(IStepOverHandler.class, fStepOverCommand);
+ session.registerModelAdapter(IStepReturnHandler.class, fStepReturnCommand);
+ session.registerModelAdapter(ISuspendHandler.class, fSuspendCommand);
+ session.registerModelAdapter(IResumeHandler.class, fResumeCommand);
+ session.registerModelAdapter(IRestart.class, fRestartCommand);
+ session.registerModelAdapter(ITerminateHandler.class, fTerminateCommand);
+ session.registerModelAdapter(IConnect.class, fConnectCommand);
+ session.registerModelAdapter(IDisconnectHandler.class, fDisconnectCommand);
+ session.registerModelAdapter(IModelSelectionPolicyFactory.class, fModelSelectionPolicyFactory);
+ session.registerModelAdapter(IRefreshAllTarget.class, fRefreshAllTarget);
+
+ fDebugModelProvider = new IDebugModelProvider() {
+ // @see org.eclipse.debug.core.model.IDebugModelProvider#getModelIdentifiers()
+ public String[] getModelIdentifiers() {
+ return new String[] { GdbLaunchDelegate.GDB_DEBUG_MODEL_ID };
+ }
+ };
+ session.registerModelAdapter(IDebugModelProvider.class, fDebugModelProvider);
+
+ /*
+ * Registering the launch as an adapter, ensures that this launch,
+ * and debug model ID will be associated with all DMContexts from this
+ * session.
+ */
+ session.registerModelAdapter(ILaunch.class, fLaunch);
+ }
+
+ void dispose() {
+ DsfSession session = fLaunch.getSession();
+
+ fViewModelAdapter.dispose();
+
+ session.unregisterModelAdapter(ISourceDisplay.class);
+ if (fSourceDisplayAdapter != null) fSourceDisplayAdapter.dispose();
+
+ session.unregisterModelAdapter(SteppingController.class);
+ fSteppingController.dispose();
+
+ session.unregisterModelAdapter(ISteppingModeTarget.class);
+ session.unregisterModelAdapter(IStepIntoHandler.class);
+ session.unregisterModelAdapter(IStepOverHandler.class);
+ session.unregisterModelAdapter(IStepReturnHandler.class);
+ session.unregisterModelAdapter(ISuspendHandler.class);
+ session.unregisterModelAdapter(IResumeHandler.class);
+ session.unregisterModelAdapter(IRestart.class);
+ session.unregisterModelAdapter(ITerminateHandler.class);
+ session.unregisterModelAdapter(IConnect.class);
+ session.unregisterModelAdapter(IDisconnectHandler.class);
+ session.unregisterModelAdapter(IModelSelectionPolicyFactory.class);
+ session.unregisterModelAdapter(IRefreshAllTarget.class);
+
+ fStepIntoCommand.dispose();
+ fStepOverCommand.dispose();
+ fStepReturnCommand.dispose();
+ fSuspendCommand.dispose();
+ fResumeCommand.dispose();
+ fRestartCommand.dispose();
+ fTerminateCommand.dispose();
+ fConnectCommand.dispose();
+ fDisconnectCommand.dispose();
+ fSuspendTrigger.dispose();
+ }
+ }
+
+ /**
+ * Active adapter sets. They are accessed using the launch instance
+ * which owns the debug services session.
+ */
+ private static Map<GdbLaunch, SessionAdapterSet> fgLaunchAdapterSets =
+ Collections.synchronizedMap(new HashMap<GdbLaunch, SessionAdapterSet>());
+
+ /**
+ * Map of launches for which adapter sets have already been disposed.
+ * This map (used as a set) is maintained in order to avoid re-creating an
+ * adapter set after the launch was removed from the launch manager, but
+ * while the launch is still being held by other classes which may
+ * request its adapters. A weak map is used to avoid leaking
+ * memory once the launches are no longer referenced.
+ * <p>
+ * Access to this map is synchronized using the fgLaunchAdapterSets
+ * instance.
+ * </p>
+ */
+ private static Map<ILaunch, SessionAdapterSet> fgDisposedLaunchAdapterSets =
+ new WeakHashMap<ILaunch, SessionAdapterSet>();
+
+ static void disposeAdapterSet(ILaunch launch) {
+ synchronized(fgLaunchAdapterSets) {
+ if ( fgLaunchAdapterSets.containsKey(launch) ) {
+ fgLaunchAdapterSets.remove(launch).dispose();
+ fgDisposedLaunchAdapterSets.put(launch, null);
+ }
+ }
+ }
+
+ public GdbAdapterFactory() {
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+ }
+
+ /**
+ * This method only actually returns adapters for the launch object.
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (!(adaptableObject instanceof GdbLaunch)) return null;
+
+ GdbLaunch launch = (GdbLaunch)adaptableObject;
+
+ // Check for valid session.
+ // Note: even if the session is no longer active, the adapter set
+ // should still be returned. This is because the view model may still
+ // need to show elements representing a terminated process/thread/etc.
+ DsfSession session = launch.getSession();
+ if (session == null) return null;
+
+ // Find the correct set of adapters based on the launch session-ID. If not found
+ // it means that we have a new launch and new session, and we have to create a
+ // new set of adapters.
+
+ SessionAdapterSet adapterSet;
+ synchronized(fgLaunchAdapterSets) {
+ // The adapter set for the given launch was already disposed.
+ // Return a null adapter.
+ if (fgDisposedLaunchAdapterSets.containsKey(launch)) {
+ return null;
+ }
+ adapterSet = fgLaunchAdapterSets.get(launch);
+ if (adapterSet == null) {
+ adapterSet = new SessionAdapterSet(launch);
+ fgLaunchAdapterSets.put(launch, adapterSet);
+ }
+ }
+
+ // Returns the adapter type for the launch object.
+ if (adapterType.equals(IElementContentProvider.class)) return adapterSet.fViewModelAdapter;
+ else if (adapterType.equals(IModelProxyFactory.class)) return adapterSet.fViewModelAdapter;
+ else if (adapterType.equals(IColumnPresentationFactory.class)) return adapterSet.fViewModelAdapter;
+ else if (adapterType.equals(ISuspendTrigger.class)) return adapterSet.fSuspendTrigger;
+ else return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Class[] getAdapterList() {
+ return new Class[] {
+ IElementContentProvider.class, IModelProxyFactory.class, ISuspendTrigger.class,
+ IColumnPresentationFactory.class
+ };
+ }
+
+ public void launchesRemoved(ILaunch[] launches) {
+ // Dispose the set of adapters for a launch only after the launch is
+ // removed.
+ for (ILaunch launch : launches) {
+ if (launch instanceof GdbLaunch) {
+ disposeAdapterSet(launch);
+ }
+ }
+ }
+
+ public void launchesTerminated(ILaunch[] launches) {
+ }
+
+ public void launchesAdded(ILaunch[] launches) {
+ }
+
+ public void launchesChanged(ILaunch[] launches) {
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java
new file mode 100644
index 0000000000..383de2ec65
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Ericsson - modified to remove dependency on cdt.launch
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui;
+
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class GdbUIPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.cdt.dsf.gdb.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static GdbUIPlugin plugin;
+
+ private static BundleContext fgBundleContext;
+
+ /**
+ * The constructor
+ */
+ public GdbUIPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ fgBundleContext = context;
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ disposeAdapterSets();
+ plugin = null;
+ super.stop(context);
+ fgBundleContext = null;
+ }
+
+ /**
+ * Dispose adapter sets for all launches.
+ */
+ private void disposeAdapterSets() {
+ for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
+ if (launch instanceof GdbLaunch) {
+ GdbAdapterFactory.disposeAdapterSet(launch);
+ }
+ }
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static GdbUIPlugin getDefault() {
+ return plugin;
+ }
+
+ public static BundleContext getBundleContext() {
+ return fgBundleContext;
+ }
+
+ /**
+ * copied from org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin
+ */
+ private static Shell debugDialogShell;
+
+ public static Shell getShell() {
+ if (getActiveWorkbenchShell() != null) {
+ return getActiveWorkbenchShell();
+ }
+ if (debugDialogShell != null) {
+ if (!debugDialogShell.isDisposed())
+ return debugDialogShell;
+ debugDialogShell = null;
+ }
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ return windows[0].getShell();
+ }
+
+ public static void setDialogShell(Shell shell) {
+ debugDialogShell = shell;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() == null) {
+ // If the default instance is not yet initialized,
+ // return a static identifier. This identifier must
+ // match the plugin id defined in plugin.xml
+ return PLUGIN_ID;
+ }
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+ /**
+ * Logs the specified status with this plug-in's log.
+ *
+ * @param status
+ * status to log
+ */
+ public static void log(IStatus status) {
+ getDefault().getLog().log(status);
+ }
+ /**
+ * Logs an internal error with the specified message.
+ *
+ * @param message
+ * the error message to log
+ */
+ public static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
+ }
+
+ /**
+ * Logs an internal error with the specified throwable
+ *
+ * @param e
+ * the exception to be logged
+ */
+ public static void log(Throwable e) {
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e.getMessage(), e));
+ }
+
+ /**
+ * Returns the active workbench window
+ *
+ * @return the active workbench window
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ public static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow w = getActiveWorkbenchWindow();
+ if (w != null) {
+ return w.getActivePage();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the active workbench shell or <code>null</code> if none
+ *
+ * @return the active workbench shell or <code>null</code> if none
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ public static void errorDialog(String message, IStatus status) {
+ log(status);
+ Shell shell = getActiveWorkbenchShell();
+ if (shell != null) {
+ ErrorDialog.openError(shell, LaunchMessages.getString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
+ }
+ }
+
+ public static void errorDialog(String message, Throwable t) {
+ log(t);
+ Shell shell = getActiveWorkbenchShell();
+ if (shell != null) {
+ IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 1, t.getMessage(), null);
+ ErrorDialog.openError(shell, LaunchMessages.getString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
+ }
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ConnectActionDelegate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ConnectActionDelegate.java
new file mode 100644
index 0000000000..9be142bd96
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ConnectActionDelegate.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.actions.AbstractVMProviderActionDelegate;
+import org.eclipse.cdt.dsf.gdb.actions.IConnect;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewPart;
+
+/*
+ * Action to trigger a prompt for a process to attach to
+ */
+public class ConnectActionDelegate extends AbstractVMProviderActionDelegate {
+
+ /*
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ if (action.isEnabled()) {
+ // disable the action so it cannot be run again until an event or
+ // selection change updates the enablement
+ action.setEnabled(false);
+
+ final IConnect connectCommand = getConnectCommand();
+ if (connectCommand != null) {
+ connectCommand.connect(null);
+ }
+ }
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ super.init(view);
+ updateEnablement();
+ }
+
+ @Override
+ public void debugContextChanged(DebugContextEvent event) {
+ super.debugContextChanged(event);
+ updateEnablement();
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ super.selectionChanged(action, selection);
+ updateEnablement();
+ }
+
+ private void updateEnablement() {
+ boolean enabled = false;
+ final IConnect connectCommand = getConnectCommand();
+ if (connectCommand != null) {
+ enabled = connectCommand.canConnect();
+ }
+ getAction().setEnabled(enabled);
+ }
+
+ private IConnect getConnectCommand() {
+ IConnect command = null;
+ Object element = getViewerInput();
+ if (element instanceof IDMVMContext) {
+ IDMVMContext dmc = (IDMVMContext)element;
+ command = (IConnect)dmc.getAdapter(IConnect.class);
+ } else if (element instanceof GdbLaunch) {
+ GdbLaunch launch = (GdbLaunch)element;
+ command = (IConnect)launch.getSession().getModelAdapter(IConnect.class);
+ }
+
+ return command;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfTerminateCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfTerminateCommand.java
new file mode 100644
index 0000000000..bf600ec334
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfTerminateCommand.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Nokia - create and use backend service.
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfCommandRunnable;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.service.IGDBBackend;
+import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
+import org.eclipse.cdt.dsf.mi.service.IMIBackend;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.debug.core.commands.IEnabledStateRequest;
+import org.eclipse.debug.core.commands.ITerminateHandler;
+
+public class DsfTerminateCommand implements ITerminateHandler {
+ private final DsfExecutor fExecutor;
+ private final DsfServicesTracker fTracker;
+
+ public DsfTerminateCommand(DsfSession session) {
+ fExecutor = session.getExecutor();
+ fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
+ }
+
+ public void dispose() {
+ fTracker.dispose();
+ }
+
+ // Run control may not be avilable after a connection is terminated and shut down.
+ public void canExecute(final IEnabledStateRequest request) {
+ if (request.getElements().length != 1 ||
+ !(request.getElements()[0] instanceof IDMVMContext) )
+ {
+ request.setEnabled(false);
+ request.done();
+ return;
+ }
+
+ // Javac doesn't like the cast to "(AbstractDMVMLayoutNode<?>.DMVMContext)" need to use the
+ // construct below and suppress warnings.
+ IDMVMContext vmc = (IDMVMContext)request.getElements()[0];
+ final IExecutionDMContext dmc = DMContexts.getAncestorOfType(vmc.getDMContext(), IExecutionDMContext.class);
+ if (dmc == null) {
+ request.setEnabled(false);
+ request.done();
+ return;
+ }
+
+ fExecutor.execute(
+ new DsfRunnable() {
+ public void run() {
+ // Get the processes service and the exec context.
+ IGDBBackend gdbBackend = fTracker.getService(IGDBBackend.class);
+ if (gdbBackend == null || dmc == null) {
+ // Context or service already invalid.
+ request.setEnabled(false);
+ request.done();
+ } else {
+ // Check the terminate.
+ request.setEnabled(gdbBackend.getState() == IMIBackend.State.STARTED);
+ request.done();
+ }
+ }
+ });
+ }
+
+ public boolean execute(final IDebugCommandRequest request) {
+ if (request.getElements().length != 1) {
+ request.done();
+ return false;
+ }
+
+ fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
+ @Override public void doExecute() {
+ IGDBControl gdbControl = fTracker.getService(IGDBControl.class);
+ if (gdbControl != null) {
+ gdbControl.terminate(new RequestMonitor(fExecutor, null));
+ }
+ }
+ });
+ return false;
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java
new file mode 100644
index 0000000000..bdaabae761
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.core.IProcessInfo;
+import org.eclipse.cdt.dsf.concurrent.CountingRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
+import org.eclipse.cdt.dsf.gdb.actions.IConnect;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IStatusHandler;
+
+public class GdbConnectCommand implements IConnect {
+
+ private final DsfExecutor fExecutor;
+ private final DsfServicesTracker fTracker;
+
+ public GdbConnectCommand(DsfSession session) {
+ fExecutor = session.getExecutor();
+ fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
+ }
+
+ public void dispose() {
+ fTracker.dispose();
+ }
+
+ public boolean canConnect() {
+ Query<Boolean> canConnectQuery = new Query<Boolean>() {
+ @Override
+ public void execute(DataRequestMonitor<Boolean> rm) {
+ IProcesses procService = fTracker.getService(IProcesses.class);
+ ICommandControlService commandControl = fTracker.getService(ICommandControlService.class);
+
+ if (procService != null && commandControl != null) {
+ procService.isDebuggerAttachSupported(commandControl.getContext(), rm);
+ } else {
+ rm.setData(false);
+ rm.done();
+ }
+ }
+ };
+ try {
+ fExecutor.execute(canConnectQuery);
+ return canConnectQuery.get();
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ } catch (RejectedExecutionException e) {
+ // Can be thrown if the session is shutdown
+ }
+
+ return false;
+ }
+
+ // Need a job because prompter.handleStatus will block
+ class PromptForPidJob extends Job {
+
+ // The list of processes used in the case of an ATTACH session
+ IProcessInfo[] fProcessList = null;
+ DataRequestMonitor<Integer> fRequestMonitor;
+
+ public PromptForPidJob(String name, IProcessInfo[] procs, DataRequestMonitor<Integer> rm) {
+ super(name);
+ fProcessList = procs;
+ fRequestMonitor = rm;
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ IStatus promptStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 200/*STATUS_HANDLER_PROMPT*/, "", null); //$NON-NLS-1$//$NON-NLS-2$
+ final IStatus processPromptStatus = new Status(IStatus.INFO, "org.eclipse.cdt.dsf.gdb.ui", 100, "", null); //$NON-NLS-1$//$NON-NLS-2$
+
+ final IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus);
+
+ final Status NO_PID_STATUS = new Status(IStatus.ERROR, GdbUIPlugin.PLUGIN_ID, -1,
+ LaunchMessages.getString("LocalAttachLaunchDelegate.No_Process_ID_selected"), //$NON-NLS-1$
+ null);
+
+ if (prompter == null) {
+ fRequestMonitor.setStatus(NO_PID_STATUS);
+ fRequestMonitor.done();
+ return Status.OK_STATUS;
+ }
+
+ try {
+ Object result = prompter.handleStatus(processPromptStatus, fProcessList);
+ if (result instanceof Integer) {
+ fRequestMonitor.setData((Integer)result);
+ } else {
+ fRequestMonitor.setStatus(NO_PID_STATUS);
+ }
+ } catch (CoreException e) {
+ fRequestMonitor.setStatus(NO_PID_STATUS);
+ }
+ fRequestMonitor.done();
+
+ return Status.OK_STATUS;
+ }
+ };
+
+ public void connect(RequestMonitor requestMonitor)
+ {
+ // Create a fake rm to avoid null pointer exceptions
+ final RequestMonitor rm;
+ if (requestMonitor == null) {
+ rm = new RequestMonitor(fExecutor, null);
+ } else {
+ rm = requestMonitor;
+ }
+
+ // Don't wait for the operation to finish because this
+ // method can be called from the UI thread, and it will
+ // block it, which is bad, because we need to use the UI
+ // thread to prompt the user for the process to choose.
+ // This is why we simply use a DsfRunnable.
+ fExecutor.execute(new DsfRunnable() {
+ public void run() {
+ final IProcesses procService = fTracker.getService(IProcesses.class);
+ ICommandControlService commandControl = fTracker.getService(ICommandControlService.class);
+
+ if (procService != null && commandControl != null) {
+ final ICommandControlDMContext controlCtx = commandControl.getContext();
+ procService.getRunningProcesses(
+ controlCtx,
+ new DataRequestMonitor<IProcessDMContext[]>(fExecutor, rm) {
+ @Override
+ protected void handleSuccess() {
+
+ final List<IProcessInfo> procInfoList = new ArrayList<IProcessInfo>();
+
+ // For each process, obtain its name
+ // Once all the names are obtained, prompt the user for the pid to use
+ final CountingRequestMonitor countingRm =
+ new CountingRequestMonitor(fExecutor, rm) {
+ @Override
+ protected void handleSuccess() {
+ new PromptForPidJob(
+ "Prompt for Process", procInfoList.toArray(new IProcessInfo[0]), //$NON-NLS-1$
+ new DataRequestMonitor<Integer>(fExecutor, rm) {
+ @Override
+ protected void handleSuccess() {
+ // New cycle, look for service again
+ final IMIProcesses procService = fTracker.getService(IMIProcesses.class);
+ if (procService != null) {
+ IProcessDMContext procDmc = procService.createProcessContext(controlCtx,
+ Integer.toString(getData()));
+ procService.attachDebuggerToProcess(procDmc, new DataRequestMonitor<IDMContext>(fExecutor, rm));
+ }
+ }
+ }).schedule();
+ }
+ };
+
+ // New cycle, look for service again
+ final IProcesses procService = fTracker.getService(IProcesses.class);
+
+ if (procService != null) {
+ countingRm.setDoneCount(getData().length);
+
+ for (IProcessDMContext processCtx : getData()) {
+ procService.getExecutionData(
+ processCtx,
+ new DataRequestMonitor<IThreadDMData> (fExecutor, countingRm) {
+ @Override
+ protected void handleSuccess() {
+ int pid = 0;
+ try {
+ pid = Integer.parseInt(getData().getId());
+ } catch (NumberFormatException e) {
+ }
+ procInfoList.add(new ProcessInfo(pid, getData().getName()));
+ countingRm.done();
+ }
+ });
+ }
+ } else {
+ countingRm.setDoneCount(1);
+ countingRm.done();
+ }
+ }
+ });
+ } else {
+ rm.done();
+ }
+ }
+ });
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbDisconnectCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbDisconnectCommand.java
new file mode 100644
index 0000000000..4cdb70cfa5
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbDisconnectCommand.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfCommandRunnable;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.debug.core.commands.IDisconnectHandler;
+import org.eclipse.debug.core.commands.IEnabledStateRequest;
+
+public class GdbDisconnectCommand implements IDisconnectHandler {
+ private final DsfExecutor fExecutor;
+ private final DsfServicesTracker fTracker;
+
+ public GdbDisconnectCommand(DsfSession session) {
+ fExecutor = session.getExecutor();
+ fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
+ }
+
+ public void dispose() {
+ fTracker.dispose();
+ }
+
+ public void canExecute(final IEnabledStateRequest request) {
+ if (request.getElements().length != 1) {
+ request.setEnabled(false);
+ request.done();
+ return;
+ }
+
+ fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
+ @Override public void doExecute() {
+ IContainerDMContext containerDmc = DMContexts.getAncestorOfType(getContext(), IContainerDMContext.class);
+
+ getProcessService().canDetachDebuggerFromProcess(
+ containerDmc,
+ new DataRequestMonitor<Boolean>(fExecutor, null) {
+ @Override
+ protected void handleCompleted() {
+ request.setEnabled(isSuccess() && getData());
+ request.done();
+ }
+ });
+ }
+ });
+ }
+
+ public boolean execute(final IDebugCommandRequest request) {
+ if (request.getElements().length != 1) {
+ request.done();
+ return false;
+ }
+
+ fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
+ @Override public void doExecute() {
+ IContainerDMContext containerDmc = DMContexts.getAncestorOfType(getContext(), IContainerDMContext.class);
+ getProcessService().detachDebuggerFromProcess(containerDmc, new RequestMonitor(fExecutor, null));
+ }
+ });
+ return false;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbRestartCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbRestartCommand.java
new file mode 100644
index 0000000000..317ee34afb
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbRestartCommand.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.cdt.debug.core.model.IRestart;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.gdb.service.IGDBBackend;
+import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IProcess;
+
+public class GdbRestartCommand implements IRestart {
+ private final DsfExecutor fExecutor;
+ private final DsfServicesTracker fTracker;
+ private final GdbLaunch fLaunch;
+
+ public GdbRestartCommand(DsfSession session, GdbLaunch launch) {
+ fExecutor = session.getExecutor();
+ fLaunch = launch;
+ fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
+ }
+
+ public void dispose() {
+ fTracker.dispose();
+ }
+
+ // Run control may not be available after a connection is terminated and shut down.
+ public boolean canRestart() {
+ Query<Boolean> canRestart = new Query<Boolean>() {
+ @Override
+ protected void execute(DataRequestMonitor<Boolean> rm) {
+ IGDBControl gdbControl = fTracker.getService(IGDBControl.class);
+ if (gdbControl != null) {
+ rm.setData(gdbControl.canRestart());
+ } else {
+ rm.setData(false);
+ }
+
+ rm.done();
+ }
+ };
+
+ fExecutor.execute(canRestart);
+ try {
+ return canRestart.get();
+ } catch (InterruptedException e1) {
+ } catch (ExecutionException e1) {
+ }
+ return false;
+ }
+
+
+ public void restart() throws DebugException
+ {
+ final AtomicReference<IPath> execPathRef = new AtomicReference<IPath>();
+ Query<Object> restartQuery = new Query<Object>() {
+ @Override
+ protected void execute(final DataRequestMonitor<Object> rm) {
+ final IGDBControl gdbControl = fTracker.getService(IGDBControl.class);
+ final IGDBBackend backend = fTracker.getService(IGDBBackend.class);
+ if (gdbControl != null && backend != null) {
+ execPathRef.set(backend.getProgramPath());
+ gdbControl.initInferiorInputOutput(new RequestMonitor(fExecutor, rm) {
+ @Override
+ protected void handleSuccess() {
+ gdbControl.createInferiorProcess();
+ gdbControl.restart(fLaunch, rm);
+ }
+ });
+ } else {
+ rm.done();
+ }
+ }
+ };
+
+ fExecutor.execute(restartQuery);
+ try {
+ restartQuery.get();
+ } catch (InterruptedException e1) {
+ } catch (ExecutionException e1) {
+ }
+
+ // Now that we restarted the inferior, we must add it to our launch
+ // we must do this here because we cannot do it in the executor, or else
+ // it deadlocks
+ // We must first remove the old inferior from our launch (since it uses
+ // the same name and we use that name to find the old one)
+ //
+ // Remove
+ String inferiorLabel = execPathRef.get().lastSegment();
+
+ IProcess[] launchProcesses = fLaunch.getProcesses();
+ for (IProcess p : launchProcesses) {
+ if (p.getLabel().equals(inferiorLabel)) {
+ fLaunch.removeProcess(p);
+ break;
+ }
+ }
+ // Add
+ try {
+ fLaunch.addInferiorProcess(inferiorLabel);
+ } catch (CoreException e) {
+ throw new DebugException(e.getStatus());
+ }
+ }
+}
+
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ProcessInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ProcessInfo.java
new file mode 100644
index 0000000000..71033928bc
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ProcessInfo.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.actions;
+
+import org.eclipse.cdt.core.IProcessInfo;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+@Immutable
+class ProcessInfo implements IProcessInfo, Comparable<ProcessInfo> {
+ private final int pid;
+ private final String name;
+
+ public ProcessInfo(String pidString, String name) {
+ int tmpPid = 0;
+ try {
+ tmpPid = Integer.parseInt(pidString);
+ } catch (NumberFormatException e) {
+ }
+ this.pid = tmpPid;
+ this.name = name;
+ }
+
+ public ProcessInfo(int pid, String name) {
+ this.pid = pid;
+ this.name = name;
+ }
+
+ /**
+ * @see org.eclipse.cdt.core.IProcessInfo#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @see org.eclipse.cdt.core.IProcessInfo#getPid()
+ */
+ public int getPid() {
+ return pid;
+ }
+
+ public int compareTo(ProcessInfo other) {
+ int nameCompare = getName().compareTo(other.getName());
+ if (nameCompare != 0) return nameCompare;
+ else return (getPid() < other.getPid()) ? -1 : 1;
+ }
+} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
new file mode 100644
index 0000000000..7d585bce77
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.breakpoints;
+
+import org.eclipse.cdt.debug.core.model.ICBreakpoint;
+import org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class CBreakpointGdbThreadFilterPage extends PropertyPage {
+
+ private GdbThreadFilterEditor fThreadFilterEditor;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents( Composite parent ) {
+ noDefaultAndApplyButton();
+ Composite mainComposite = new Composite( parent, SWT.NONE );
+ mainComposite.setFont( parent.getFont() );
+ mainComposite.setLayout( new GridLayout() );
+ mainComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ createThreadFilterEditor( mainComposite );
+ setValid( true );
+ return mainComposite;
+ }
+
+ public ICBreakpoint getBreakpoint() {
+ return (ICBreakpoint)getElement().getAdapter(ICBreakpoint.class);
+ }
+
+ public CBreakpointGdbThreadsFilterExtension getFilterExtension() {
+ ICBreakpoint bp = getBreakpoint();
+ if (bp != null) {
+ try {
+ CBreakpointGdbThreadsFilterExtension filter =
+ (CBreakpointGdbThreadsFilterExtension) bp.getExtension(
+ GdbLaunchDelegate.GDB_DEBUG_MODEL_ID, CBreakpointGdbThreadsFilterExtension.class);
+ filter.initialize(bp);
+ return filter;
+ } catch (CoreException e) {}
+ }
+ return null;
+ }
+
+ protected void createThreadFilterEditor( Composite parent ) {
+ fThreadFilterEditor = new GdbThreadFilterEditor( parent, this );
+ }
+
+ protected GdbThreadFilterEditor getThreadFilterEditor() {
+ return fThreadFilterEditor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ doStore();
+ return super.performOk();
+ }
+
+ /**
+ * Stores the values configured in this page.
+ */
+ protected void doStore() {
+ fThreadFilterEditor.doStore();
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java
new file mode 100644
index 0000000000..83f4fc6819
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java
@@ -0,0 +1,553 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.breakpoints;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.debug.service.IProcesses;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
+import org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.gdb.service.IGDBBackend;
+import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
+import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
+import org.eclipse.cdt.dsf.mi.service.MIProcesses;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class GdbThreadFilterEditor {
+
+ /**
+ * Comment for ThreadFilterEditor.
+ */
+ public class CheckHandler implements ICheckStateListener {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
+ */
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ Object element = event.getElement();
+ if (element instanceof IContainerDMContext) {
+ checkTarget((IContainerDMContext) element, event.getChecked());
+ } else if (element instanceof IExecutionDMContext) {
+ checkThread((IExecutionDMContext) element, event.getChecked());
+ }
+ }
+
+ /**
+ * Check or uncheck a debug target in the tree viewer. When a debug
+ * target is checked, attempt to check all of the target's threads by
+ * default. When a debug target is unchecked, uncheck all its threads.
+ */
+ protected void checkTarget(IContainerDMContext target, boolean checked) {
+ getThreadViewer().setChecked(target, checked);
+ getThreadViewer().setGrayed(target, false);
+ getThreadViewer().expandToLevel(target, AbstractTreeViewer.ALL_LEVELS);
+ IExecutionDMContext[] threads = syncGetThreads(target);
+ for (int i = 0; i < threads.length; i++) {
+ getThreadViewer().setChecked(threads[i], checked);
+ getThreadViewer().setGrayed(threads[i], false);
+ }
+ }
+
+ /**
+ * Check or uncheck a thread. Update the thread's debug target.
+ */
+ protected void checkThread(IExecutionDMContext thread, boolean checked) {
+ getThreadViewer().setChecked(thread, checked);
+ IContainerDMContext target = DMContexts.getAncestorOfType(thread, IContainerDMContext.class);
+ IExecutionDMContext[] threads = syncGetThreads(target);
+ int checkedNumber = 0;
+ for (int i = 0; i < threads.length; i++) {
+ if (getThreadViewer().getChecked(threads[i])) {
+ ++checkedNumber;
+ }
+ }
+ if (checkedNumber == 0) {
+ getThreadViewer().setChecked(target, false);
+ getThreadViewer().setGrayed(target, false);
+ } else if (checkedNumber == threads.length) {
+ getThreadViewer().setChecked(target, true);
+ getThreadViewer().setGrayed(target, false);
+ } else {
+ getThreadViewer().setGrayChecked(target, true);
+ }
+ }
+ }
+
+ /**
+ * Comment for ThreadFilterEditor.
+ */
+ public class ThreadFilterContentProvider implements ITreeContentProvider {
+
+ /**
+ * Constructor for ThreadFilterContentProvider.
+ */
+ public ThreadFilterContentProvider() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object parent) {
+ if (parent instanceof IContainerDMContext) {
+ return syncGetThreads((IContainerDMContext) parent);
+ }
+
+ if (parent instanceof ILaunchManager) {
+ List<Object> children = new ArrayList<Object>();
+ ILaunch[] launches = ((ILaunchManager) parent).getLaunches();
+ IContainerDMContext target;
+ for (int i = 0; i < launches.length; i++) {
+ if (launches[i] instanceof GdbLaunch) {
+ target = syncGetContainer((GdbLaunch) launches[i]);
+ if (target != null) {
+ children.add(target);
+ }
+ }
+ }
+ return children.toArray();
+ }
+ return new Object[0];
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element instanceof IContainerDMContext) {
+ return DebugPlugin.getDefault().getLaunchManager();
+ }
+ if (element instanceof IExecutionDMContext) {
+ return DMContexts.getAncestorOfType((IExecutionDMContext) element, IContainerDMContext.class);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ }
+
+ public class ThreadFilterLabelProvider extends LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IContainerDMContext) {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET);
+ } else {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING);
+ }
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IContainerDMContext) {
+ return syncGetContainerLabel((IContainerDMContext)element);
+ } else {
+ return syncGetThreadLabel((IExecutionDMContext)element);
+ }
+ }
+ }
+
+
+ private CBreakpointGdbThreadFilterPage fPage;
+
+ private CheckboxTreeViewer fThreadViewer;
+
+ private ThreadFilterContentProvider fContentProvider;
+
+ private CheckHandler fCheckHandler;
+
+ /**
+ * Constructor for ThreadFilterEditor.
+ */
+ public GdbThreadFilterEditor(Composite parent, CBreakpointGdbThreadFilterPage page) {
+ fPage = page;
+ fContentProvider = new ThreadFilterContentProvider();
+ fCheckHandler = new CheckHandler();
+ createThreadViewer(parent);
+ }
+
+ protected CBreakpointGdbThreadFilterPage getPage() {
+ return fPage;
+ }
+
+ private void createThreadViewer(Composite parent) {
+ Label label = new Label(parent, SWT.NONE);
+ label.setText("&Restrict to Selected Targets and Threads:"); //$NON-NLS-1$
+ label.setFont(parent.getFont());
+ label.setLayoutData(new GridData());
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = 100;
+ fThreadViewer = new CheckboxTreeViewer(parent, SWT.BORDER);
+ fThreadViewer.addCheckStateListener(fCheckHandler);
+ fThreadViewer.getTree().setLayoutData(data);
+ fThreadViewer.getTree().setFont(parent.getFont());
+ fThreadViewer.setContentProvider(fContentProvider);
+ fThreadViewer.setLabelProvider(new ThreadFilterLabelProvider());
+ fThreadViewer.setInput(DebugPlugin.getDefault().getLaunchManager());
+ setInitialCheckedState();
+ }
+
+ /**
+ * Returns the debug targets that appear in the tree
+ */
+ protected IContainerDMContext[] getDebugTargets() {
+ Object input = fThreadViewer.getInput();
+ if (!(input instanceof ILaunchManager)) {
+ return new IContainerDMContext[0];
+ }
+ List<Object> targets = new ArrayList<Object>();
+ ILaunch[] launches = ((ILaunchManager) input).getLaunches();
+ IContainerDMContext target;
+ for (int i = 0; i < launches.length; i++) {
+ if (launches[i] instanceof GdbLaunch) {
+ target = syncGetContainer((GdbLaunch) launches[i]);
+ if (target != null) {
+ targets.add(target);
+ }
+ }
+ }
+ return targets.toArray(new IContainerDMContext[targets.size()]);
+ }
+
+ protected CheckboxTreeViewer getThreadViewer() {
+ return fThreadViewer;
+ }
+
+ /**
+ * Sets the initial checked state of the tree viewer. The initial state
+ * should reflect the current state of the breakpoint. If the breakpoint has
+ * a thread filter in a given thread, that thread should be checked.
+ */
+ protected void setInitialCheckedState() {
+ CBreakpointGdbThreadsFilterExtension filterExtension = fPage.getFilterExtension();
+ try {
+ IContainerDMContext[] targets = filterExtension.getTargetFilters();
+
+ // TODO: Hack to properly initialize the target/thread list
+ // Should be done in filterExtension.initialize() but we don't know
+ // how to get the target list from an ICBreakpoint...
+ if (targets.length == 0) {
+ targets = getDebugTargets();
+ for (IContainerDMContext target : targets) {
+ filterExtension.setTargetFilter(target);
+ }
+ }
+ // TODO: End of hack
+
+ for (int i = 0; i < targets.length; i++) {
+ IExecutionDMContext[] filteredThreads = filterExtension.getThreadFilters(targets[i]);
+ if (filteredThreads != null) {
+ for (int j = 0; j < filteredThreads.length; ++j)
+ fCheckHandler.checkThread(filteredThreads[j], true);
+ } else {
+ fCheckHandler.checkTarget(targets[i], true);
+ }
+ }
+ } catch (CoreException e) {
+ CDebugUIPlugin.log(e);
+ }
+ }
+
+ protected void doStore() {
+ CBreakpointGdbThreadsFilterExtension filterExtension = fPage.getFilterExtension();
+ IContainerDMContext[] targets = getDebugTargets();
+ for (int i = 0; i < targets.length; ++i) {
+ try {
+ if (getThreadViewer().getChecked(targets[i])) {
+ if (getThreadViewer().getGrayed(targets[i])) {
+ IExecutionDMContext[] threads = getTargetThreadFilters(targets[i]);
+ filterExtension.setThreadFilters(threads);
+ } else {
+ filterExtension.setTargetFilter(targets[i]);
+ }
+ } else {
+ filterExtension.removeTargetFilter(targets[i]);
+ }
+ DebugPlugin.getDefault().getBreakpointManager().fireBreakpointChanged(fPage.getBreakpoint());
+ } catch (CoreException e) {
+ CDebugUIPlugin.log(e);
+ }
+ }
+ }
+
+ private IExecutionDMContext[] getTargetThreadFilters(IContainerDMContext target) {
+ Object[] threads = ((ITreeContentProvider) getThreadViewer().getContentProvider()).getChildren(target);
+ ArrayList<Object> list = new ArrayList<Object>(threads.length);
+ for (int i = 0; i < threads.length; ++i) {
+ if (getThreadViewer().getChecked(threads[i]))
+ list.add(threads[i]);
+ }
+ return list.toArray(new IExecutionDMContext[list.size()]);
+ }
+
+ private IContainerDMContext syncGetContainer(final GdbLaunch launch) {
+ final DsfSession session = launch.getSession();
+
+ class ContainerQuery extends Query<IContainerDMContext> {
+ @Override
+ protected void execute(DataRequestMonitor<IContainerDMContext> rm) {
+ if (!session.isActive()) {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Launch's session not active.")); //$NON-NLS-1$
+ rm.done();
+ return;
+ }
+
+ ServiceTracker tracker1 = new ServiceTracker(GdbUIPlugin.getBundleContext(), ICommandControlService.class
+ .getName(), null);
+ tracker1.open();
+
+ ICommandControlService commandControl = (ICommandControlService) tracker1.getService();
+ ServiceTracker tracker2 = new ServiceTracker(GdbUIPlugin.getBundleContext(), IMIProcesses.class
+ .getName(), null);
+ tracker2.open();
+ IMIProcesses procService = (IMIProcesses) tracker2.getService();
+
+ if (commandControl != null && procService != null) {
+ IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
+ IContainerDMContext containerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
+
+ rm.setData(containerDmc);
+ } else {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control or Process service not accessible.")); //$NON-NLS-1$
+ }
+ rm.done();
+ tracker1.close();
+ tracker2.close();
+ }
+ }
+
+ ContainerQuery query = new ContainerQuery();
+ try {
+ session.getExecutor().execute(query);
+ return query.get();
+ } catch (RejectedExecutionException e) {
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ }
+ return null;
+ }
+
+ private IExecutionDMContext[] syncGetThreads(final IContainerDMContext container) {
+ final DsfSession session = DsfSession.getSession(container.getSessionId());
+ if (session == null) {
+ return new IExecutionDMContext[0];
+ }
+
+ class ThreadsQuery extends Query<IExecutionDMContext[]> {
+ @Override
+ protected void execute(DataRequestMonitor<IExecutionDMContext[]> rm) {
+ if (!session.isActive()) {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$
+ rm.done();
+ return;
+ }
+
+ ServiceTracker tracker = new ServiceTracker(GdbUIPlugin.getBundleContext(), IRunControl.class
+ .getName(), null);
+ tracker.open();
+ IRunControl runControl = (IRunControl) tracker.getService();
+ if (runControl != null) {
+ runControl.getExecutionContexts(container, rm);
+ } else {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$
+ rm.done();
+ }
+ tracker.close();
+ }
+ }
+
+ ThreadsQuery query = new ThreadsQuery();
+ try {
+ session.getExecutor().execute(query);
+ return query.get();
+ } catch (RejectedExecutionException e) {
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ }
+ return new IExecutionDMContext[0];
+ }
+
+ private String syncGetContainerLabel(final IContainerDMContext container) {
+ final DsfSession session = DsfSession.getSession(container.getSessionId());
+ if (session == null) {
+ return "Error reading data"; //$NON-NLS-1$
+ }
+
+ class ContainerLabelQuery extends Query<String> {
+ @Override
+ protected void execute(DataRequestMonitor<String> rm) {
+ if (!session.isActive()) {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$
+ rm.done();
+ return;
+ }
+
+ ServiceTracker tracker = new ServiceTracker(GdbUIPlugin.getBundleContext(), IGDBBackend.class
+ .getName(), null);
+ tracker.open();
+ IGDBBackend backend = (IGDBBackend) tracker.getService();
+ if (backend != null) {
+ rm.setData(backend.getProgramPath().toOSString());
+ } else {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Backend not accessible.")); //$NON-NLS-1$
+ }
+ rm.done();
+ tracker.close();
+ }
+ }
+
+ ContainerLabelQuery query = new ContainerLabelQuery();
+ try {
+ session.getExecutor().execute(query);
+ return query.get();
+ } catch (RejectedExecutionException e) {
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ }
+ return "Error reading data"; //$NON-NLS-1$
+ }
+
+ private String syncGetThreadLabel(final IExecutionDMContext thread) {
+ final DsfSession session = DsfSession.getSession(thread.getSessionId());
+ if (session == null) {
+ return "Error reading data"; //$NON-NLS-1$
+ }
+
+ class ThreadLabelQuery extends Query<String> {
+ @Override
+ protected void execute(final DataRequestMonitor<String> rm) {
+ if (!session.isActive()) {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$
+ rm.done();
+ return;
+ }
+
+ ServiceTracker tracker = new ServiceTracker(GdbUIPlugin.getBundleContext(), IProcesses.class
+ .getName(), null);
+ tracker.open();
+ IProcesses procService = (IProcesses) tracker.getService();
+ if (procService != null) {
+ IThreadDMContext threadDmc = DMContexts.getAncestorOfType(thread, IThreadDMContext.class);
+ procService.getExecutionData(threadDmc, new DataRequestMonitor<IThreadDMData>(
+ ImmediateExecutor.getInstance(), rm) {
+ @Override
+ protected void handleSuccess() {
+ final StringBuilder builder = new StringBuilder("Thread["); //$NON-NLS-1$
+ builder.append(((IMIExecutionDMContext)thread).getThreadId());
+ builder.append("] "); //$NON-NLS-1$
+ builder.append(getData().getId());
+ builder.append(getData().getName());
+
+ rm.setData(builder.toString());
+ rm.done();
+ }
+ });
+ } else {
+ rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "IProcesses service not accessible.")); //$NON-NLS-1$
+ rm.done();
+ }
+ tracker.close();
+ }
+ }
+
+ ThreadLabelQuery query = new ThreadLabelQuery();
+ try {
+ session.getExecutor().execute(query);
+ return query.get();
+ } catch (RejectedExecutionException e) {
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ }
+ return "Error reading data"; //$NON-NLS-1$
+ }
+
+ private Status getFailStatus(int code, String message) {
+ return new Status(IStatus.ERROR, GdbUIPlugin.PLUGIN_ID, code, message, null);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AbstractCDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AbstractCDebuggerTab.java
new file mode 100644
index 0000000000..99a5de88a7
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AbstractCDebuggerTab.java
@@ -0,0 +1,352 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - initial API and implementation
+ * IBM Corporation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.util.Map;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.core.ICDebugConfiguration;
+import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.debug.ui.ICDebuggerPage;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+
+public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
+
+ protected ILaunchConfiguration fLaunchConfiguration;
+ protected ILaunchConfigurationWorkingCopy fWorkingCopy;
+ protected ICDebugConfiguration fCurrentDebugConfig;
+
+ // Dynamic Debugger UI widgets
+ protected ICDebuggerPage fDynamicTab;
+ protected Composite fDynamicTabHolder;
+ private boolean fInitDefaults;
+ private Combo fDCombo;
+ private boolean fIsInitializing = false;
+ private boolean fPageUpdated;
+
+ protected void setDebugConfig(ICDebugConfiguration config) {
+ fCurrentDebugConfig = config;
+ }
+
+ protected ICDebugConfiguration getDebugConfig() {
+ return fCurrentDebugConfig;
+ }
+
+ protected ICDebuggerPage getDynamicTab() {
+ return fDynamicTab;
+ }
+
+ protected void setDynamicTab(ICDebuggerPage tab) {
+ fDynamicTab = tab;
+ }
+
+ protected Composite getDynamicTabHolder() {
+ return fDynamicTabHolder;
+ }
+
+ protected void setDynamicTabHolder(Composite tabHolder) {
+ fDynamicTabHolder = tabHolder;
+ }
+
+ protected ILaunchConfigurationWorkingCopy getLaunchConfigurationWorkingCopy() {
+ return fWorkingCopy;
+ }
+
+ protected void setLaunchConfiguration(ILaunchConfiguration launchConfiguration) {
+ fLaunchConfiguration = launchConfiguration;
+ setLaunchConfigurationWorkingCopy(null);
+ }
+
+ protected ILaunchConfiguration getLaunchConfiguration() {
+ return fLaunchConfiguration;
+ }
+
+ protected void setLaunchConfigurationWorkingCopy(ILaunchConfigurationWorkingCopy workingCopy) {
+ fWorkingCopy = workingCopy;
+ }
+
+ /**
+ * Overridden here so that any error message in the dynamic UI gets
+ * returned.
+ *
+ * @see ILaunchConfigurationTab#getErrorMessage()
+ */
+ @Override
+ public String getErrorMessage() {
+ ICDebuggerPage tab = getDynamicTab();
+ if ( (super.getErrorMessage() != null) || (tab == null)) {
+ return super.getErrorMessage();
+ }
+ return tab.getErrorMessage();
+ }
+
+ /**
+ * Notification that the user changed the selection of the Debugger.
+ */
+ protected void handleDebuggerChanged() {
+ loadDynamicDebugArea();
+
+ // always set the newly created area with defaults
+ ILaunchConfigurationWorkingCopy wc = getLaunchConfigurationWorkingCopy();
+ if (getDynamicTab() == null) {
+ // remove any debug specfic args from the config
+ if (wc == null) {
+ if (getLaunchConfiguration().isWorkingCopy()) {
+ wc = (ILaunchConfigurationWorkingCopy)getLaunchConfiguration();
+ }
+ }
+ if (wc != null) {
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null);
+ }
+ } else {
+ if (wc == null) {
+ try {
+ if (getLaunchConfiguration().isWorkingCopy()) {
+ setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy)getLaunchConfiguration());
+ } else {
+ setLaunchConfigurationWorkingCopy(getLaunchConfiguration().getWorkingCopy());
+ }
+ wc = getLaunchConfigurationWorkingCopy();
+
+ } catch (CoreException e) {
+ return;
+ }
+ }
+ if (initDefaults()) {
+ getDynamicTab().setDefaults(wc);
+ }
+ setInitializeDefault(false);
+ getDynamicTab().initializeFrom(wc);
+ }
+ }
+
+ /**
+ * Show the contributed piece of UI that was registered for the debugger id
+ * of the currently selected debugger.
+ */
+ protected void loadDynamicDebugArea() {
+ // Dispose of any current child widgets in the tab holder area
+ Control[] children = getDynamicTabHolder().getChildren();
+ for (int i = 0; i < children.length; i++) {
+ children[i].dispose();
+ }
+
+ // Retrieve the dynamic UI for the current Debugger
+ ICDebugConfiguration debugConfig = getConfigForCurrentDebugger();
+ if (debugConfig == null) {
+ setDynamicTab(null);
+ } else {
+ ICDebuggerPage tab = null;
+ try {
+ tab = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID());
+ } catch (CoreException e) {
+ GdbUIPlugin.errorDialog(LaunchMessages.getString("AbstractCDebuggerTab.ErrorLoadingDebuggerPage"), e.getStatus()); //$NON-NLS-1$
+ }
+ setDynamicTab(tab);
+ }
+ setDebugConfig(debugConfig);
+ if (getDynamicTab() == null) {
+ return;
+ }
+ // Ask the dynamic UI to create its Control
+ getDynamicTab().setLaunchConfigurationDialog(getLaunchConfigurationDialog());
+ getDynamicTab().createControl(getDynamicTabHolder());
+ getDynamicTab().getControl().setVisible(true);
+ getDynamicTabHolder().layout(true);
+ contentsChanged();
+ }
+
+ /**
+ * Called whenever the controls within the Debugger tab has changed.
+ */
+ protected void contentsChanged() {
+ }
+
+ abstract public void createControl(Composite parent);
+
+ @Override
+ public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
+ ICDebuggerPage dynamicTab = getDynamicTab();
+ if (dynamicTab != null) {
+ dynamicTab.activated(workingCopy);
+ }
+ }
+
+ public void initializeFrom(ILaunchConfiguration config) {
+ setLaunchConfiguration(config);
+ ICDebuggerPage dynamicTab = getDynamicTab();
+ if (dynamicTab != null) {
+ dynamicTab.initializeFrom(config);
+ }
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+ if (getDebugConfig() != null) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebugConfig().getID());
+ ICDebuggerPage dynamicTab = getDynamicTab();
+ if (dynamicTab == null) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null);
+ } else {
+ dynamicTab.performApply(config);
+ }
+ }
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ setLaunchConfigurationWorkingCopy(config);
+ ICDebuggerPage dynamicTab = getDynamicTab();
+ if (dynamicTab != null) {
+ dynamicTab.setDefaults(config);
+ setInitializeDefault(false);
+ }
+ }
+
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+ setErrorMessage(null);
+ setMessage(null);
+ if (getDebugConfig() == null) {
+ setErrorMessage(LaunchMessages.getString("AbstractCDebuggerTab.No_debugger_available")); //$NON-NLS-1$
+ return false;
+ }
+
+ ICDebuggerPage dynamicTab = getDynamicTab();
+ if (dynamicTab != null) {
+ return dynamicTab.isValid(config);
+ }
+ return true;
+ }
+
+ protected void setInitializeDefault(boolean init) {
+ fInitDefaults = init;
+ }
+
+ protected boolean initDefaults() {
+ return fInitDefaults;
+ }
+
+ @Override
+ public Image getImage() {
+ return LaunchImages.get(LaunchImages.IMG_VIEW_DEBUGGER_TAB);
+ }
+
+ public String getName() {
+ return LaunchMessages.getString("AbstractCDebuggerTab.Debugger"); //$NON-NLS-1$
+ }
+
+ protected void createDebuggerCombo(Composite parent, int colspan) {
+ Composite comboComp = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ comboComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = colspan;
+ comboComp.setLayoutData(gd);
+ Label dlabel = new Label(comboComp, SWT.NONE);
+ dlabel.setText(LaunchMessages.getString("Launch.common.DebuggerColon")); //$NON-NLS-1$
+ fDCombo = new Combo(comboComp, SWT.READ_ONLY | SWT.DROP_DOWN);
+ fDCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ fDCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ if (!isInitializing()) {
+ setInitializeDefault(true);
+ updateComboFromSelection();
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ protected void loadDebuggerCombo(ICDebugConfiguration[] debugConfigs, String current) {
+ fDCombo.removeAll();
+ int select = -1;
+ for (int i = 0; i < debugConfigs.length; i++) {
+ fDCombo.add(debugConfigs[i].getName());
+ fDCombo.setData(Integer.toString(i), debugConfigs[i]);
+ if (debugConfigs[i].getID().equalsIgnoreCase(current)) {
+ select = i;
+ }
+ }
+
+ fPageUpdated = false;
+ if (select != -1) {
+ fDCombo.select(select);
+ } else {
+ fDCombo.select(0);
+ }
+ //The behaviour is undefined for if the callbacks should be triggered
+ // for this,
+ //so force page update if needed.
+ if (!fPageUpdated) {
+ updateComboFromSelection();
+ }
+ fPageUpdated = false;
+ getControl().getParent().layout(true);
+
+ }
+
+ protected void createDebuggerGroup(Composite parent, int colspan) {
+ Group debuggerGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
+ debuggerGroup.setText(LaunchMessages.getString("CDebuggerTab.Debugger_Options")); //$NON-NLS-1$
+ setDynamicTabHolder(debuggerGroup);
+ GridLayout tabHolderLayout = new GridLayout();
+ tabHolderLayout.marginHeight = 0;
+ tabHolderLayout.marginWidth = 0;
+ tabHolderLayout.numColumns = 1;
+ getDynamicTabHolder().setLayout(tabHolderLayout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = colspan;
+ getDynamicTabHolder().setLayoutData(gd);
+ }
+
+ protected void updateComboFromSelection() {
+ fPageUpdated = true;
+ handleDebuggerChanged();
+ updateLaunchConfigurationDialog();
+ }
+
+ protected boolean isInitializing() {
+ return fIsInitializing;
+ }
+
+ protected void setInitializing(boolean isInitializing) {
+ fIsInitializing = isInitializing;
+ }
+
+ /**
+ * Return the class that implements <code>ICDebuggerPage</code>
+ * that is registered against the debugger id of the currently selected
+ * debugger.
+ */
+ protected ICDebugConfiguration getConfigForCurrentDebugger() {
+ int selectedIndex = fDCombo.getSelectionIndex();
+ return (ICDebugConfiguration)fDCombo.getData(Integer.toString(selectedIndex));
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java
new file mode 100644
index 0000000000..24c95429e7
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * IBM Corporation
+ * Ericsson - Updated for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * A launch configuration tab that displays and edits program arguments,
+ * and working directory launch configuration attributes.
+ * <p>
+ * This class may be instantiated. This class is not intended to be subclassed.
+ * </p>
+ */
+public class CArgumentsTab extends CLaunchConfigurationTab {
+
+ // Program arguments UI widgets
+ protected Label fPrgmArgumentsLabel;
+ protected Text fPrgmArgumentsText;
+ protected Button fArgumentVariablesButton;
+
+ // Working directory
+ protected WorkingDirectoryBlock fWorkingDirectoryBlock = new WorkingDirectoryBlock();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Font font = parent.getFont();
+ Composite comp = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ comp.setLayout(layout);
+ comp.setFont(font);
+
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ comp.setLayoutData(gd);
+ setControl(comp);
+
+ GdbUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
+
+ createArgumentComponent(comp, 1);
+
+ fWorkingDirectoryBlock.createControl(comp);
+ }
+
+ protected void createArgumentComponent(Composite comp, int horizontalSpan) {
+ Font font = comp.getFont();
+ Group group = new Group(comp, SWT.NONE);
+ group.setFont(font);
+ group.setLayout(new GridLayout());
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = horizontalSpan;
+ group.setLayoutData(gd);
+
+ group.setText(LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments")); //$NON-NLS-1$
+ fPrgmArgumentsText = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+ fPrgmArgumentsText.getAccessible().addAccessibleListener(
+ new AccessibleAdapter() {
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments"); //$NON-NLS-1$
+ }
+ }
+ );
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 40;
+ gd.widthHint = 100;
+ fPrgmArgumentsText.setLayoutData(gd);
+ fPrgmArgumentsText.setFont(font);
+ fPrgmArgumentsText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ fArgumentVariablesButton= createPushButton(group, LaunchMessages.getString("CArgumentsTab.Variables"), null); //$NON-NLS-1$
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ fArgumentVariablesButton.setLayoutData(gd);
+ fArgumentVariablesButton.addSelectionListener(new SelectionAdapter() {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent arg0) {
+ handleVariablesButtonSelected(fPrgmArgumentsText);
+ }
+
+ });
+ addControlAccessibleListener(fArgumentVariablesButton, fArgumentVariablesButton.getText()); // need to strip the mnemonic from buttons
+ }
+
+ /**
+ * A variable entry button has been pressed for the given text
+ * field. Prompt the user for a variable and enter the result
+ * in the given field.
+ */
+ protected void handleVariablesButtonSelected(Text textField) {
+ String variable = getVariable();
+ if (variable != null) {
+ textField.append(variable);
+ }
+ }
+
+ /**
+ * Prompts the user to choose and configure a variable and returns
+ * the resulting string, suitable to be used as an attribute.
+ */
+ private String getVariable() {
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+ dialog.open();
+ return dialog.getVariableExpression();
+ }
+
+ public void addControlAccessibleListener(Control control, String controlName) {
+ //strip mnemonic (&)
+ String[] strs = controlName.split("&"); //$NON-NLS-1$
+ StringBuffer stripped = new StringBuffer();
+ for (int i = 0; i < strs.length; i++) {
+ stripped.append(strs[i]);
+ }
+ control.getAccessible().addAccessibleListener(new ControlAccessibleListener(stripped.toString()));
+ }
+
+ private class ControlAccessibleListener extends AccessibleAdapter {
+ private String controlName;
+ ControlAccessibleListener(String name) {
+ controlName = name;
+ }
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = controlName;
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+ return fWorkingDirectoryBlock.isValid(config);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String) null);
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ try {
+ fPrgmArgumentsText.setText(configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "")); //$NON-NLS-1$
+ fWorkingDirectoryBlock.initializeFrom(configuration);
+ }
+ catch (CoreException e) {
+ setErrorMessage(LaunchMessages.getFormattedString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
+ GdbUIPlugin.log(e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(
+ ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+ getAttributeValueFrom(fPrgmArgumentsText));
+ fWorkingDirectoryBlock.performApply(configuration);
+ }
+
+ /**
+ * Retuns the string in the text widget, or <code>null</code> if empty.
+ *
+ * @return text or <code>null</code>
+ */
+ protected String getAttributeValueFrom(Text text) {
+ String content = text.getText().trim();
+ // bug #131513 - eliminate Windows \r line delimiter
+ content = content.replaceAll("\r\n", "\n"); //$NON-NLS-1$//$NON-NLS-2$
+ if (content.length() > 0) {
+ return content;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+ */
+ public String getName() {
+ return LaunchMessages.getString("CArgumentsTab.Arguments"); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setLaunchConfigurationDialog(org.eclipse.debug.ui.ILaunchConfigurationDialog)
+ */
+ @Override
+ public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) {
+ super.setLaunchConfigurationDialog(dialog);
+ fWorkingDirectoryBlock.setLaunchConfigurationDialog(dialog);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getErrorMessage()
+ */
+ @Override
+ public String getErrorMessage() {
+ String m = super.getErrorMessage();
+ if (m == null) {
+ return fWorkingDirectoryBlock.getErrorMessage();
+ }
+ return m;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getMessage()
+ */
+ @Override
+ public String getMessage() {
+ String m = super.getMessage();
+ if (m == null) {
+ return fWorkingDirectoryBlock.getMessage();
+ }
+ return m;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
+ */
+ @Override
+ public Image getImage() {
+ return LaunchImages.get(LaunchImages.IMG_VIEW_ARGUMENTS_TAB);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
+ */
+ @Override
+ protected void updateLaunchConfigurationDialog() {
+ super.updateLaunchConfigurationDialog();
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
new file mode 100644
index 0000000000..7660e19b6d
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
@@ -0,0 +1,439 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * Ken Ryall (Nokia) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=118894
+ * IBM Corporation
+ * Ericsson
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.io.IOException;
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.IBinaryParser;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.core.ICDebugConfiguration;
+import org.eclipse.cdt.debug.core.ICDebugConstants;
+import org.eclipse.cdt.debug.ui.ICDebuggerPage;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class CDebuggerTab extends AbstractCDebuggerTab {
+
+ private final static String LOCAL_DEBUGGER_ID = "org.eclipse.cdt.dsf.gdb.GdbDebugger";//$NON-NLS-1$
+ private final static String REMOTE_DEBUGGER_ID = "org.eclipse.cdt.dsf.gdb.GdbServerDebugger";//$NON-NLS-1$
+
+ protected boolean fAttachMode = false;
+ protected boolean fRemoteMode = false;
+
+ protected Button fStopInMain;
+ protected Text fStopInMainSymbol;
+
+ private ScrolledComposite fContainer;
+
+ private Composite fContents;
+
+ public CDebuggerTab(SessionType sessionType, boolean attach) {
+ if (sessionType == SessionType.REMOTE) fRemoteMode = true;
+ fAttachMode = attach;
+
+ ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDefaultDebugConfiguration();
+ if (dc == null) {
+ CDebugCorePlugin.getDefault().getPluginPreferences().setDefault(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE,
+ LOCAL_DEBUGGER_ID);
+ }
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ fContainer = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
+ fContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
+ fContainer.setLayout(new FillLayout());
+ fContainer.setExpandHorizontal(true);
+ fContainer.setExpandVertical(true);
+
+ fContents = new Composite(fContainer, SWT.NONE);
+ setControl(fContainer);
+ GdbUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
+ ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
+ int numberOfColumns = (fAttachMode) ? 2 : 1;
+ GridLayout layout = new GridLayout(numberOfColumns, false);
+ fContents.setLayout(layout);
+ GridData gd = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
+ fContents.setLayoutData(gd);
+
+ createDebuggerCombo(fContents, (fAttachMode) ? 1 : 2);
+ createOptionsComposite(fContents);
+ createDebuggerGroup(fContents, 2);
+
+ fContainer.setContent(fContents);
+ }
+
+ protected void loadDebuggerComboBox(ILaunchConfiguration config, String selection) {
+// String configPlatform = getPlatform(config);
+ ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
+ Arrays.sort(debugConfigs, new Comparator<ICDebugConfiguration>() {
+ public int compare(ICDebugConfiguration c1, ICDebugConfiguration c2) {
+ return Collator.getInstance().compare(c1.getName(), c2.getName());
+ }
+ });
+ List<ICDebugConfiguration> list = new ArrayList<ICDebugConfiguration>();
+ if (selection.equals("")) { //$NON-NLS-1$
+ ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDebugConfiguration();
+ if (dc == null) {
+ CDebugCorePlugin.getDefault().saveDefaultDebugConfiguration(LOCAL_DEBUGGER_ID);
+ dc = CDebugCorePlugin.getDefault().getDefaultDebugConfiguration();
+ }
+ if (dc != null)
+ selection = dc.getID();
+ }
+ String defaultSelection = selection;
+ for (ICDebugConfiguration debugConfig: debugConfigs) {
+ if (((fRemoteMode || fAttachMode) && debugConfig.getID().equals(REMOTE_DEBUGGER_ID)) ||
+ (!fRemoteMode && debugConfig.getID().equals(LOCAL_DEBUGGER_ID))) {
+// String debuggerPlatform = debugConfig.getPlatform();
+// if (validatePlatform(config, debugConfig)) {
+ list.add(debugConfig);
+// // select first exact matching debugger for platform or
+// // requested selection
+// if ((defaultSelection.equals("") && debuggerPlatform.equalsIgnoreCase(configPlatform))) { //$NON-NLS-1$
+// defaultSelection = debugConfig.getID();
+// }
+// }
+ }
+ }
+ // if no selection meaning nothing in config the force initdefault on tab
+ setInitializeDefault(selection.equals("") ? true : false); //$NON-NLS-1$
+ loadDebuggerCombo(list.toArray(new ICDebugConfiguration[list.size()]), defaultSelection);
+ }
+
+ @Override
+ protected void updateComboFromSelection() {
+ super.updateComboFromSelection();
+ initializeCommonControls(getLaunchConfiguration());
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ super.setDefaults(config);
+ if (fAttachMode && fRemoteMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE_ATTACH);
+ } else if (fAttachMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH);
+ } else if (fRemoteMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
+ } else {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
+ }
+
+ if (!fAttachMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
+ ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT);
+ }
+
+ // Set the default debugger based on the active toolchain on the project (if possible)
+ String defaultDebugger = null;
+ try {
+ String projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");//$NON-NLS-1$
+ if (projectName.length() > 0) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project);
+ ICConfigurationDescription configDesc = projDesc.getActiveConfiguration();
+ String configId = configDesc.getId();
+ ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
+ outer: for (int i = 0; i < debugConfigs.length; ++i) {
+ ICDebugConfiguration debugConfig = debugConfigs[i];
+ String[] patterns = debugConfig.getSupportedBuildConfigPatterns();
+ if (patterns != null) {
+ for (int j = 0; j < patterns.length; ++j) {
+ if (configId.matches(patterns[j])) {
+ defaultDebugger = debugConfig.getID();
+ break outer;
+ }
+ }
+ }
+ }
+ }
+ } catch (CoreException e) {
+ }
+
+ if (defaultDebugger == null) {
+ ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDebugConfiguration();
+ if (dc != null) {
+ defaultDebugger = dc.getID();
+ }
+ }
+
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, defaultDebugger);
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration config) {
+ setInitializing(true);
+ super.initializeFrom(config);
+ try {
+ String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""); //$NON-NLS-1$
+ loadDebuggerComboBox(config, id);
+ initializeCommonControls(config);
+ } catch (CoreException e) {
+ }
+ setInitializing(false);
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+ super.performApply(config);
+
+ if (fAttachMode && fRemoteMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE_ATTACH);
+ } else if (fAttachMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH);
+ } else if (fRemoteMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
+ } else {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
+ }
+ if (!fAttachMode) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
+ fStopInMain.getSelection());
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
+ fStopInMainSymbol.getText());
+
+ }
+ }
+
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+ if (!validateDebuggerConfig(config)) {
+ return false;
+ }
+// ICDebugConfiguration debugConfig = getDebugConfig();
+// if (fAttachMode && !debugConfig.supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH)) {
+// setErrorMessage(MessageFormat.format(LaunchMessages.getString("CDebuggerTab.Mode_not_supported"), //$NON-NLS-1$
+// (Object[]) new String[]{ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH}));
+// return false;
+// }
+// if (fRemoteMode && !debugConfig.supportsMode(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) {
+// setErrorMessage(MessageFormat.format(LaunchMessages.getString("CDebuggerTab.Mode_not_supported"), //$NON-NLS-1$
+// (Object[]) new String[]{IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE}));
+// return false;
+// }
+// if (!fAttachMode && !fRemoteMode && !debugConfig.supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
+// setErrorMessage(MessageFormat.format(LaunchMessages.getString("CDebuggerTab.Mode_not_supported"), //$NON-NLS-1$
+// (Object[]) new String[]{ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN}));
+// return false;
+// }
+ if (fStopInMain != null && fStopInMainSymbol != null) {
+ // The "Stop on startup at" field must not be empty
+ String mainSymbol = fStopInMainSymbol.getText().trim();
+ if (fStopInMain.getSelection() && mainSymbol.length() == 0) {
+ setErrorMessage(LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); //$NON-NLS-1$
+ return false;
+ }
+ }
+ if (super.isValid(config) == false) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean validatePlatform(ILaunchConfiguration config, ICDebugConfiguration debugConfig) {
+ String configPlatform = getPlatform(config);
+ String debuggerPlatform = debugConfig.getPlatform();
+ return (debuggerPlatform.equals("*") || debuggerPlatform.equalsIgnoreCase(configPlatform)); //$NON-NLS-1$
+ }
+
+ protected IBinaryObject getBinary(ILaunchConfiguration config) throws CoreException {
+ String programName = null;
+ String projectName = null;
+ try {
+ projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
+ } catch (CoreException e) {
+ }
+ if (programName != null) {
+ IPath exePath = new Path(programName);
+ if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (!project.isAccessible()) {
+ return null;
+ }
+ if (!exePath.isAbsolute()) {
+ exePath = project.getLocation().append(exePath);
+ }
+ ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project);
+ for (int i = 0; i < parserRef.length; i++) {
+ try {
+ IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension();
+ IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath);
+ if (exe != null) {
+ return exe;
+ }
+ } catch (ClassCastException e) {
+ } catch (IOException e) {
+ }
+ }
+ }
+ IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser();
+ try {
+ IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath);
+ return exe;
+ } catch (ClassCastException e) {
+ } catch (IOException e) {
+ }
+ }
+ return null;
+ }
+
+ protected boolean validateDebuggerConfig(ILaunchConfiguration config) {
+ ICDebugConfiguration debugConfig = getDebugConfig();
+ if (debugConfig == null) {
+ setErrorMessage(LaunchMessages.getString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$
+ return false;
+ }
+ // We do not validate platform and CPU compatibility to avoid accidentally disabling
+ // a valid configuration. It's much better to let an incompatible configuration through
+ // than to disable a valid one.
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
+ */
+ protected void update() {
+ if (!isInitializing()) {
+ super.updateLaunchConfigurationDialog();
+ }
+ }
+
+ protected void createOptionsComposite(Composite parent) {
+ Composite optionsComp = new Composite(parent, SWT.NONE);
+ int numberOfColumns = (fAttachMode) ? 1 : 3;
+ GridLayout layout = new GridLayout(numberOfColumns, false);
+ optionsComp.setLayout(layout);
+ optionsComp.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, 1, 1));
+ if (!fAttachMode) {
+ fStopInMain = createCheckButton(optionsComp, LaunchMessages.getString("CDebuggerTab.Stop_at_main_on_startup")); //$NON-NLS-1$
+ fStopInMain.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fStopInMainSymbol.setEnabled(fStopInMain.getSelection());
+ update();
+ }
+ });
+ fStopInMainSymbol = new Text(optionsComp, SWT.SINGLE | SWT.BORDER);
+ final GridData gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);
+ gridData.widthHint = 100;
+ fStopInMainSymbol.setLayoutData(gridData);
+ fStopInMainSymbol.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent evt) {
+ update();
+ }
+ });
+ fStopInMainSymbol.getAccessible().addAccessibleListener(
+ new AccessibleAdapter() {
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = LaunchMessages.getString("CDebuggerTab.Stop_at_main_on_startup"); //$NON-NLS-1$
+ }
+ }
+ );
+ }
+ }
+
+ @Override
+ protected Shell getShell() {
+ return super.getShell();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
+ */
+ @Override
+ public void dispose() {
+ ICDebuggerPage debuggerPage = getDynamicTab();
+ if (debuggerPage != null)
+ debuggerPage.dispose();
+ super.dispose();
+ }
+
+ protected void initializeCommonControls(ILaunchConfiguration config) {
+ try {
+ if (!fAttachMode) {
+ fStopInMain.setSelection(config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
+ ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT));
+ fStopInMainSymbol.setText(config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
+ ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT));
+ fStopInMainSymbol.setEnabled(fStopInMain.getSelection());
+ } else {
+ // In attach mode, figure out if we are doing a remote connect based on the currently
+ // chosen debugger
+ if (getDebugConfig().getID().equals(REMOTE_DEBUGGER_ID)) fRemoteMode = true;
+ else fRemoteMode = false;
+ }
+ } catch (CoreException e) {
+ }
+ }
+
+ @Override
+ protected void setInitializeDefault(boolean init) {
+ super.setInitializeDefault(init);
+ }
+
+ @Override
+ protected void contentsChanged() {
+ fContainer.setMinSize(fContents.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ }
+} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java
new file mode 100644
index 0000000000..665c0b48e4
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * Ken Ryall (Nokia) - bug 178731
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+
+public abstract class CLaunchConfigurationTab extends AbstractLaunchConfigurationTab {
+
+ /**
+ * Returns the current C element context from which to initialize default
+ * settings, or <code>null</code> if none. Note, if possible we will
+ * return the IBinary based on config entry as this may be more usefull then
+ * just the project.
+ *
+ * @return C element context.
+ */
+ protected ICElement getContext(ILaunchConfiguration config, String platform) {
+ String projectName = null;
+ String programName = null;
+ IWorkbenchPage page = GdbUIPlugin.getActivePage();
+ Object obj = null;
+ try {
+ projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
+ } catch (CoreException e) {
+ }
+ if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
+ if (cProject != null && cProject.exists()) {
+ obj = cProject;
+ }
+ } else {
+ if (page != null) {
+ ISelection selection = page.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ if (!ss.isEmpty()) {
+ obj = ss.getFirstElement();
+ }
+ }
+ }
+ }
+ if (obj instanceof IResource) {
+ ICElement ce = CoreModel.getDefault().create((IResource)obj);
+ if (ce == null) {
+ IProject pro = ((IResource)obj).getProject();
+ ce = CoreModel.getDefault().create(pro);
+ }
+ obj = ce;
+ }
+ if (obj instanceof ICElement) {
+ if (platform != null && !platform.equals("*")) { //$NON-NLS-1$
+ ICDescriptor descriptor;
+ try {
+ descriptor = CCorePlugin.getDefault().getCProjectDescription( ((ICElement)obj).getCProject().getProject(),
+ false);
+ if (descriptor != null) {
+ String projectPlatform = descriptor.getPlatform();
+ if (!projectPlatform.equals(platform) && !projectPlatform.equals("*")) { //$NON-NLS-1$
+ obj = null;
+ }
+ }
+ } catch (CoreException e) {
+ }
+ }
+ if (obj != null) {
+ if (programName == null || programName.equals("")) { //$NON-NLS-1$
+ return (ICElement)obj;
+ }
+ ICElement ce = (ICElement)obj;
+ IProject project;
+ project = (IProject)ce.getCProject().getResource();
+ IPath programFile = project.getFile(programName).getLocation();
+ ce = CCorePlugin.getDefault().getCoreModel().create(programFile);
+ if (ce != null && ce.exists()) {
+ return ce;
+ }
+ return (ICElement)obj;
+ }
+ }
+ IEditorPart part = page.getActiveEditor();
+ if (part != null) {
+ IEditorInput input = part.getEditorInput();
+ return (ICElement)input.getAdapter(ICElement.class);
+ }
+ return null;
+ }
+
+ /**
+ * Set the C project attribute based on the ICElement.
+ */
+ protected void initializeCProject(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
+ ICProject cProject = cElement.getCProject();
+ String name = null;
+ if (cProject != null && cProject.exists()) {
+ name = cProject.getElementName();
+ config.setMappedResources(new IResource[] {cProject.getProject()});
+
+ ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
+ String buildConfigID = projDes.getActiveConfiguration().getId();
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
+
+ }
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, name);
+
+ }
+
+ protected String getPlatform(ILaunchConfiguration config) {
+ String platform = Platform.getOS();
+ try {
+ return config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, platform);
+ } catch (CoreException e) {
+ return platform;
+ }
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java
new file mode 100644
index 0000000000..8178ab08ca
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java
@@ -0,0 +1,728 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - initial API and implementation
+ * Ken Ryall (Nokia) - bug 178731
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.IBinaryParser;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.cdt.ui.CElementLabelProvider;
+import org.eclipse.cdt.utils.pty.PTY;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.dialogs.TwoPaneElementSelector;
+
+/**
+ * A launch configuration tab that displays and edits project and main type name launch
+ * configuration attributes.
+ * <p>
+ * This class may be instantiated. This class is not intended to be subclassed.
+ * </p>
+ */
+
+public class CMainTab extends CLaunchConfigurationTab {
+
+ // Project UI widgets
+ protected Label fProjLabel;
+ protected Text fProjText;
+ protected Button fProjButton;
+
+ // Main class UI widgets
+ protected Label fProgLabel;
+ protected Text fProgText;
+ protected Button fSearchButton;
+
+ private final boolean fWantsTerminalOption;
+ protected Button fTerminalButton;
+
+ private final boolean dontCheckProgram;
+
+ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ private String filterPlatform = EMPTY_STRING;
+
+ public static final int WANTS_TERMINAL = 1;
+ public static final int DONT_CHECK_PROGRAM = 2;
+
+ public CMainTab() {
+ this(0);
+ }
+
+ public CMainTab(boolean terminalOption) {
+ this(terminalOption ? WANTS_TERMINAL : 0);
+ }
+
+ public CMainTab(int flags) {
+ fWantsTerminalOption = (flags & WANTS_TERMINAL) != 0;
+ dontCheckProgram = (flags & DONT_CHECK_PROGRAM) != 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ setControl(comp);
+
+ GdbUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);
+
+ GridLayout topLayout = new GridLayout();
+ comp.setLayout(topLayout);
+
+ createVerticalSpacer(comp, 1);
+ createProjectGroup(comp, 1);
+ createExeFileGroup(comp, 1);
+ createVerticalSpacer(comp, 1);
+ if (wantsTerminalOption() /* && ProcessFactory.supportesTerminal() */) {
+ createTerminalOption(comp, 1);
+ }
+ GdbUIPlugin.setDialogShell(parent.getShell());
+ }
+
+ protected void createProjectGroup(Composite parent, int colSpan) {
+ Composite projComp = new Composite(parent, SWT.NONE);
+ GridLayout projLayout = new GridLayout();
+ projLayout.numColumns = 2;
+ projLayout.marginHeight = 0;
+ projLayout.marginWidth = 0;
+ projComp.setLayout(projLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = colSpan;
+ projComp.setLayoutData(gd);
+
+ fProjLabel = new Label(projComp, SWT.NONE);
+ fProjLabel.setText(LaunchMessages.getString("CMainTab.&ProjectColon")); //$NON-NLS-1$
+ gd = new GridData();
+ gd.horizontalSpan = 2;
+ fProjLabel.setLayoutData(gd);
+
+ fProjText = new Text(projComp, SWT.SINGLE | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fProjText.setLayoutData(gd);
+ fProjText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ fProjButton = createPushButton(projComp, LaunchMessages.getString("Launch.common.Browse_1"), null); //$NON-NLS-1$
+ fProjButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleProjectButtonSelected();
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
+ protected void createExeFileGroup(Composite parent, int colSpan) {
+ Composite mainComp = new Composite(parent, SWT.NONE);
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.numColumns = 3;
+ mainLayout.marginHeight = 0;
+ mainLayout.marginWidth = 0;
+ mainComp.setLayout(mainLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = colSpan;
+ mainComp.setLayoutData(gd);
+ fProgLabel = new Label(mainComp, SWT.NONE);
+ fProgLabel.setText(LaunchMessages.getString("CMainTab.C/C++_Application")); //$NON-NLS-1$
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ fProgLabel.setLayoutData(gd);
+ fProgText = new Text(mainComp, SWT.SINGLE | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fProgText.setLayoutData(gd);
+ fProgText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ fSearchButton = createPushButton(mainComp, LaunchMessages.getString("CMainTab.Search..."), null); //$NON-NLS-1$
+ fSearchButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleSearchButtonSelected();
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ Button fBrowseForBinaryButton;
+ fBrowseForBinaryButton = createPushButton(mainComp, LaunchMessages.getString("Launch.common.Browse_2"), null); //$NON-NLS-1$
+ fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleBinaryBrowseButtonSelected();
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
+ protected boolean wantsTerminalOption() {
+ return fWantsTerminalOption;
+ }
+
+ protected void createTerminalOption(Composite parent, int colSpan) {
+ Composite mainComp = new Composite(parent, SWT.NONE);
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.numColumns = 1;
+ mainLayout.marginHeight = 0;
+ mainLayout.marginWidth = 0;
+ mainComp.setLayout(mainLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = colSpan;
+ mainComp.setLayoutData(gd);
+
+ fTerminalButton = createCheckButton(mainComp, LaunchMessages.getString("CMainTab.UseTerminal")); //$NON-NLS-1$
+ fTerminalButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ fTerminalButton.setEnabled(PTY.isSupported());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom(ILaunchConfiguration config) {
+ filterPlatform = getPlatform(config);
+ updateProjectFromConfig(config);
+ updateProgramFromConfig(config);
+ updateTerminalFromConfig(config);
+ }
+
+ protected void updateTerminalFromConfig(ILaunchConfiguration config) {
+ if (fTerminalButton != null) {
+ boolean useTerminal = true;
+ try {
+ useTerminal = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
+ } catch (CoreException e) {
+ GdbUIPlugin.log(e);
+ }
+ fTerminalButton.setSelection(useTerminal);
+ }
+ }
+
+ protected void updateProjectFromConfig(ILaunchConfiguration config) {
+ String projectName = EMPTY_STRING;
+ try {
+ projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
+ } catch (CoreException ce) {
+ GdbUIPlugin.log(ce);
+ }
+ fProjText.setText(projectName);
+ }
+
+ protected void updateProgramFromConfig(ILaunchConfiguration config) {
+ String programName = EMPTY_STRING;
+ try {
+ programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EMPTY_STRING);
+ } catch (CoreException ce) {
+ GdbUIPlugin.log(ce);
+ }
+ fProgText.setText(programName);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+ ICProject cProject = this.getCProject();
+ if (cProject != null)
+ {
+ config.setMappedResources(new IResource[] { cProject.getProject() });
+ try { // Only initialize the build config ID once.
+ if (config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, "").length() == 0)//$NON-NLS-1$
+ {
+ ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
+ if (projDes != null)
+ {
+ String buildConfigID = projDes.getActiveConfiguration().getId();
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
+ }
+ }
+ } catch (CoreException e) { e.printStackTrace(); }
+ } else {
+ config.setMappedResources(null);
+ }
+
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText());
+ if (fTerminalButton != null) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, fTerminalButton.getSelection());
+ }
+ }
+
+ /**
+ * Show a dialog that lists all main types
+ */
+ protected void handleSearchButtonSelected() {
+
+ if (getCProject() == null) {
+ MessageDialog.openInformation(getShell(), LaunchMessages.getString("CMainTab.Project_required"), //$NON-NLS-1$
+ LaunchMessages.getString("CMainTab.Enter_project_before_searching_for_program")); //$NON-NLS-1$
+ return;
+ }
+
+ ILabelProvider programLabelProvider = new CElementLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IBinary) {
+ IBinary bin = (IBinary)element;
+ StringBuffer name = new StringBuffer();
+ name.append(bin.getPath().lastSegment());
+ return name.toString();
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (! (element instanceof ICElement)) {
+ return super.getImage(element);
+ }
+ ICElement celement = (ICElement)element;
+
+ if (celement.getElementType() == ICElement.C_BINARY) {
+ IBinary belement = (IBinary)celement;
+ if (belement.isExecutable()) {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_ACT_RUN);
+ }
+ }
+
+ return super.getImage(element);
+ }
+ };
+
+ ILabelProvider qualifierLabelProvider = new CElementLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IBinary) {
+ IBinary bin = (IBinary)element;
+ StringBuffer name = new StringBuffer();
+ name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
+ name.append(" - "); //$NON-NLS-1$
+ name.append(bin.getPath().toString());
+ return name.toString();
+ }
+ return super.getText(element);
+ }
+ };
+
+ TwoPaneElementSelector dialog = new TwoPaneElementSelector(getShell(), programLabelProvider, qualifierLabelProvider);
+ dialog.setElements(getBinaryFiles(getCProject()));
+ dialog.setMessage(LaunchMessages.getString("CMainTab.Choose_program_to_run")); //$NON-NLS-1$
+ dialog.setTitle(LaunchMessages.getString("CMainTab.Program_Selection")); //$NON-NLS-1$
+ dialog.setUpperListLabel(LaunchMessages.getString("Launch.common.BinariesColon")); //$NON-NLS-1$
+ dialog.setLowerListLabel(LaunchMessages.getString("Launch.common.QualifierColon")); //$NON-NLS-1$
+ dialog.setMultipleSelection(false);
+ // dialog.set
+ if (dialog.open() == Window.OK) {
+ IBinary binary = (IBinary)dialog.getFirstResult();
+ fProgText.setText(binary.getResource().getProjectRelativePath().toString());
+ }
+
+ }
+
+ /**
+ * Show a dialog that lets the user select a project. This in turn provides context for the main
+ * type, allowing the user to key a main type name, or constraining the search for main types to
+ * the specified project.
+ */
+ protected void handleBinaryBrowseButtonSelected() {
+ final ICProject cproject = getCProject();
+ if (cproject == null) {
+ MessageDialog.openInformation(getShell(), LaunchMessages.getString("CMainTab.Project_required"), //$NON-NLS-1$
+ LaunchMessages.getString("CMainTab.Enter_project_before_browsing_for_program")); //$NON-NLS-1$
+ return;
+ }
+ FileDialog fileDialog = new FileDialog(getShell(), SWT.NONE);
+ fileDialog.setFileName(fProgText.getText());
+ String text= fileDialog.open();
+ if (text != null) {
+ fProgText.setText(text);
+ }
+ }
+
+ /**
+ * Iterate through and suck up all of the executable files that we can find.
+ */
+ protected IBinary[] getBinaryFiles(final ICProject cproject) {
+ final Display display;
+ if (cproject == null || !cproject.exists()) {
+ return null;
+ }
+ if (getShell() == null) {
+ display = GdbUIPlugin.getShell().getDisplay();
+ } else {
+ display = getShell().getDisplay();
+ }
+ final Object[] ret = new Object[1];
+ BusyIndicator.showWhile(display, new Runnable() {
+
+ public void run() {
+ try {
+ ret[0] = cproject.getBinaryContainer().getBinaries();
+ } catch (CModelException e) {
+ GdbUIPlugin.errorDialog("Launch UI internal error", e); //$NON-NLS-1$
+ }
+ }
+ });
+
+ return (IBinary[])ret[0];
+ }
+
+ /**
+ * Show a dialog that lets the user select a project. This in turn provides context for the main
+ * type, allowing the user to key a main type name, or constraining the search for main types to
+ * the specified project.
+ */
+ protected void handleProjectButtonSelected() {
+ ICProject project = chooseCProject();
+ if (project == null) {
+ return;
+ }
+
+ String projectName = project.getElementName();
+ fProjText.setText(projectName);
+ }
+
+ /**
+ * Realize a C Project selection dialog and return the first selected project, or null if there
+ * was none.
+ */
+ protected ICProject chooseCProject() {
+ try {
+ ICProject[] projects = getCProjects();
+
+ ILabelProvider labelProvider = new CElementLabelProvider();
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
+ dialog.setTitle(LaunchMessages.getString("CMainTab.Project_Selection")); //$NON-NLS-1$
+ dialog.setMessage(LaunchMessages.getString("CMainTab.Choose_project_to_constrain_search_for_program")); //$NON-NLS-1$
+ dialog.setElements(projects);
+
+ ICProject cProject = getCProject();
+ if (cProject != null) {
+ dialog.setInitialSelections(new Object[]{cProject});
+ }
+ if (dialog.open() == Window.OK) {
+ return (ICProject)dialog.getFirstResult();
+ }
+ } catch (CModelException e) {
+ GdbUIPlugin.errorDialog("Launch UI internal error", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ * Return an array a ICProject whose platform match that of the runtime env.
+ */
+ protected ICProject[] getCProjects() throws CModelException {
+ ICProject cproject[] = CoreModel.getDefault().getCModel().getCProjects();
+ ArrayList<ICProject> list = new ArrayList<ICProject>(cproject.length);
+
+ for (int i = 0; i < cproject.length; i++) {
+ ICDescriptor cdesciptor = null;
+ try {
+ cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject)cproject[i].getResource(), false);
+ if (cdesciptor != null) {
+ String projectPlatform = cdesciptor.getPlatform();
+ if (filterPlatform.equals("*") //$NON-NLS-1$
+ || projectPlatform.equals("*") //$NON-NLS-1$
+ || filterPlatform.equalsIgnoreCase(projectPlatform) == true) {
+ list.add(cproject[i]);
+ }
+ } else {
+ list.add(cproject[i]);
+ }
+ } catch (CoreException e) {
+ list.add(cproject[i]);
+ }
+ }
+ return list.toArray(new ICProject[list.size()]);
+ }
+
+ /**
+ * Return the ICProject corresponding to the project name in the project name text field, or
+ * null if the text does not match a project name.
+ */
+ protected ICProject getCProject() {
+ String projectName = fProjText.getText().trim();
+ if (projectName.length() < 1) {
+ return null;
+ }
+ return CoreModel.getDefault().getCModel().getCProject(projectName);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+
+ setErrorMessage(null);
+ setMessage(null);
+
+ if (dontCheckProgram)
+ return true;
+
+ String name = fProjText.getText().trim();
+ if (name.length() == 0) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Project_not_specified")); //$NON-NLS-1$
+ return false;
+ }
+ if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {
+ setErrorMessage(LaunchMessages.getString("Launch.common.Project_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if (!project.isOpen()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Project_must_be_opened")); //$NON-NLS-1$
+ return false;
+ }
+
+ name = fProgText.getText().trim();
+ if (name.length() == 0) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_not_specified")); //$NON-NLS-1$
+ return false;
+ }
+ if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ IPath exePath = new Path(name);
+ if (!exePath.isAbsolute()) {
+ if (!project.getFile(name).exists()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ exePath = project.getFile(name).getLocation();
+ } else {
+ if (!exePath.toFile().exists()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ }
+ try {
+ if (!isBinary(project, exePath)) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_is_not_a_recongnized_executable")); //$NON-NLS-1$
+ return false;
+ }
+ } catch (CoreException e) {
+ GdbUIPlugin.log(e);
+ setErrorMessage(e.getLocalizedMessage());
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @param project
+ * @param exePath
+ * @return
+ * @throws CoreException
+ */
+ protected boolean isBinary(IProject project, IPath exePath) throws CoreException {
+ ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project);
+ for (int i = 0; i < parserRef.length; i++) {
+ try {
+ IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension();
+ IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath);
+ if (exe != null) {
+ return true;
+ }
+ } catch (ClassCastException e) {
+ } catch (IOException e) {
+ }
+ }
+ IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser();
+ try {
+ IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath);
+ return exe != null;
+ } catch (ClassCastException e) {
+ } catch (IOException e) {
+ }
+ return false;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ // We set empty attributes for project & program so that when one config
+ // is
+ // compared to another, the existence of empty attributes doesn't cause
+ // an
+ // incorrect result (the performApply() method can result in empty
+ // values
+ // for these attributes being set on a config if there is nothing in the
+ // corresponding text boxes)
+ // plus getContext will use this to base context from if set.
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
+ ICElement cElement = null;
+ cElement = getContext(config, getPlatform(config));
+ if (cElement != null) {
+ initializeCProject(cElement, config);
+ initializeProgramName(cElement, config);
+ }
+ if (wantsTerminalOption()) {
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
+ }
+ }
+
+ /**
+ * Set the program name attributes on the working copy based on the ICElement
+ */
+ protected void initializeProgramName(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
+
+ boolean renamed = false;
+
+ if (!(cElement instanceof IBinary))
+ {
+ cElement = cElement.getCProject();
+ }
+
+ if (cElement instanceof ICProject) {
+
+ IProject project = cElement.getCProject().getProject();
+ String name = project.getName();
+ ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project);
+ if (projDes != null) {
+ String buildConfigName = projDes.getActiveConfiguration().getName();
+ name = name + " " + buildConfigName; //$NON-NLS-1$
+ }
+ name = getLaunchConfigurationDialog().generateName(name);
+ config.rename(name);
+ renamed = true;
+ }
+
+ IBinary binary = null;
+ if (cElement instanceof ICProject) {
+ IBinary[] bins = getBinaryFiles((ICProject)cElement);
+ if (bins != null && bins.length == 1) {
+ binary = bins[0];
+ }
+ } else if (cElement instanceof IBinary) {
+ binary = (IBinary)cElement;
+ }
+
+ if (binary != null) {
+ String path;
+ path = binary.getResource().getProjectRelativePath().toOSString();
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, path);
+ if (!renamed)
+ {
+ String name = binary.getElementName();
+ int index = name.lastIndexOf('.');
+ if (index > 0) {
+ name = name.substring(0, index);
+ }
+ name = getLaunchConfigurationDialog().generateName(name);
+ config.rename(name);
+ renamed = true;
+ }
+ }
+
+ if (!renamed)
+ {
+ String name = getLaunchConfigurationDialog().generateName(cElement.getCProject().getElementName());
+ config.rename(name);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+ */
+ public String getName() {
+ return LaunchMessages.getString("CMainTab.Main"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
+ */
+ @Override
+ public Image getImage() {
+ return LaunchImages.get(LaunchImages.IMG_VIEW_MAIN_TAB);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
+ */
+ @Override
+ protected void updateLaunchConfigurationDialog() {
+ super.updateLaunchConfigurationDialog();
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java
new file mode 100644
index 0000000000..6a5bd6a102
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * 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.dsf.gdb.internal.ui.launching;
+
+import java.util.Map;
+import java.util.Observable;
+import java.util.Observer;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * The content of the <code>Shared Libraries</code> tab of the <code>GDBDebuggerPage</code>.
+ */
+public class GDBSolibBlock extends Observable implements IMILaunchConfigurationComponent, Observer {
+
+ private IMILaunchConfigurationComponent fSolibSearchPathBlock;
+
+ private Button fAutoSoLibButton;
+
+ private Button fUseSolibForAppButton;
+
+ private Composite fControl;
+
+ private boolean fAutoSolib = false;
+
+ private boolean fUseSolibForApp = true;
+
+ public GDBSolibBlock( IMILaunchConfigurationComponent solibSearchBlock, boolean autoSolib, boolean stopOnSolibEvents ) {
+ super();
+ fSolibSearchPathBlock = solibSearchBlock;
+ fAutoSolib = autoSolib;
+ }
+
+ public void createControl( Composite parent ) {
+ Composite subComp = ControlFactory.createCompositeEx( parent, 1, GridData.FILL_HORIZONTAL );
+ ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
+ ((GridLayout)subComp.getLayout()).marginHeight = 0;
+ ((GridLayout)subComp.getLayout()).marginWidth = 0;
+ if ( fSolibSearchPathBlock != null ) {
+ fSolibSearchPathBlock.createControl( subComp );
+ if ( fSolibSearchPathBlock instanceof Observable )
+ ((Observable)fSolibSearchPathBlock).addObserver( this );
+ }
+ if ( fAutoSolib ) {
+ fAutoSoLibButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "GDBSolibBlock.0" ) ); //$NON-NLS-1$
+ fAutoSoLibButton.addSelectionListener( new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected( SelectionEvent e ) {
+ updateButtons();
+ changed();
+ }
+ } );
+ }
+ if ( fUseSolibForApp ) {
+ fUseSolibForAppButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "GDBSolibBlock.2" ) ); //$NON-NLS-1$
+ fUseSolibForAppButton.addSelectionListener( new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected( SelectionEvent e ) {
+ updateButtons();
+ changed();
+ }
+ } );
+ }
+ fControl = subComp;
+ }
+
+ public void initializeFrom( ILaunchConfiguration configuration ) {
+ if ( fSolibSearchPathBlock != null )
+ fSolibSearchPathBlock.initializeFrom( configuration );
+ try {
+ if ( fAutoSoLibButton != null )
+ fAutoSoLibButton.setSelection( configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT ) );
+ if ( fUseSolibForAppButton != null )
+ fUseSolibForAppButton.setSelection( configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, IGDBLaunchConfigurationConstants.DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT ) );
+ initializeButtons( configuration );
+ updateButtons();
+ }
+ catch( CoreException e ) {
+ }
+ }
+
+ public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
+ if ( fSolibSearchPathBlock != null )
+ fSolibSearchPathBlock.performApply( configuration );
+ try {
+ @SuppressWarnings("unchecked")
+ Map<String, Boolean> attrs = configuration.getAttributes();
+
+ if ( fAutoSoLibButton != null )
+ attrs.put( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, Boolean.valueOf( fAutoSoLibButton.getSelection() ) );
+ if ( fUseSolibForAppButton != null )
+ attrs.put( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, Boolean.valueOf( fUseSolibForAppButton.getSelection() ) );
+ configuration.setAttributes( attrs );
+ }
+ catch( CoreException e ) {
+ }
+ }
+
+ public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
+ if ( fSolibSearchPathBlock != null )
+ fSolibSearchPathBlock.setDefaults( configuration );
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT );
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, IGDBLaunchConfigurationConstants.DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT );
+ }
+
+ protected void updateButtons() {
+ }
+
+ public void dispose() {
+ deleteObservers();
+ if ( fSolibSearchPathBlock != null ) {
+ if ( fSolibSearchPathBlock instanceof Observable )
+ ((Observable)fSolibSearchPathBlock).deleteObserver( this );
+ fSolibSearchPathBlock.dispose();
+ }
+ }
+
+ public void update( Observable o, Object arg ) {
+ changed();
+ }
+
+ protected void changed() {
+ setChanged();
+ notifyObservers();
+ }
+
+ protected void initializeButtons( ILaunchConfiguration configuration ) {
+ try {
+ boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); //$NON-NLS-1$
+ if ( fAutoSoLibButton != null )
+ fAutoSoLibButton.setEnabled( enable );
+ if ( fUseSolibForAppButton != null )
+ fUseSolibForAppButton.setEnabled( enable );
+ }
+ catch( CoreException e ) {
+ }
+ }
+
+ public Control getControl() {
+ return fControl;
+ }
+
+ public boolean isValid( ILaunchConfiguration launchConfig ) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000000..f72f984517
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+public class GdbAttachLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
+ */
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new CMainTab(2), // In some case, we don't need to specify an executable
+ // We don't know yet if we are going to do a remote or local session
+ new CDebuggerTab(null, true),
+ new SourceLookupTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
new file mode 100644
index 0000000000..8a6a1478ad
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
@@ -0,0 +1,365 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * Ericsson - Modified for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.io.File;
+import java.util.Observable;
+import java.util.Observer;
+
+import org.eclipse.cdt.debug.ui.AbstractCDebuggerPage;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * The dynamic tab for gdb-based debugger implementations.
+ */
+public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
+
+ protected TabFolder fTabFolder;
+ protected Text fGDBCommandText;
+ protected Text fGDBInitText;
+ protected Button fNonStopCheckBox;
+ protected Button fVerboseModeButton;
+
+ private IMILaunchConfigurationComponent fSolibBlock;
+ private boolean fIsInitializing = false;
+
+ public void createControl(Composite parent) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ comp.setLayout(new GridLayout());
+ comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+ fTabFolder = new TabFolder(comp, SWT.NONE);
+ fTabFolder.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
+ createTabs(fTabFolder);
+ fTabFolder.setSelection(0);
+ setControl(parent);
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
+ IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
+ IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
+ IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT);
+
+ if (fSolibBlock != null)
+ fSolibBlock.setDefaults(configuration);
+ }
+
+ @Override
+ public boolean isValid(ILaunchConfiguration launchConfig) {
+ boolean valid = fGDBCommandText.getText().length() != 0;
+ if (valid) {
+ setErrorMessage(null);
+ setMessage(null);
+ }
+ else {
+ setErrorMessage(LaunchUIMessages.getString("GDBDebuggerPage.0")); //$NON-NLS-1$
+ setMessage(null);
+ }
+ return valid;
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ setInitializing(true);
+ String gdbCommand = IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT;
+ String gdbInit = IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT;
+ boolean nonStopMode = IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT;
+ boolean verboseMode = IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
+
+ try {
+ gdbCommand = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
+ IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT);
+ }
+ catch(CoreException e) {
+ }
+ try {
+ gdbInit = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
+ IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT);
+ }
+ catch(CoreException e) {
+ }
+
+ try {
+ nonStopMode = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
+ IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT);
+ }
+ catch(CoreException e) {
+ }
+ try {
+ verboseMode = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
+ }
+ catch(CoreException e) {
+ }
+
+ if (fSolibBlock != null)
+ fSolibBlock.initializeFrom(configuration);
+ fGDBCommandText.setText(gdbCommand);
+ fGDBInitText.setText(gdbInit);
+ fNonStopCheckBox.setSelection(nonStopMode);
+ fVerboseModeButton.setSelection(verboseMode);
+
+ setInitializing(false);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
+ fGDBCommandText.getText().trim());
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
+ fGDBInitText.getText().trim());
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
+ fNonStopCheckBox.getSelection());
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
+ fVerboseModeButton.getSelection() );
+
+ if (fSolibBlock != null)
+ fSolibBlock.performApply(configuration);
+ }
+
+ public String getName() {
+ return LaunchUIMessages.getString("GDBDebuggerPage.1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getShell()
+ */
+ @Override
+ protected Shell getShell() {
+ return super.getShell();
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
+ */
+ @Override
+ protected void updateLaunchConfigurationDialog() {
+ super.updateLaunchConfigurationDialog();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
+ */
+ public void update(Observable o, Object arg) {
+ if (!isInitializing())
+ updateLaunchConfigurationDialog();
+ }
+
+ public IMILaunchConfigurationComponent createSolibBlock(Composite parent) {
+ IMILaunchConfigurationComponent block = new GDBSolibBlock( new SolibSearchPathBlock(), true, true);
+ block.createControl(parent);
+ return block;
+ }
+
+ public void createTabs(TabFolder tabFolder) {
+ createMainTab(tabFolder);
+ createSolibTab(tabFolder);
+ }
+
+ public void createMainTab(TabFolder tabFolder) {
+ TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
+ tabItem.setText(LaunchUIMessages.getString("GDBDebuggerPage.2")); //$NON-NLS-1$
+ Composite comp = ControlFactory.createCompositeEx(tabFolder, 1, GridData.FILL_BOTH);
+ ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ comp.setFont(tabFolder.getFont());
+ tabItem.setControl(comp);
+ Composite subComp = ControlFactory.createCompositeEx(comp, 3, GridData.FILL_HORIZONTAL);
+ ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
+ subComp.setFont(tabFolder.getFont());
+ Label label = ControlFactory.createLabel(subComp, LaunchUIMessages.getString("GDBDebuggerPage.3")); //$NON-NLS-1$
+ GridData gd = new GridData();
+ // gd.horizontalSpan = 2;
+ label.setLayoutData(gd);
+ fGDBCommandText = ControlFactory.createTextField(subComp, SWT.SINGLE | SWT.BORDER);
+ fGDBCommandText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent evt) {
+ if (!isInitializing())
+ updateLaunchConfigurationDialog();
+ }
+ });
+ Button button = createPushButton(subComp, LaunchUIMessages.getString("GDBDebuggerPage.4"), null); //$NON-NLS-1$
+ button.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleGDBButtonSelected();
+ updateLaunchConfigurationDialog();
+ }
+
+ private void handleGDBButtonSelected() {
+ FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
+ dialog.setText(LaunchUIMessages.getString("GDBDebuggerPage.5")); //$NON-NLS-1$
+ String gdbCommand = fGDBCommandText.getText().trim();
+ int lastSeparatorIndex = gdbCommand.lastIndexOf(File.separator);
+ if (lastSeparatorIndex != -1) {
+ dialog.setFilterPath(gdbCommand.substring(0, lastSeparatorIndex));
+ }
+ String res = dialog.open();
+ if (res == null) {
+ return;
+ }
+ fGDBCommandText.setText(res);
+ }
+ });
+ label = ControlFactory.createLabel(subComp, LaunchUIMessages.getString("GDBDebuggerPage.6")); //$NON-NLS-1$
+ gd = new GridData();
+ // gd.horizontalSpan = 2;
+ label.setLayoutData(gd);
+ fGDBInitText = ControlFactory.createTextField(subComp, SWT.SINGLE | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fGDBInitText.setLayoutData(gd);
+ fGDBInitText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent evt) {
+ if (!isInitializing())
+ updateLaunchConfigurationDialog();
+ }
+ });
+ button = createPushButton(subComp, LaunchUIMessages.getString("GDBDebuggerPage.7"), null); //$NON-NLS-1$
+ button.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleGDBInitButtonSelected();
+ updateLaunchConfigurationDialog();
+ }
+
+ private void handleGDBInitButtonSelected() {
+ FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
+ dialog.setText(LaunchUIMessages.getString("GDBDebuggerPage.8")); //$NON-NLS-1$
+ String gdbCommand = fGDBInitText.getText().trim();
+ int lastSeparatorIndex = gdbCommand.lastIndexOf(File.separator);
+ if (lastSeparatorIndex != -1) {
+ dialog.setFilterPath(gdbCommand.substring(0, lastSeparatorIndex));
+ }
+ String res = dialog.open();
+ if (res == null) {
+ return;
+ }
+ fGDBInitText.setText(res);
+ }
+ });
+
+ label = ControlFactory.createLabel(subComp, LaunchUIMessages.getString("GDBDebuggerPage.9"), //$NON-NLS-1$
+ 200, SWT.DEFAULT, SWT.WRAP);
+
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ gd.widthHint = 200;
+ label.setLayoutData(gd);
+
+ // TODO: Ideally, this field should be disabled if the back-end doesn't support non-stop debugging
+ // TODO: Find a way to determine if non-stop is supported (i.e. find the GDB version) then grey out the check box if necessary
+ fNonStopCheckBox = ControlFactory.createCheckBox(subComp, LaunchUIMessages.getString("GDBDebuggerPage.13")); //$NON-NLS-1$
+ fNonStopCheckBox.addSelectionListener( new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ fVerboseModeButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "StandardGDBDebuggerPage.13" ) ); //$NON-NLS-1$
+ fVerboseModeButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ if (!isInitializing())
+ updateLaunchConfigurationDialog();
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (!isInitializing())
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ // fit options one per line
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ fNonStopCheckBox.setLayoutData(gd);
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ fVerboseModeButton.setLayoutData(gd);
+
+ // Grayed out until bug 249227 is resolved
+ //
+ fVerboseModeButton.setVisible(false);
+ //
+
+ }
+
+ public void createSolibTab(TabFolder tabFolder) {
+ TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
+ tabItem.setText(LaunchUIMessages.getString("GDBDebuggerPage.10")); //$NON-NLS-1$
+ Composite comp = ControlFactory.createCompositeEx(fTabFolder, 1, GridData.FILL_BOTH);
+ comp.setFont(tabFolder.getFont());
+ tabItem.setControl(comp);
+ fSolibBlock = createSolibBlock(comp);
+ if (fSolibBlock instanceof Observable)
+ ((Observable)fSolibBlock).addObserver(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (fSolibBlock != null) {
+ if (fSolibBlock instanceof Observable)
+ ((Observable)fSolibBlock).deleteObserver(this);
+ fSolibBlock.dispose();
+ }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
+ // Override the default behavior
+ }
+
+ protected boolean isInitializing() {
+ return fIsInitializing;
+ }
+
+ private void setInitializing(boolean isInitializing) {
+ fIsInitializing = isInitializing;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000000..cfeb8ae04b
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * Ericsson - Modified for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+public class GdbLocalRunLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
+ */
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new CMainTab(),
+ new CArgumentsTab(),
+ new CDebuggerTab(SessionType.LOCAL, false),
+ new SourceLookupTab(),
+// new EnvironmentTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000000..25f35df62b
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+public class GdbRemoteRunLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
+ */
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new CMainTab(),
+ new CDebuggerTab(SessionType.REMOTE, false),
+ new SourceLookupTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbServerDebuggerPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbServerDebuggerPage.java
new file mode 100644
index 0000000000..420fc98204
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbServerDebuggerPage.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * IBM Corporation
+ * Ericsson - Modified for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.debug.internal.ui.dialogfields.ComboDialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.IDialogFieldListener;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+
+/**
+ * The dynamic debugger tab for remote launches using gdb server.
+ */
+public class GdbServerDebuggerPage extends GdbDebuggerPage {
+
+ private final static String CONNECTION_TCP = LaunchUIMessages.getString("GDBServerDebuggerPage.0"); //$NON-NLS-1$
+
+ private final static String CONNECTION_SERIAL = LaunchUIMessages.getString("GDBServerDebuggerPage.1"); //$NON-NLS-1$
+
+ private ComboDialogField fConnectionField;
+
+ private String[] fConnections = new String[]{ CONNECTION_TCP, CONNECTION_SERIAL };
+
+ private TCPSettingsBlock fTCPBlock;
+
+ private SerialPortSettingsBlock fSerialBlock;
+
+ private Composite fConnectionStack;
+
+ private boolean fIsInitializing = false;
+
+ public GdbServerDebuggerPage() {
+ super();
+ fConnectionField = createConnectionField();
+ fTCPBlock = new TCPSettingsBlock();
+ fSerialBlock = new SerialPortSettingsBlock();
+ fTCPBlock.addObserver(this);
+ fSerialBlock.addObserver(this);
+ }
+
+ protected void createConnectionTab(TabFolder tabFolder) {
+ TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
+ tabItem.setText(LaunchUIMessages.getString("GDBServerDebuggerPage.10")); //$NON-NLS-1$
+ Composite comp1 = ControlFactory.createCompositeEx(tabFolder, 1, GridData.FILL_BOTH);
+ ((GridLayout)comp1.getLayout()).makeColumnsEqualWidth = false;
+ comp1.setFont(tabFolder.getFont());
+ tabItem.setControl(comp1);
+ Composite comp = ControlFactory.createCompositeEx(comp1, 2, GridData.FILL_BOTH);
+ ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ comp.setFont(comp1.getFont());
+ fConnectionField.doFillIntoGrid(comp, 2);
+ ((GridData)fConnectionField.getComboControl(null).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
+ fConnectionStack = ControlFactory.createCompositeEx(comp, 1, GridData.FILL_BOTH);
+ StackLayout stackLayout = new StackLayout();
+ fConnectionStack.setLayout(stackLayout);
+ ((GridData)fConnectionStack.getLayoutData()).horizontalSpan = 2;
+ fTCPBlock.createBlock(fConnectionStack);
+ fSerialBlock.createBlock(fConnectionStack);
+ }
+
+ private ComboDialogField createConnectionField() {
+ ComboDialogField field = new ComboDialogField(SWT.DROP_DOWN | SWT.READ_ONLY);
+ field.setLabelText(LaunchUIMessages.getString("GDBServerDebuggerPage.9")); //$NON-NLS-1$
+ field.setItems(fConnections);
+ field.setDialogFieldListener(new IDialogFieldListener() {
+
+ public void dialogFieldChanged(DialogField f) {
+ if (!isInitializing())
+ connectionTypeChanged();
+ }
+ });
+ return field;
+ }
+
+ protected void connectionTypeChanged() {
+ connectionTypeChanged0();
+ updateLaunchConfigurationDialog();
+ }
+
+ private void connectionTypeChanged0() {
+ ((StackLayout)fConnectionStack.getLayout()).topControl = null;
+ int index = fConnectionField.getSelectionIndex();
+ if (index >= 0 && index < fConnections.length) {
+ String[] connTypes = fConnectionField.getItems();
+ if (CONNECTION_TCP.equals(connTypes[index]))
+ ((StackLayout)fConnectionStack.getLayout()).topControl = fTCPBlock.getControl();
+ else if (CONNECTION_SERIAL.equals(connTypes[index]))
+ ((StackLayout)fConnectionStack.getLayout()).topControl = fSerialBlock.getControl();
+ }
+ fConnectionStack.layout();
+ }
+
+ @Override
+ public boolean isValid(ILaunchConfiguration launchConfig) {
+ if (super.isValid(launchConfig)) {
+ setErrorMessage(null);
+ setMessage(null);
+ int index = fConnectionField.getSelectionIndex();
+ if (index >= 0 && index < fConnections.length) {
+ String[] connTypes = fConnectionField.getItems();
+ if (CONNECTION_TCP.equals(connTypes[index])) {
+ if (!fTCPBlock.isValid(launchConfig)) {
+ setErrorMessage(fTCPBlock.getErrorMessage());
+ return false;
+ }
+ }
+ else if (CONNECTION_SERIAL.equals(connTypes[index])) {
+ if (!fSerialBlock.isValid(launchConfig)) {
+ setErrorMessage(fSerialBlock.getErrorMessage());
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ setInitializing(true);
+ super.initializeFrom(configuration);
+ boolean isTcp = false;
+ try {
+ isTcp = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, false);
+ }
+ catch(CoreException e) {
+ }
+ fTCPBlock.initializeFrom(configuration);
+ fSerialBlock.initializeFrom(configuration);
+ fConnectionField.selectItem((isTcp) ? 0 : 1);
+ connectionTypeChanged0();
+ setInitializing(false);
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ super.performApply(configuration);
+ if (fConnectionField != null)
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, fConnectionField.getSelectionIndex() == 0);
+ fTCPBlock.performApply(configuration);
+ fSerialBlock.performApply(configuration);
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ super.setDefaults(configuration);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, false);
+ fTCPBlock.setDefaults(configuration);
+ fSerialBlock.setDefaults(configuration);
+ }
+
+ @Override
+ protected boolean isInitializing() {
+ return fIsInitializing;
+ }
+
+ private void setInitializing(boolean isInitializing) {
+ fIsInitializing = isInitializing;
+ }
+
+ @Override
+ public void createTabs(TabFolder tabFolder) {
+ super.createTabs(tabFolder);
+ createConnectionTab(tabFolder);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java
new file mode 100644
index 0000000000..8ffc588f17
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+
+public interface ICDTLaunchHelpContextIds {
+
+ public static final String PREFIX = GdbUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ // Launch configuration dialog pages
+ public static final String LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB = PREFIX + "launch_configuration_dialog_main_tab"; //$NON-NLS-1$
+ public static final String LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB = PREFIX + "launch_configuration_dialog_arguments_tab"; //$NON-NLS-1$
+ public static final String LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB = PREFIX + "launch_configuration_dialog_environment_tab"; //$NON-NLS-1$
+ public static final String LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB = PREFIX + "launch_configuration_dialog_debugger_tab"; //$NON-NLS-1$
+ public static final String LAUNCH_CONFIGURATION_DIALOG_SOURCELOOKUP_TAB = PREFIX + "launch_configuration_dialog_source_tab"; //$NON-NLS-1$
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java
new file mode 100644
index 0000000000..3f7d8df058
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * The common interface for UI components of the launch configuration tabs.
+ */
+public interface IMILaunchConfigurationComponent {
+
+ /**
+ * Creates the top level control for this component under the given parent composite.
+ * <p>
+ * Implementors are responsible for ensuring that the created control can be accessed via <code>getControl</code>
+ * </p>
+ *
+ * @param parent the parent composite
+ */
+ public void createControl( Composite parent );
+
+ /**
+ * Returns the top level control for this component.
+ * <p>
+ * May return <code>null</code> if the control has not been created yet.
+ * </p>
+ *
+ * @return the top level control or <code>null</code>
+ */
+ public Control getControl();
+
+ /**
+ * Initializes the given component with default values.
+ * This method may be called before this tab's control is created.
+ *
+ * @param configuration launch configuration
+ */
+ public void setDefaults( ILaunchConfigurationWorkingCopy configuration );
+
+ /**
+ * Initializes this component's controls with values from the given
+ * launch configuration.
+ *
+ * @param configuration launch configuration
+ */
+ public void initializeFrom( ILaunchConfiguration configuration );
+
+ /**
+ * Notifies this component that it has been disposed.
+ * Marks the end of this component's lifecycle, allowing
+ * to perform any cleanup required.
+ */
+ public void dispose();
+
+ /**
+ * Copies values from this component into the given launch configuration.
+ *
+ * @param configuration launch configuration
+ */
+ public void performApply( ILaunchConfigurationWorkingCopy configuration );
+
+ /**
+ * Returns whether this component is in a valid state in the context
+ * of the specified launch configuration.
+ *
+ * @param launchConfig launch configuration which provides context
+ * for validating this component.
+ * This value must not be <code>null</code>.
+ *
+ * @return whether this component is in a valid state
+ */
+ public boolean isValid(ILaunchConfiguration launchConfig);
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchImages.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchImages.java
new file mode 100644
index 0000000000..453a4db3a1
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchImages.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ * Ericsson - Modified for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+
+public class LaunchImages {
+ private static final String NAME_PREFIX= GdbUIPlugin.PLUGIN_ID + '.';
+ private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
+
+ // The plugin registry
+ private static ImageRegistry imageRegistry = new ImageRegistry();
+
+ // Subdirectory (under the package containing this class) where 16 color images are
+ private static URL fgIconBaseURL;
+ static {
+ fgIconBaseURL= Platform.getBundle(GdbUIPlugin.PLUGIN_ID).getEntry("/icons/"); //$NON-NLS-1$
+ }
+
+ private static final String T_TABS = "full/view16/"; //$NON-NLS-1$
+ private static final String T_OBJS = "full/obj16/"; //$NON-NLS-1$
+
+ public static String IMG_VIEW_MAIN_TAB = NAME_PREFIX + "main_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_ARGUMENTS_TAB = NAME_PREFIX + "arguments_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_DEBUGGER_TAB = NAME_PREFIX + "debugger_tab.gif"; //$NON-NLS-1$
+
+ public static final ImageDescriptor DESC_TAB_MAIN= createManaged(T_TABS, IMG_VIEW_MAIN_TAB);
+ public static final ImageDescriptor DESC_TAB_ARGUMENTS = createManaged(T_TABS, IMG_VIEW_ARGUMENTS_TAB);
+ public static final ImageDescriptor DESC_TAB_DEBUGGER = createManaged(T_TABS, IMG_VIEW_DEBUGGER_TAB);
+
+ public static String IMG_OBJS_EXEC= NAME_PREFIX + "exec_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_OBJS_EXEC = createManaged(T_OBJS, IMG_OBJS_EXEC);
+
+ public static void initialize() {
+ }
+
+ private static ImageDescriptor createManaged(String prefix, String name) {
+ return createManaged(imageRegistry, prefix, name);
+ }
+
+ private static ImageDescriptor createManaged(ImageRegistry registry, String prefix, String name) {
+ ImageDescriptor result= ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH)));
+ registry.put(name, result);
+ return result;
+ }
+
+ public static Image get(String key) {
+ return imageRegistry.get(key);
+ }
+
+
+ private static URL makeIconFileURL(String prefix, String name) {
+ StringBuffer buffer= new StringBuffer(prefix);
+ buffer.append(name);
+ try {
+ return new URL(fgIconBaseURL, buffer.toString());
+ } catch (MalformedURLException e) {
+ GdbUIPlugin.log(e);
+ return null;
+ }
+ }
+
+ /**
+ * Helper method to access the image registry from the JavaPlugin class.
+ */
+ static ImageRegistry getImageRegistry() {
+ return imageRegistry;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.java
new file mode 100644
index 0000000000..1b428fbd62
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class LaunchUIMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchUIMessages";//$NON-NLS-1$
+
+ private static ResourceBundle RESOURCE_BUNDLE = null;
+
+ static {
+ try {
+ RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+ }
+ catch (MissingResourceException x) {
+ }
+ }
+
+ private LaunchUIMessages() {}
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), (Object[])new String[]{arg});
+ }
+
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
+ public static String getString(String key) {
+ if (RESOURCE_BUNDLE == null) return '!' + key + '!';
+ return RESOURCE_BUNDLE.getString(key);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties
new file mode 100644
index 0000000000..d317535bfd
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties
@@ -0,0 +1,225 @@
+###############################################################################
+# Copyright (c) 2003, 2008 QNX Software Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# QNX Software Systems - initial API and implementation
+# Ericsson - Updated for DSF
+###############################################################################
+
+CygwinDebuggerPage.0=Cygwin GDB Debugger Options
+GDBDebuggerPage.0=Debugger executable must be specified.
+GDBDebuggerPage.1=GDB Debugger Options
+GDBDebuggerPage.2=Main
+GDBDebuggerPage.3=GDB debugger:
+GDBDebuggerPage.4=&Browse...
+GDBDebuggerPage.5=GDB Debugger
+GDBDebuggerPage.6=GDB command file:
+GDBDebuggerPage.7=B&rowse...
+GDBDebuggerPage.8=GDB Command File
+GDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
+GDBDebuggerPage.10=Shared Libraries
+GDBDebuggerPage.11=Protocol:
+GDBDebuggerPage.12=Default
+GDBDebuggerPage.13=Non-stop mode (Note: Requires non-stop GDB)
+StandardGDBDebuggerPage.0=Debugger executable must be specified.
+StandardGDBDebuggerPage.1=GDB Debugger Options
+StandardGDBDebuggerPage.2=Main
+StandardGDBDebuggerPage.3=GDB debugger:
+StandardGDBDebuggerPage.4=&Browse...
+StandardGDBDebuggerPage.5=GDB Debugger
+StandardGDBDebuggerPage.6=GDB command file:
+StandardGDBDebuggerPage.7=B&rowse...
+StandardGDBDebuggerPage.8=GDB Command File
+StandardGDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
+StandardGDBDebuggerPage.10=Shared Libraries
+StandardGDBDebuggerPage.11=Protocol:
+StandardGDBDebuggerPage.12=GDB command set:
+StandardGDBDebuggerPage.13=Verbose console mode
+StandardGDBDebuggerPage.14=Use full file path to set breakpoints
+GDBServerDebuggerPage.0=TCP
+GDBServerDebuggerPage.1=Serial
+GDBServerDebuggerPage.10=Connection
+GDBServerDebuggerPage.2=Main
+GDBServerDebuggerPage.3=GDB debugger
+GDBServerDebuggerPage.4=&Browse...
+GDBServerDebuggerPage.5=GDB Debugger
+GDBServerDebuggerPage.6=GDB command file:
+GDBServerDebuggerPage.7=B&rowse...
+GDBServerDebuggerPage.8=GDB Command File
+GDBServerDebuggerPage.9=Type:
+GDBSolibBlock.0=Load shared library symbols automatically
+GDBSolibBlock.1=Stop on shared library events
+GDBSolibBlock.2=Use shared library symbols for debugged applications
+SerialPortSettingsBlock.0=Device:
+SerialPortSettingsBlock.1=Speed:
+SerialPortSettingsBlock.2=Device must be specified.
+SerialPortSettingsBlock.3=Invalid device.
+SerialPortSettingsBlock.4=Speed must be specified.
+SolibSearchPathBlock.0=Add...
+SolibSearchPathBlock.1=Up
+SolibSearchPathBlock.2=Down
+SolibSearchPathBlock.3=Remove
+SolibSearchPathBlock.4=Directories:
+SolibSearchPathBlock.5=Select directory that contains shared library.
+SolibSearchPathBlock.6=Select From List
+SolibSearchPathBlock.7=Select Libraries
+SolibSearchPathBlock.8=Select libraries to load symbols automatically.
+SolibSearchPathBlock.9=No libraries found.
+SolibSearchPathBlock.Add_Directory=Add Directory
+TCPSettingsBlock.0=Host name or IP address:
+TCPSettingsBlock.1=Port number:
+TCPSettingsBlock.2=Host name or IP address must be specified.
+TCPSettingsBlock.3=Invalid host name or IP address.
+TCPSettingsBlock.4=Port number must be specified.
+TCPSettingsBlock.5=Invalid port number.
+
+AbstractCLaunchDelegate.Debugger_not_installed=CDT Debugger not installed
+AbstractCLaunchDelegate.C_Project_not_specified=C Project not specified
+AbstractCLaunchDelegate.Not_a_C_CPP_project=Project is not a C/C++ project
+AbstractCLaunchDelegate.Program_file_not_specified=Program file not specified
+AbstractCLaunchDelegate.Program_file_does_not_exist=Program file does not exist
+AbstractCLaunchDelegate.PROGRAM_PATH_not_found={0} not found
+AbstractCLaunchDelegate.Working_directory_does_not_exist=Working directory does not exist
+AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found=The working directory {0} does not exist.
+AbstractCLaunchDelegate.Project_NAME_does_not_exist=Project {0} does not exist. Please check that your launch configuration specifies a valid project in your workspace.
+AbstractCLaunchDelegate.Project_NAME_is_closed=Project {0} is closed
+AbstractCLaunchDelegate.Debugger_Process=Debugger Process
+AbstractCLaunchDelegate.building_projects=Building prerequisite project list
+AbstractCLaunchDelegate.building=Building
+AbstractCLaunchDelegate.searching_for_errors=Searching for compile errors
+AbstractCLaunchDelegate.searching_for_errors_in=Searching for compile errors in
+AbstractCLaunchDelegate.20=Building prerequisite project list
+AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable=Program is not a recognized executable.
+
+LocalRunLaunchDelegate.Launching_Local_C_Application=Launching Local C/C++ Application
+LocalRunLaunchDelegate.Failed_setting_runtime_option_though_debugger=Failed to set program arguments, environment or working directory.
+LocalRunLaunchDelegate.Error_starting_process=Error starting process
+LocalRunLaunchDelegate.Does_not_support_working_dir=Eclipse runtime does not support working directory
+
+LocalAttachLaunchDelegate.Attaching_to_Local_C_Application=Attaching to Local C/C++ Application
+LocalAttachLaunchDelegate.No_Process_ID_selected=No Process ID selected
+LocalAttachLaunchDelegate.Select_Process=Select Process
+LocalAttachLaunchDelegate.Platform_cannot_list_processes=Current platform does not support listing processes
+LocalAttachLaunchDelegate.Select_Process_to_attach_debugger_to=Select a Process to attach debugger to:
+LocalAttachLaunchDelegate.CDT_Launch_Error=CDT Launch Error
+
+CoreFileLaunchDelegate.Launching_postmortem_debugger=Launching postmortem debugger
+CoreFileLaunchDelegate.No_Corefile_selected=No Corefile selected
+CoreFileLaunchDelegate.No_Shell_available_in_Launch=No Shell available in Launch
+CoreFileLaunchDelegate.Select_Corefile=Select Corefile
+CoreFileLaunchDelegate.Corefile_not_accessible=Core file is not accessible.
+CoreFileLaunchDelegate.Corefile_not_readable=Core file does not exist or is not readable.
+CoreFileLaunchDelegate.postmortem_debugging_failed=Post-mortem debugging failed
+
+CApplicationLaunchShortcut.Application_Launcher=Application Launcher
+CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug
+CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run
+CApplicationLaunchShortcut.CLocalApplication=C Local Application
+CApplicationLaunchShortcut.ChooseLocalAppToDebug=Choose a local application to debug
+CApplicationLaunchShortcut.ChooseLocalAppToRun=Choose a local application to run
+CApplicationLaunchShortcut.Launch_failed_no_binaries=Launch failed. Binary not found.
+CApplicationLaunchShortcut.LaunchFailed=Launch failed
+CApplicationLaunchShortcut.LaunchDebugConfigSelection=Launch Debug Configuration Selection
+CApplicationLaunchShortcut.LaunchConfigSelection=Launch Configuration Selection
+CApplicationLaunchShortcut.Invalid_launch_mode_1=Invalid launch mode
+CApplicationLaunchShortcut.Invalid_launch_mode_2=Invalid launch mode.
+CApplicationLaunchShortcut.Invalid_launch_mode_3=Invalid launch mode.
+CApplicationLaunchShortcut.ChooseLaunchConfigToDebug=Choose a launch configuration to debug
+CApplicationLaunchShortcut.ChooseLaunchConfigToRun=Choose a launch configuration to run
+CApplicationLaunchShortcut.Launch_failed_no_project_selected=Launch failed no project selected
+
+AbstractCDebuggerTab.No_debugger_available=No debugger available
+AbstractCDebuggerTab.Debugger=Debugger
+AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.
+
+LaunchUIPlugin.Error=Error
+
+CMainTab.Project_required=Project required
+CMainTab.Enter_project_before_searching_for_program=Project must first be entered before searching for a program
+CMainTab.Program_Selection=Program Selection
+CMainTab.Enter_project_before_browsing_for_program=Project must first be entered before browsing for a program
+CMainTab.Program_selection=Program selection
+CMainTab.Selection_must_be_file=Selection must be a file
+CMainTab.Selection_must_be_binary_file=Selection must be a binary file
+CMainTab.Project_Selection=Project Selection
+CMainTab.Choose_project_to_constrain_search_for_program=Choose a &project to constrain the search for a program
+CMainTab.Project_not_specified=Project not specified
+CMainTab.Program_not_specified=Program not specified
+CMainTab.Project_must_be_opened=Project must be opened
+CMainTab.Program_does_not_exist=Program does not exist
+CMainTab.Main=Main
+CMainTab.&ProjectColon=&Project:
+CMainTab.C/C++_Application=C/C++ Application:
+CMainTab.Search...=Searc&h Project...
+CMainTab.Choose_program_to_run=Choose a &program to run:
+CMainTab.Choose_program_to_run_from_NAME=Choose a program to run from {0}:
+CMainTab.UseTerminal=Connect process input & output to a terminal.
+CMainTab.Program_is_not_a_recongnized_executable=Program is not a recognized executable.
+
+CDebuggerTab.Advanced_Options_Dialog_Title=Advanced Options
+CDebuggerTab.Stop_at_main_on_startup=Stop on startup at:
+CDebuggerTab.Automatically_track_values_of=Automatically track the values of
+CDebuggerTab.Stop_on_startup_at_can_not_be_empty=The "Stop on startup at" field can not be empty.
+CDebuggerTab.Debugger_Options=Debugger Options
+CDebuggerTab.Mode_not_supported=Mode ''{0}'' is not supported by the selected debugger
+CDebuggerTab.Advanced=Advanced...
+CDebuggerTab.Variables=Variables
+CDebuggerTab.Registers=Registers
+CDebuggerTab.No_debugger_available=No debugger available
+CDebuggerTab.CPU_is_not_supported=The CPU is not supported by the selected debugger.
+CDebuggerTab.Platform_is_not_supported=The project platform is not supported by the selected debugger.
+
+CoreFileDebuggerTab.No_debugger_available=No debugger available
+CoreFileDebuggerTab.platform_is_not_supported=The project platform is not supported by the selected debugger.
+
+CEnvironmentTab.Edit_Variable=Edit Variable
+CEnvironmentTab.New_Variable=New Variable
+CEnvironmentTab.NameColon=Name:
+CEnvironmentTab.ValueColon=Value:
+CEnvironmentTab.Name=Name
+CEnvironmentTab.Value=Value
+CEnvironmentTab.New...=New...
+CEnvironmentTab.Import...=Import...
+CEnvironmentTab.Edit...=Edit...
+CEnvironmentTab.Remove=Remove
+CEnvironmentTab.Environment=Environment
+CEnvironmentTab.Existing_Environment_Variable=Existing Environment Variable
+CEnvironmentTab.Environment_variable_NAME_exists=Environment variable \" {0} \" exists.\nDo you want to overwrite?
+
+CArgumentsTab.C/C++_Program_Arguments=Program arguments:
+CArgumentsTab.Arguments=Arguments
+CArgumentsTab.Variables=Variables...
+
+WorkingDirectoryBlock.4=Select a &workspace relative working directory:
+WorkingDirectoryBlock.7=Select a working directory for the launch configuration:
+WorkingDirectoryBlock.0=W&orkspace...
+WorkingDirectoryBlock.Working_Directory_8=Working Directory
+WorkingDirectoryBlock.Working_directory=Working directory:
+WorkingDirectoryBlock.10=Working directory does not exist
+WorkingDirectoryBlock.Use_default=Use de&fault
+WorkingDirectoryBlock.17=Variabl&es...
+WorkingDirectoryBlock.1=File S&ystem...
+WorkingDirectoryBlock.Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
+
+Launch.common.Exception_occurred_reading_configuration_EXCEPTION=Exception occurred reading configuration {0}
+Launch.common.DebuggerColon=Debugger:
+Launch.common.BinariesColon=Binaries:
+Launch.common.QualifierColon=Qualifier:
+Launch.common.Browse_1=&Browse...
+Launch.common.Browse_2=B&rowse...
+Launch.common.Project_does_not_exist=Project does not exist
+LocalCDILaunchDelegate.0=Launching Local C/C++ Application
+LocalCDILaunchDelegate.1=Launching debugger session
+LocalCDILaunchDelegate.2=Debugging local C/C++ application
+LocalCDILaunchDelegate.3=Attaching to Local C/C++ Application
+LocalCDILaunchDelegate.4=No Process ID selected.
+LocalCDILaunchDelegate.5=Launching postmortem debugger session
+LocalCDILaunchDelegate.6=No core file selected
+LocalCDILaunchDelegate.7=Core file does not exist or is not readable.
+LocalCDILaunchDelegate.8=Error starting process.
+LocalCDILaunchDelegate.9=Eclipse runtime does not support working directory.
+LocalCDILaunchDelegate.10=Failed to set program arguments, environment or working directory.
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java
new file mode 100644
index 0000000000..7223ac2852
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - initial API and implementation
+ * Ericsson - Modified for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.core.IProcessInfo;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchMessages;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.TwoPaneElementSelector;
+
+public class ProcessPrompter implements IStatusHandler {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus,
+ * java.lang.Object)
+ */
+ public Object handleStatus(IStatus status, Object processList) throws CoreException {
+ Shell shell = GdbUIPlugin.getShell();
+ if (shell == null) {
+ IStatus error = new Status(IStatus.ERROR, GdbUIPlugin.getUniqueIdentifier(),
+ ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR,
+ LaunchMessages.getString("CoreFileLaunchDelegate.No_Shell_available_in_Launch"), null); //$NON-NLS-1$
+ throw new CoreException(error);
+ }
+
+ IProcessInfo[] plist = (IProcessInfo[])processList;
+ if (plist == null) {
+ MessageDialog.openError(
+ shell,
+ LaunchMessages.getString("LocalAttachLaunchDelegate.CDT_Launch_Error"), LaunchMessages.getString("LocalAttachLaunchDelegate.Platform_cannot_list_processes")); //$NON-NLS-1$ //$NON-NLS-2$
+ return null;
+ }
+
+ if (plist.length == 0) {
+ // No list available, just let the user put in a pid directly
+ InputDialog dialog = new InputDialog(shell,
+ LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process"), //$NON-NLS-1$
+ LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process_to_attach_debugger_to"), //$NON-NLS-1$
+ null, null);
+
+ if (dialog.open() == Window.OK) {
+ String pidStr = dialog.getValue();
+ try {
+ return Integer.parseInt(pidStr);
+ } catch (NumberFormatException e) {
+ }
+ }
+ } else {
+ ILabelProvider provider = new LabelProvider() {
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ IProcessInfo info = (IProcessInfo)element;
+ IPath path = new Path(info.getName());
+ return path.lastSegment() + " - " + info.getPid(); //$NON-NLS-1$
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ return LaunchImages.get(LaunchImages.IMG_OBJS_EXEC);
+ }
+ };
+ ILabelProvider qprovider = new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ IProcessInfo info = (IProcessInfo)element;
+ return info.getName();
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ return LaunchImages.get(LaunchImages.IMG_OBJS_EXEC);
+ }
+ };
+
+ // Display the list of processes and have the user choose
+ TwoPaneElementSelector dialog = new TwoPaneElementSelector(shell, provider, qprovider);
+ dialog.setTitle(LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process")); //$NON-NLS-1$
+ dialog.setMessage(LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process_to_attach_debugger_to")); //$NON-NLS-1$
+
+ dialog.setElements(plist);
+ if (dialog.open() == Window.OK) {
+ IProcessInfo info = (IProcessInfo)dialog.getFirstResult();
+ if (info != null) {
+ return new Integer(info.getPid());
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SerialPortSettingsBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SerialPortSettingsBlock.java
new file mode 100644
index 0000000000..4f537d12a5
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SerialPortSettingsBlock.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * 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.dsf.gdb.internal.ui.launching;
+
+import java.util.Observable;
+
+import org.eclipse.cdt.debug.internal.ui.PixelConverter;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.ComboDialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.IDialogFieldListener;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.LayoutUtil;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.StringDialogField;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class SerialPortSettingsBlock extends Observable {
+
+ private final static String DEFAULT_ASYNC_DEVICE = "/dev/ttyS0"; //$NON-NLS-1$
+
+ private final static String DEFAULT_ASYNC_DEVICE_SPEED = "115200"; //$NON-NLS-1$
+
+ private Shell fShell;
+
+ private StringDialogField fDeviceField;
+
+ private ComboDialogField fSpeedField;
+
+ private String fSpeedChoices[] = { "9600", "19200", "38400", "57600", "115200" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+
+ private Control fControl;
+
+ private String fErrorMessage = null;
+
+ public SerialPortSettingsBlock() {
+ super();
+ fDeviceField = createDeviceField();
+ fSpeedField = createSpeedField();
+ }
+
+ public void createBlock(Composite parent) {
+ fShell = parent.getShell();
+ Composite comp = ControlFactory.createCompositeEx(parent, 2, GridData.FILL_BOTH);
+ ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ ((GridLayout)comp.getLayout()).marginHeight = 0;
+ ((GridLayout)comp.getLayout()).marginWidth = 0;
+ comp.setFont(parent.getFont());
+ PixelConverter converter = new PixelConverter(comp);
+ fDeviceField.doFillIntoGrid(comp, 2);
+ LayoutUtil.setWidthHint(fDeviceField.getTextControl(null), converter.convertWidthInCharsToPixels(20));
+ fSpeedField.doFillIntoGrid(comp, 2);
+ ((GridData)fSpeedField.getComboControl(null).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
+ setControl(comp);
+ }
+
+ protected Shell getShell() {
+ return fShell;
+ }
+
+ public void dispose() {
+ deleteObservers();
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ initializeDevice(configuration);
+ initializeSpeed(configuration);
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV, DEFAULT_ASYNC_DEVICE);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV_SPEED, DEFAULT_ASYNC_DEVICE_SPEED);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ if (fDeviceField != null)
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV, fDeviceField.getText().trim());
+ if (fSpeedField != null) {
+ int index = fSpeedField.getSelectionIndex();
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV_SPEED, getSpeedItem(index));
+ }
+ }
+
+ private StringDialogField createDeviceField() {
+ StringDialogField field = new StringDialogField();
+ field.setLabelText(LaunchUIMessages.getString("SerialPortSettingsBlock.0")); //$NON-NLS-1$
+ field.setDialogFieldListener(new IDialogFieldListener() {
+
+ public void dialogFieldChanged(DialogField f) {
+ deviceFieldChanged();
+ }
+ });
+ return field;
+ }
+
+ private ComboDialogField createSpeedField() {
+ ComboDialogField field = new ComboDialogField(SWT.DROP_DOWN | SWT.READ_ONLY);
+ field.setLabelText(LaunchUIMessages.getString("SerialPortSettingsBlock.1")); //$NON-NLS-1$
+ field.setItems(fSpeedChoices);
+ field.setDialogFieldListener(new IDialogFieldListener() {
+
+ public void dialogFieldChanged(DialogField f) {
+ speedFieldChanged();
+ }
+ });
+ return field;
+ }
+
+ protected void deviceFieldChanged() {
+ updateErrorMessage();
+ setChanged();
+ notifyObservers();
+ }
+
+ protected void speedFieldChanged() {
+ updateErrorMessage();
+ setChanged();
+ notifyObservers();
+ }
+
+ private void initializeDevice(ILaunchConfiguration configuration) {
+ if (fDeviceField != null) {
+ try {
+ fDeviceField.setText(configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV, DEFAULT_ASYNC_DEVICE));
+ }
+ catch(CoreException e) {
+ }
+ }
+ }
+
+ private void initializeSpeed(ILaunchConfiguration configuration) {
+ if (fSpeedField != null) {
+ int index = 0;
+ try {
+ index = getSpeedItemIndex(configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEV_SPEED, DEFAULT_ASYNC_DEVICE_SPEED));
+ }
+ catch(CoreException e) {
+ }
+ fSpeedField.selectItem(index);
+ }
+ }
+
+ private String getSpeedItem(int index) {
+ return (index >= 0 && index < fSpeedChoices.length) ? fSpeedChoices[index] : null;
+ }
+
+ private int getSpeedItemIndex(String item) {
+ for(int i = 0; i < fSpeedChoices.length; ++i)
+ if (fSpeedChoices[i].equals(item))
+ return i;
+ return 0;
+ }
+
+ public Control getControl() {
+ return fControl;
+ }
+
+ protected void setControl(Control control) {
+ fControl = control;
+ }
+
+ public boolean isValid(ILaunchConfiguration configuration) {
+ updateErrorMessage();
+ return (getErrorMessage() == null);
+ }
+
+ private void updateErrorMessage() {
+ setErrorMessage(null);
+ if (fDeviceField != null && fSpeedField != null) {
+ if (fDeviceField.getText().trim().length() == 0)
+ setErrorMessage(LaunchUIMessages.getString("SerialPortSettingsBlock.2")); //$NON-NLS-1$
+ else if (!deviceIsValid(fDeviceField.getText().trim()))
+ setErrorMessage(LaunchUIMessages.getString("SerialPortSettingsBlock.3")); //$NON-NLS-1$
+ else if (fSpeedField.getSelectionIndex() < 0)
+ setErrorMessage(LaunchUIMessages.getString("SerialPortSettingsBlock.4")); //$NON-NLS-1$
+ }
+ }
+
+ public String getErrorMessage() {
+ return fErrorMessage;
+ }
+
+ private void setErrorMessage(String string) {
+ fErrorMessage = string;
+ }
+
+ private boolean deviceIsValid(String hostName) {
+ return true;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java
new file mode 100644
index 0000000000..6faa7b7dfc
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java
@@ -0,0 +1,620 @@
+/*******************************************************************************
+ * 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
+ * IBM Corporation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Observable;
+import java.util.Set;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.IBinaryParser;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
+import org.eclipse.cdt.core.IBinaryParser.IBinaryShared;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.internal.ui.PixelConverter;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.IDialogFieldListener;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.IListAdapter;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.LayoutUtil;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.ListDialogField;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
+
+/**
+ * The UI component to access the shared libraries search path.
+ */
+public class SolibSearchPathBlock extends Observable implements IMILaunchConfigurationComponent, IDialogFieldListener {
+
+ class AddDirectoryDialog extends Dialog {
+
+ protected Text fText;
+
+ private Button fBrowseButton;
+
+ private IPath fValue;
+
+ /**
+ * Constructor for AddDirectoryDialog.
+ */
+ public AddDirectoryDialog(Shell parentShell) {
+ super(parentShell);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite)super.createDialogArea(parent);
+
+ Composite subComp = ControlFactory.createCompositeEx(composite, 2, GridData.FILL_HORIZONTAL);
+ ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ subComp.setLayoutData(data);
+ subComp.setFont(parent.getFont());
+
+ fText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ fText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
+ fText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ updateOKButton();
+ }
+ });
+
+ fBrowseButton = ControlFactory.createPushButton(subComp, LaunchUIMessages.getString("GDBServerDebuggerPage.7")); //$NON-NLS-1$
+ data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ fBrowseButton.setLayoutData(data);
+ fBrowseButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ DirectoryDialog dialog = new DirectoryDialog(AddDirectoryDialog.this.getShell());
+ dialog.setMessage(LaunchUIMessages.getString("SolibSearchPathBlock.5")); //$NON-NLS-1$
+ String res = dialog.open();
+ if (res != null) {
+ fText.setText(res);
+ }
+ }
+ });
+
+ applyDialogFont(composite);
+ return composite;
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(LaunchUIMessages.getString("SolibSearchPathBlock.Add_Directory")); //$NON-NLS-1$
+ }
+
+ public IPath getValue() {
+ return fValue;
+ }
+
+ private void setValue(String value) {
+ fValue = (value != null) ? new Path(value) : null;
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ setValue(fText.getText());
+ }
+ else {
+ setValue(null);
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected void updateOKButton() {
+ Button okButton = getButton(IDialogConstants.OK_ID);
+ String text = fText.getText();
+ okButton.setEnabled(isValid(text));
+ }
+
+ protected boolean isValid(String text) {
+ return (text.trim().length() > 0);
+ }
+
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control control = super.createButtonBar(parent);
+ updateOKButton();
+ return control;
+ }
+ }
+
+ private Composite fControl;
+
+ public class SolibSearchPathListDialogField extends ListDialogField {
+
+ public SolibSearchPathListDialogField(IListAdapter adapter, String[] buttonLabels, ILabelProvider lprovider) {
+ super(adapter, buttonLabels, lprovider);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.internal.ui.dialogfields.ListDialogField#managedButtonPressed(int)
+ */
+ @Override
+ protected boolean managedButtonPressed(int index) {
+ boolean result = super.managedButtonPressed(index);
+ if (result)
+ buttonPressed(index);
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ListDialogField#getManagedButtonState(org.eclipse.jface.viewers.ISelection, int)
+ */
+ @Override
+ protected boolean getManagedButtonState(ISelection sel, int index) {
+ if (index > 3)
+ return getButtonState(sel, index);
+ return super.getManagedButtonState(sel, index);
+ }
+ }
+
+ private static String[] fgStaticButtonLabels = new String[] {
+ LaunchUIMessages.getString("SolibSearchPathBlock.0"), //$NON-NLS-1$
+ LaunchUIMessages.getString("SolibSearchPathBlock.1"), //$NON-NLS-1$
+ LaunchUIMessages.getString("SolibSearchPathBlock.2"), //$NON-NLS-1$
+ LaunchUIMessages.getString("SolibSearchPathBlock.3"), //$NON-NLS-1$
+ LaunchUIMessages.getString("SolibSearchPathBlock.6"), //$NON-NLS-1$
+ null, // separator
+ };
+
+ private IProject fProject;
+
+ private Shell fShell;
+
+ private SolibSearchPathListDialogField fDirList;
+
+ private IListAdapter fCustomListAdapter;
+
+ private File[] fAutoSolibs = new File[0];
+
+ public SolibSearchPathBlock() {
+ this(new String[0], null);
+ }
+
+ public SolibSearchPathBlock(String[] customButtonLabels, IListAdapter customListAdapter) {
+ super();
+ fCustomListAdapter = customListAdapter;
+ int length = fgStaticButtonLabels.length;
+ if (customButtonLabels.length > 0)
+ length += customButtonLabels.length;
+ String[] buttonLabels = new String[length];
+ System.arraycopy(fgStaticButtonLabels, 0, buttonLabels, 0, fgStaticButtonLabels.length);
+ if (length > fgStaticButtonLabels.length) {
+ for (int i = fgStaticButtonLabels.length; i < length; ++i)
+ buttonLabels[i] = customButtonLabels[i - fgStaticButtonLabels.length];
+ }
+ IListAdapter listAdapter = new IListAdapter() {
+ public void customButtonPressed(DialogField field, int index) {
+ buttonPressed(index);
+ }
+ public void selectionChanged(DialogField field) {
+ }
+ };
+ ILabelProvider lp = new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IPath)
+ return ((IPath)element).toOSString();
+ return super.getText(element);
+ }
+ };
+ fDirList = new SolibSearchPathListDialogField(listAdapter, buttonLabels, lp);
+ fDirList.setLabelText(LaunchUIMessages.getString("SolibSearchPathBlock.4")); //$NON-NLS-1$
+ fDirList.setUpButtonIndex(1);
+ fDirList.setDownButtonIndex(2);
+ fDirList.setRemoveButtonIndex(3);
+
+ fDirList.setDialogFieldListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ fShell = parent.getShell();
+ Composite comp = ControlFactory.createCompositeEx(parent, 2, GridData.FILL_BOTH);
+ ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ ((GridLayout)comp.getLayout()).marginHeight = 0;
+ ((GridLayout)comp.getLayout()).marginWidth = 0;
+ comp.setFont(parent.getFont());
+ PixelConverter converter = new PixelConverter(comp);
+ fDirList.doFillIntoGrid(comp, 3);
+ LayoutUtil.setHorizontalSpan(fDirList.getLabelControl(null), 2);
+ LayoutUtil.setWidthHint(fDirList.getLabelControl(null), converter.convertWidthInCharsToPixels(30));
+ LayoutUtil.setHorizontalGrabbing(fDirList.getListControl(null));
+ fControl = comp;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ IProject project = null;
+ try {
+ String projectName = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ if (projectName != null) {
+ projectName = projectName.trim();
+ if (projectName.length() > 0) {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ }
+ }
+ }
+ catch(CoreException e) {
+ }
+ setProject(project);
+
+ if (fDirList != null) {
+ try {
+ @SuppressWarnings("unchecked")
+ List<String> values = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH,
+ Collections.EMPTY_LIST);
+ ArrayList<Path> paths = new ArrayList<Path>(values.size());
+ Iterator<String> it = values.iterator();
+ while(it.hasNext()) {
+ paths.add(new Path(it.next()));
+ }
+ fDirList.addElements(paths);
+ }
+ catch(CoreException e) {
+ }
+ }
+
+ try {
+ fAutoSolibs = getAutoSolibs(configuration);
+ }
+ catch(CoreException e) {
+ }
+ }
+
+ public static File[] getAutoSolibs(ILaunchConfiguration configuration) throws CoreException {
+ @SuppressWarnings("unchecked")
+ List<String> autoSolibs = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB_LIST, Collections.EMPTY_LIST );
+
+ List<File> list = new ArrayList<File>(autoSolibs.size());
+ Iterator<String> it = autoSolibs.iterator();
+ while(it.hasNext()) {
+ list.add(new File(it.next()));
+ }
+ return list.toArray(new File[list.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ if (fDirList != null) {
+
+ @SuppressWarnings("unchecked")
+ List<IPath> elements = fDirList.getElements();
+
+ ArrayList<String> values = new ArrayList<String>(elements.size());
+ Iterator<IPath> it = elements.iterator();
+ while(it.hasNext()) {
+ values.add((it.next()).toOSString());
+ }
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, values);
+ }
+ ArrayList<String> autoLibs = new ArrayList<String>(fAutoSolibs.length);
+ for (int i = 0; i < fAutoSolibs.length; ++i)
+ autoLibs.add(fAutoSolibs[i].getPath());
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB_LIST, autoLibs);
+ }
+
+ protected void buttonPressed(int index) {
+ boolean changed = false;
+ if (index == 0) { // Add button
+ changed = addDirectory();
+ }
+ else if (index == 4) { //Select from list
+ changed = selectFromList();
+ }
+ else if (index >= fgStaticButtonLabels.length && fCustomListAdapter != null) {
+ fCustomListAdapter.customButtonPressed(fDirList, index);
+ changed = true;
+ }
+ if (changed) {
+ setChanged();
+ notifyObservers();
+ }
+ }
+
+ protected boolean getButtonState(ISelection sel, int index) {
+ if (index == 4) { // select from list
+ return (!sel.isEmpty());
+ }
+ return true;
+ }
+
+ protected Shell getShell() {
+ return fShell;
+ }
+
+ private boolean addDirectory() {
+ boolean changed = false;
+ AddDirectoryDialog dialog = new AddDirectoryDialog(getShell());
+ dialog.open();
+ IPath result = dialog.getValue();
+ if (result != null && !contains(result)) {
+ fDirList.addElement(result);
+ changed = true;
+ }
+ return changed;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#dispose()
+ */
+ public void dispose() {
+ deleteObservers();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#getControl()
+ */
+ public Control getControl() {
+ return fControl;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.IMILaunchConfigurationComponent#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public boolean isValid(ILaunchConfiguration launchConfig) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ private boolean contains(IPath path) {
+ @SuppressWarnings("unchecked")
+ List<IPath> list = fDirList.getElements();
+
+ Iterator<IPath> it = list.iterator();
+ while(it.hasNext()) {
+ IPath p = it.next();
+ if (p.toFile().equals(path.toFile()))
+ return true;
+ }
+ return false;
+ }
+
+ protected IProject getProject() {
+ return fProject;
+ }
+
+ private void setProject(IProject project) {
+ fProject = project;
+ }
+
+ protected boolean selectFromList() {
+ boolean changed = false;
+
+ @SuppressWarnings("unchecked")
+ List<IPath> dirList = fDirList.getSelectedElements();
+
+ final HashSet<IPath> libs = new HashSet<IPath>(10);
+ if (generateLibraryList(dirList.toArray(new IPath[dirList.size()]), libs)) {
+ ITreeContentProvider cp = new ITreeContentProvider() {
+
+ public Object[] getChildren(Object parentElement) {
+ return getElements(parentElement);
+ }
+
+ public Object getParent(Object element) {
+ if (libs.contains(element))
+ return libs;
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof Set) {
+ return ((Set)inputElement).toArray();
+ }
+ return new Object[0];
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ };
+
+ LabelProvider lp = new LabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof File)
+ return ((File)element).getName();
+ return super.getText(element);
+ }
+ };
+ CheckedTreeSelectionDialog dialog = new CheckedTreeSelectionDialog(getShell(), lp, cp);
+ dialog.setTitle(LaunchUIMessages.getString("SolibSearchPathBlock.7")); //$NON-NLS-1$
+ dialog.setMessage(LaunchUIMessages.getString("SolibSearchPathBlock.8")); //$NON-NLS-1$
+ dialog.setEmptyListMessage(LaunchUIMessages.getString("SolibSearchPathBlock.9")); //$NON-NLS-1$
+ dialog.setSorter(new ViewerSorter());
+ dialog.setInput(libs);
+ dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
+ if (dialog.open() == Window.OK) {
+ Object[] result = dialog.getResult();
+ fAutoSolibs = (File[])Arrays.asList(result).toArray(new File[result.length]);
+ changed = true;
+ }
+ }
+ return changed;
+ }
+
+ private boolean generateLibraryList(final IPath[] paths, final Set libs) {
+ boolean result = true;
+
+ IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+
+ for (int i = 0; i < paths.length; ++i) {
+ File dir = paths[i].toFile();
+ if (dir.exists() && dir.isDirectory()) {
+ File[] all = dir.listFiles();
+ for (int j = 0; j < all.length; ++j) {
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ monitor.subTask(all[j].getPath());
+ String libName = getSharedLibraryName(all[j]);
+ if (libName != null) {
+ libs.add(new File(libName));
+ }
+ }
+ }
+ }
+ }
+ };
+ try {
+ IRunnableContext context = new ProgressMonitorDialog(getShell());
+ context.run(true, true, runnable);
+ }
+ catch(InvocationTargetException e) {
+ }
+ catch(InterruptedException e) {
+ result = false;
+ }
+ return result;
+ }
+
+ protected String getSharedLibraryName(File file) {
+ if (!file.isFile())
+ return null;
+ IProject project = getProject();
+ if (project != null) {
+ IPath fullPath = new Path(file.getPath());
+ try {
+ ICExtensionReference[] binaryParsersExt = CCorePlugin.getDefault().getBinaryParserExtensions(project);
+ for(int i = 0; i < binaryParsersExt.length; i++) {
+ IBinaryParser parser = (IBinaryParser)binaryParsersExt[i].createExtension();
+ try {
+ IBinaryFile bin = parser.getBinary(fullPath);
+ if (bin instanceof IBinaryShared) {
+ String soname = ((IBinaryShared)bin).getSoName();
+ return (soname.length() != 0) ? soname : file.getName();
+ }
+ }
+ catch(IOException e) {
+ }
+ }
+ }
+ catch(CoreException e) {
+ }
+ return null;
+ }
+ // no project: for now
+ IPath path = new Path(file.getPath());
+ String name = path.lastSegment();
+ String extension = path.getFileExtension();
+ if (extension != null && (extension.compareTo("so") == 0 || extension.compareToIgnoreCase("dll") == 0)) //$NON-NLS-1$ //$NON-NLS-2$
+ return name;
+ return (name.indexOf(".so.") >= 0) ? name : null; //$NON-NLS-1$
+ }
+
+ protected boolean isSharedLibrary(File file) {
+ if (!file.isFile())
+ return false;
+ IProject project = getProject();
+ if (project != null) {
+ IPath fullPath = new Path(file.getPath());
+ try {
+ ICExtensionReference[] binaryParsersExt = CCorePlugin.getDefault().getBinaryParserExtensions(project);
+ for(int i = 0; i < binaryParsersExt.length; i++) {
+ IBinaryParser parser = (IBinaryParser)binaryParsersExt[i].createExtension();
+ try {
+ IBinaryFile bin = parser.getBinary(fullPath);
+ return (bin instanceof IBinaryShared);
+ }
+ catch(IOException e) {
+ }
+ }
+ }
+ catch(CoreException e) {
+ }
+ return false;
+ }
+ // no project: for now
+ IPath path = new Path(file.getPath());
+ String extension = path.getFileExtension();
+ if (extension != null && (extension.compareTo("so") == 0 || extension.compareToIgnoreCase("dll") == 0)) //$NON-NLS-1$ //$NON-NLS-2$
+ return true;
+ String name = path.lastSegment();
+ return (name.indexOf(".so.") >= 0); //$NON-NLS-1$
+ }
+
+ public void dialogFieldChanged(DialogField field) {
+ setChanged();
+ notifyObservers();
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/TCPSettingsBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/TCPSettingsBlock.java
new file mode 100644
index 0000000000..6327198504
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/TCPSettingsBlock.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * 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.dsf.gdb.internal.ui.launching;
+
+import java.util.Observable;
+
+import org.eclipse.cdt.debug.internal.ui.PixelConverter;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.IDialogFieldListener;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.LayoutUtil;
+import org.eclipse.cdt.debug.internal.ui.dialogfields.StringDialogField;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class TCPSettingsBlock extends Observable {
+
+ private final static String DEFAULT_HOST_NAME = "localhost"; //$NON-NLS-1$
+
+ private final static String DEFAULT_PORT_NUMBER = "10000"; //$NON-NLS-1$
+
+ private Shell fShell;
+
+ private StringDialogField fHostNameField;
+
+ private StringDialogField fPortNumberField;
+
+ private Control fControl;
+
+ private String fErrorMessage = null;
+
+ public TCPSettingsBlock() {
+ super();
+ fHostNameField = createHostNameField();
+ fPortNumberField = createPortNumberField();
+ }
+
+ public void createBlock(Composite parent) {
+ fShell = parent.getShell();
+ Composite comp = ControlFactory.createCompositeEx(parent, 2, GridData.FILL_BOTH);
+ ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ ((GridLayout)comp.getLayout()).marginHeight = 0;
+ ((GridLayout)comp.getLayout()).marginWidth = 0;
+ comp.setFont(parent.getFont());
+ PixelConverter converter = new PixelConverter(comp);
+ fHostNameField.doFillIntoGrid(comp, 2);
+ LayoutUtil.setWidthHint(fHostNameField.getTextControl(null), converter.convertWidthInCharsToPixels(20));
+ fPortNumberField.doFillIntoGrid(comp, 2);
+ ((GridData)fPortNumberField.getTextControl(null).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
+ LayoutUtil.setWidthHint(fPortNumberField.getTextControl(null), converter.convertWidthInCharsToPixels(10));
+ setControl(comp);
+ }
+
+ protected Shell getShell() {
+ return fShell;
+ }
+
+ public void dispose() {
+ deleteObservers();
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ initializeHostName(configuration);
+ initializePortNumber(configuration);
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, DEFAULT_HOST_NAME);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, DEFAULT_PORT_NUMBER);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ if (fHostNameField != null)
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, fHostNameField.getText().trim());
+ if (fPortNumberField != null)
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, fPortNumberField.getText().trim());
+ }
+
+ private StringDialogField createHostNameField() {
+ StringDialogField field = new StringDialogField();
+ field.setLabelText(LaunchUIMessages.getString("TCPSettingsBlock.0")); //$NON-NLS-1$
+ field.setDialogFieldListener(new IDialogFieldListener() {
+
+ public void dialogFieldChanged(DialogField f) {
+ hostNameFieldChanged();
+ }
+ });
+ return field;
+ }
+
+ private StringDialogField createPortNumberField() {
+ StringDialogField field = new StringDialogField();
+ field.setLabelText(LaunchUIMessages.getString("TCPSettingsBlock.1")); //$NON-NLS-1$
+ field.setDialogFieldListener(new IDialogFieldListener() {
+
+ public void dialogFieldChanged(DialogField f) {
+ portNumberFieldChanged();
+ }
+ });
+ return field;
+ }
+
+ protected void hostNameFieldChanged() {
+ updateErrorMessage();
+ setChanged();
+ notifyObservers();
+ }
+
+ protected void portNumberFieldChanged() {
+ updateErrorMessage();
+ setChanged();
+ notifyObservers();
+ }
+
+ private void initializeHostName(ILaunchConfiguration configuration) {
+ if (fHostNameField != null) {
+ try {
+ fHostNameField.setText(configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, DEFAULT_HOST_NAME));
+ }
+ catch(CoreException e) {
+ }
+ }
+ }
+
+ private void initializePortNumber(ILaunchConfiguration configuration) {
+ if (fPortNumberField != null) {
+ try {
+ fPortNumberField.setText(configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, DEFAULT_PORT_NUMBER));
+ }
+ catch(CoreException e) {
+ }
+ }
+ }
+
+ public Control getControl() {
+ return fControl;
+ }
+
+ protected void setControl(Control control) {
+ fControl = control;
+ }
+
+ public boolean isValid(ILaunchConfiguration configuration) {
+ updateErrorMessage();
+ return (getErrorMessage() == null);
+ }
+
+ private void updateErrorMessage() {
+ setErrorMessage(null);
+ if (fHostNameField != null && fPortNumberField != null) {
+ if (fHostNameField.getText().trim().length() == 0)
+ setErrorMessage(LaunchUIMessages.getString("TCPSettingsBlock.2")); //$NON-NLS-1$
+ else if (!hostNameIsValid(fHostNameField.getText().trim()))
+ setErrorMessage(LaunchUIMessages.getString("TCPSettingsBlock.3")); //$NON-NLS-1$
+ else if (fPortNumberField.getText().trim().length() == 0)
+ setErrorMessage(LaunchUIMessages.getString("TCPSettingsBlock.4")); //$NON-NLS-1$
+ else if (!portNumberIsValid(fPortNumberField.getText().trim()))
+ setErrorMessage(LaunchUIMessages.getString("TCPSettingsBlock.5")); //$NON-NLS-1$
+ }
+ }
+
+ public String getErrorMessage() {
+ return fErrorMessage;
+ }
+
+ private void setErrorMessage(String string) {
+ fErrorMessage = string;
+ }
+
+ private boolean hostNameIsValid(String hostName) {
+ return true;
+ }
+
+ private boolean portNumberIsValid(String portNumber) {
+ try {
+ int port = Integer.parseInt(portNumber);
+ return (port > 0 && port <= 0xFFFF);
+ }
+ catch(NumberFormatException e) {
+ return false;
+ }
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java
new file mode 100644
index 0000000000..36c70746f1
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java
@@ -0,0 +1,394 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Ericsson - Updated for DSF
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import java.io.File;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+
+
+/**
+ * A control for setting the working directory associated with a launch
+ * configuration.
+ */
+public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
+
+ // Local directory
+ protected Text fWorkingDirText;
+ protected Button fWorkspaceButton;
+ protected Button fFileSystemButton;
+ protected Button fVariablesButton;
+
+ // use default button
+ protected Button fUseDefaultWorkingDirButton;
+
+ /**
+ * The last launch config this tab was initialized from
+ */
+ protected ILaunchConfiguration fLaunchConfiguration;
+
+ /**
+ * A listener to update for text changes and widget selection
+ */
+ private class WidgetListener extends SelectionAdapter implements ModifyListener {
+
+ public void modifyText(ModifyEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Object source = e.getSource();
+ if (source == fWorkspaceButton) {
+ handleWorkspaceDirBrowseButtonSelected();
+ } else if (source == fFileSystemButton) {
+ handleWorkingDirBrowseButtonSelected();
+ } else if (source == fUseDefaultWorkingDirButton) {
+ handleUseDefaultWorkingDirButtonSelected();
+ } else if (source == fVariablesButton) {
+ handleWorkingDirVariablesButtonSelected();
+ }
+ }
+ }
+
+ private WidgetListener fListener = new WidgetListener();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Font font = parent.getFont();
+
+ Group group = new Group(parent, SWT.NONE);
+ // WorkbenchHelp.setHelp(group,
+ // IJavaDebugHelpContextIds.WORKING_DIRECTORY_BLOCK);
+ GridLayout workingDirLayout = new GridLayout();
+ workingDirLayout.makeColumnsEqualWidth = false;
+ group.setLayout(workingDirLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ group.setLayoutData(gd);
+ group.setFont(font);
+ setControl(group);
+
+ group.setText(LaunchUIMessages.getString("WorkingDirectoryBlock.Working_directory")); //$NON-NLS-1$
+
+ fWorkingDirText = new Text(group, SWT.SINGLE | SWT.BORDER);
+ fWorkingDirText.getAccessible().addAccessibleListener(
+ new AccessibleAdapter() {
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = LaunchUIMessages.getString("WorkingDirectoryBlock.Working_directory"); //$NON-NLS-1$
+ }
+ }
+ );
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fWorkingDirText.setLayoutData(gd);
+ fWorkingDirText.setFont(font);
+ fWorkingDirText.addModifyListener(fListener);
+
+ fUseDefaultWorkingDirButton = new Button(group, SWT.CHECK);
+ fUseDefaultWorkingDirButton.setText(LaunchUIMessages.getString("WorkingDirectoryBlock.Use_default")); //$NON-NLS-1$
+ gd = new GridData(GridData.FILL, GridData.BEGINNING, true, false);
+ fUseDefaultWorkingDirButton.setLayoutData(gd);
+ fUseDefaultWorkingDirButton.setFont(font);
+ fUseDefaultWorkingDirButton.addSelectionListener(fListener);
+
+ Composite buttonComp = new Composite(group, SWT.NONE);
+ GridLayout layout = new GridLayout(3, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ buttonComp.setLayout(layout);
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ buttonComp.setLayoutData(gd);
+ buttonComp.setFont(font);
+ fWorkspaceButton = createPushButton(buttonComp, LaunchUIMessages.getString("WorkingDirectoryBlock.0"), null); //$NON-NLS-1$
+ fWorkspaceButton.addSelectionListener(fListener);
+
+ fFileSystemButton = createPushButton(buttonComp, LaunchUIMessages.getString("WorkingDirectoryBlock.1"), null); //$NON-NLS-1$
+ fFileSystemButton.addSelectionListener(fListener);
+
+ fVariablesButton = createPushButton(buttonComp, LaunchUIMessages.getString("WorkingDirectoryBlock.17"), null); //$NON-NLS-1$
+ fVariablesButton.addSelectionListener(fListener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /**
+ * Show a dialog that lets the user select a working directory
+ */
+ protected void handleWorkingDirBrowseButtonSelected() {
+ DirectoryDialog dialog = new DirectoryDialog(getShell());
+ dialog.setMessage(LaunchUIMessages.getString("WorkingDirectoryBlock.7")); //$NON-NLS-1$
+ String currentWorkingDir = fWorkingDirText.getText();
+ if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$
+ File path = new File(currentWorkingDir);
+ if (path.exists()) {
+ dialog.setFilterPath(currentWorkingDir);
+ }
+ }
+
+ String selectedDirectory = dialog.open();
+ if (selectedDirectory != null) {
+ fWorkingDirText.setText(selectedDirectory);
+ }
+ }
+
+ /**
+ * Show a dialog that lets the user select a working directory from the
+ * workspace
+ */
+ protected void handleWorkspaceDirBrowseButtonSelected() {
+ ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
+ LaunchUIMessages.getString("WorkingDirectoryBlock.4")); //$NON-NLS-1$
+
+ IContainer currentContainer = getContainer();
+ if (currentContainer != null) {
+ IPath path = currentContainer.getFullPath();
+ dialog.setInitialSelections(new Object[] { path});
+ }
+
+ dialog.showClosedProjects(false);
+ dialog.open();
+ Object[] results = dialog.getResult();
+ if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
+ IPath path = (IPath) results[0];
+ String containerName = path.makeRelative().toString();
+ fWorkingDirText.setText("${workspace_loc:" + containerName + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * Returns the selected workspace container,or <code>null</code>
+ */
+ protected IContainer getContainer() {
+ String path = fWorkingDirText.getText().trim();
+ if (path.length() > 0) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource res = root.findMember(path);
+ if (res instanceof IContainer) {
+ return (IContainer) res;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * The default working dir check box has been toggled.
+ */
+ protected void handleUseDefaultWorkingDirButtonSelected() {
+ boolean def = isDefaultWorkingDirectory();
+ if (def) {
+ setDefaultWorkingDir();
+ }
+ fWorkingDirText.setEnabled(!def);
+ fWorkspaceButton.setEnabled(!def);
+ fVariablesButton.setEnabled(!def);
+ fFileSystemButton.setEnabled(!def);
+ }
+
+ protected void handleWorkingDirVariablesButtonSelected() {
+ String variableText = getVariable();
+ if (variableText != null) {
+ fWorkingDirText.append(variableText);
+ }
+ }
+
+ private String getVariable() {
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+ dialog.open();
+ return dialog.getVariableExpression();
+ }
+
+ /**
+ * Sets the default working directory
+ */
+ protected void setDefaultWorkingDir() {
+ try {
+ ILaunchConfiguration config = getLaunchConfiguration();
+ if (config != null) {
+ ICProject cProject = LaunchUtils.getCProject(config);
+ if (cProject != null) {
+ fWorkingDirText.setText("${workspace_loc:" + cProject.getPath().makeRelative().toOSString() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+ }
+ } catch (CoreException ce) {
+ }
+ fWorkingDirText.setText(System.getProperty("user.dir")); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+
+ setErrorMessage(null);
+ setMessage(null);
+
+ // if variables are present, we cannot resolve the directory
+ String workingDirPath = fWorkingDirText.getText().trim();
+ if (workingDirPath.indexOf("${") >= 0) { //$NON-NLS-1$
+ IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ manager.validateStringVariables(workingDirPath);
+ } catch (CoreException e) {
+ setErrorMessage(e.getMessage());
+ return false;
+ }
+ } else if (workingDirPath.length() > 0) {
+ IContainer container = getContainer();
+ if (container == null) {
+ File dir = new File(workingDirPath);
+ if (dir.isDirectory()) {
+ return true;
+ }
+ setErrorMessage(LaunchUIMessages.getString("WorkingDirectoryBlock.10")); //$NON-NLS-1$
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Defaults are empty.
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ // config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+ // (String)null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ setLaunchConfiguration(configuration);
+ try {
+ String wd = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
+ fWorkingDirText.setText(""); //$NON-NLS-1$
+ if (wd == null) {
+ fUseDefaultWorkingDirButton.setSelection(true);
+ } else {
+ fWorkingDirText.setText(wd);
+ fUseDefaultWorkingDirButton.setSelection(false);
+ }
+ handleUseDefaultWorkingDirButtonSelected();
+ } catch (CoreException e) {
+ setErrorMessage(LaunchUIMessages.getString("WorkingDirectoryBlock.Exception_occurred_reading_configuration___15") + e.getStatus().getMessage()); //$NON-NLS-1$
+ GdbUIPlugin.log(e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ String wd = null;
+ if (!isDefaultWorkingDirectory()) {
+ wd = getAttributeValueFrom(fWorkingDirText);
+ }
+ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, wd);
+ }
+
+ /**
+ * Retuns the string in the text widget, or <code>null</code> if empty.
+ *
+ * @return text or <code>null</code>
+ */
+ protected String getAttributeValueFrom(Text text) {
+ String content = text.getText().trim();
+ if (content.length() > 0) {
+ return content;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+ */
+ public String getName() {
+ return LaunchUIMessages.getString("WorkingDirectoryBlock.Working_Directory_8"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns whether the default working directory is to be used
+ */
+ protected boolean isDefaultWorkingDirectory() {
+ return fUseDefaultWorkingDirButton.getSelection();
+ }
+
+ /**
+ * Sets the c project currently specified by the given launch config, if
+ * any.
+ */
+ protected void setLaunchConfiguration(ILaunchConfiguration config) {
+ fLaunchConfiguration = config;
+ }
+
+ /**
+ * Returns the current c project context
+ */
+ protected ILaunchConfiguration getLaunchConfiguration() {
+ return fLaunchConfiguration;
+ }
+
+}
+
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java
new file mode 100644
index 0000000000..5c08a97051
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel;
+
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.AbstractDebugVMAdapter;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.VariableVMProvider;
+import org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch.LaunchVMProvider;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/*
+ *
+ */
+@ThreadSafe
+@SuppressWarnings("restriction")
+public class GdbViewModelAdapter extends AbstractDebugVMAdapter
+{
+ public GdbViewModelAdapter(DsfSession session, SteppingController controller) {
+ super(session, controller);
+ getSession().registerModelAdapter(IColumnPresentationFactory.class, this);
+ }
+
+ @Override
+ public void dispose() {
+ getSession().unregisterModelAdapter(IColumnPresentationFactory.class);
+ super.dispose();
+ }
+
+ @Override
+ protected AbstractDMVMProvider createViewModelProvider(IPresentationContext context) {
+ if ( IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId()) ) {
+ return new LaunchVMProvider(this, context, getSession());
+ } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) ) {
+ return new VariableVMProvider(this, context, getSession());
+ } else if (IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId()) ) {
+ return new RegisterVMProvider(this, context, getSession());
+ } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
+ return new ExpressionVMProvider(this, context, getSession());
+ } else if (IDebugUIConstants.ID_MODULE_VIEW.equals(context.getId()) ) {
+ return new ModulesVMProvider(this, context, getSession());
+ }
+ return null;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
new file mode 100644
index 0000000000..bff2b7d7db
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Ericsson and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ericsson - Initial API and implementation
+ * Wind River Systems - Factored out AbstractContainerVMNode
+ *******************************************************************************/
+
+package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
+
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractContainerVMNode;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.IMemento;
+
+
+@SuppressWarnings("restriction")
+public class ContainerVMNode extends AbstractContainerVMNode
+ implements IElementMementoProvider
+{
+ public ContainerVMNode(AbstractDMVMProvider provider, DsfSession session) {
+ super(provider, session);
+ }
+
+ @Override
+ public String toString() {
+ return "ContainerVMNode(" + getSession().getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Override
+ protected void updateElementsInSessionThread(final IChildrenUpdate update) {
+ IProcesses processService = getServicesTracker().getService(IProcesses.class);
+ ICommandControlService controlService = getServicesTracker().getService(ICommandControlService.class);
+ if (processService == null || controlService == null) {
+ handleFailedUpdate(update);
+ return;
+ }
+
+ processService.getProcessesBeingDebugged(
+ controlService.getContext(),
+ new ViewerDataRequestMonitor<IDMContext[]>(getExecutor(), update) {
+ @Override
+ public void handleCompleted() {
+ if (!isSuccess()) {
+ handleFailedUpdate(update);
+ return;
+ }
+ if (getData() != null) fillUpdateWithVMCs(update, getData());
+ update.done();
+ }
+ });
+ }
+
+
+ @Override
+ protected void updateLabelInSessionThread(final ILabelUpdate update) {
+ IProcesses processService = getServicesTracker().getService(IProcesses.class);
+ IRunControl runControl = getServicesTracker().getService(IRunControl.class);
+ if (processService == null || runControl == null) {
+ handleFailedUpdate(update);
+ return;
+ }
+
+ final IProcessDMContext procDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IProcessDMContext.class);
+ final IContainerDMContext contDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IContainerDMContext.class);
+
+ String imageKey = null;
+ if (runControl.isSuspended(contDmc)) {
+ imageKey = IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED;
+ } else {
+ imageKey = IDebugUIConstants.IMG_OBJS_THREAD_RUNNING;
+ }
+ update.setImageDescriptor(DebugUITools.getImageDescriptor(imageKey), 0);
+
+ processService.getExecutionData(
+ procDmc,
+ new ViewerDataRequestMonitor<IThreadDMData>(getExecutor(), update) {
+ @Override
+ public void handleCompleted() {
+ if (!isSuccess()) {
+ update.setLabel("<unavailable>", 0); //$NON-NLS-1$
+ update.done();
+ return;
+ }
+
+ // Create Labels of type Name[PID] if the pid is available
+ final StringBuilder builder = new StringBuilder();
+ builder.append(getData().getName());
+ if (getData().getId() != null && getData().getId().length() > 0) {
+ builder.append("[" + getData().getId()+ "]"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ update.setLabel(builder.toString(), 0);
+ update.done();
+ }
+ });
+ }
+
+ @Override
+ public int getDeltaFlags(Object e) {
+ if (e instanceof ICommandControlShutdownDMEvent) {
+ return IModelDelta.CONTENT;
+ }
+ return super.getDeltaFlags(e);
+ }
+
+ @Override
+ public void buildDelta(Object e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
+ if (e instanceof ICommandControlShutdownDMEvent) {
+ parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.CONTENT);
+ } else {
+ super.buildDelta(e, parentDelta, nodeOffset, requestMonitor);
+ return;
+ }
+ requestMonitor.done();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
+ */
+ private final String MEMENTO_NAME = "CONTAINER_MEMENTO_NAME"; //$NON-NLS-1$
+
+ public void compareElements(IElementCompareRequest[] requests) {
+ for (final IElementCompareRequest request : requests) {
+
+ Object element = request.getElement();
+ final IMemento memento = request.getMemento();
+ final String mementoName = memento.getString(MEMENTO_NAME);
+
+ if (mementoName != null) {
+ if (element instanceof IDMVMContext) {
+
+ IDMContext dmc = ((IDMVMContext)element).getDMContext();
+
+ if (dmc instanceof IContainerDMContext)
+ {
+ final IProcessDMContext procDmc = findDmcInPath(request.getViewerInput(), request.getElementPath(), IProcessDMContext.class);
+
+ if (procDmc != null) {
+ try {
+ getSession().getExecutor().execute(new DsfRunnable() {
+ public void run() {
+ final IProcesses processService = getServicesTracker().getService(IProcesses.class);
+ if (processService != null) {
+ processService.getExecutionData(
+ procDmc,
+ new ViewerDataRequestMonitor<IThreadDMData>(processService.getExecutor(), request) {
+ @Override
+ protected void handleCompleted() {
+ if ( getStatus().isOK() ) {
+ memento.putString(MEMENTO_NAME, "Container." + getData().getName() + getData().getId()); //$NON-NLS-1$
+ }
+ request.done();
+ }
+ });
+ }
+ else {
+ request.done();
+ }
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ request.done();
+ }
+
+ continue;
+ }
+ }
+ }
+ }
+ request.done();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
+ */
+ public void encodeElements(IElementMementoRequest[] requests) {
+ for (final IElementMementoRequest request : requests) {
+
+ Object element = request.getElement();
+ final IMemento memento = request.getMemento();
+
+ if (element instanceof IDMVMContext) {
+
+ IDMContext dmc = ((IDMVMContext)element).getDMContext();
+
+ if (dmc instanceof IContainerDMContext)
+ {
+ final IProcessDMContext procDmc = findDmcInPath(request.getViewerInput(), request.getElementPath(), IProcessDMContext.class);
+
+ if (procDmc != null) {
+ try {
+ getSession().getExecutor().execute(new DsfRunnable() {
+ public void run() {
+ final IProcesses processService = getServicesTracker().getService(IProcesses.class);
+ if (processService != null) {
+ processService.getExecutionData(
+ procDmc,
+ new ViewerDataRequestMonitor<IThreadDMData>(processService.getExecutor(), request) {
+ @Override
+ protected void handleCompleted() {
+ if ( getStatus().isOK() ) {
+ memento.putString(MEMENTO_NAME, "Container." + getData().getName() + getData().getId()); //$NON-NLS-1$
+ }
+ request.done();
+ }
+ });
+ } else {
+ request.done();
+ }
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ request.done();
+ }
+
+ continue;
+ }
+ }
+ }
+ request.done();
+ }
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMModelProxyStrategy.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMModelProxyStrategy.java
new file mode 100644
index 0000000000..d180558738
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMModelProxyStrategy.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
+
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.DefaultVMModelProxyStrategy;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ *
+ */
+public class LaunchVMModelProxyStrategy extends DefaultVMModelProxyStrategy {
+
+ final private TreePath fRootPath;
+
+ public LaunchVMModelProxyStrategy(AbstractVMProvider provider, Object rootElement) {
+ super(provider, rootElement);
+ fRootPath = new TreePath( new Object[] { rootElement });
+ }
+
+ @Override
+ public Object getViewerInput() {
+ return DebugPlugin.getDefault().getLaunchManager();
+ }
+
+ @Override
+ public TreePath getRootPath() {
+ return fRootPath;
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java
new file mode 100644
index 0000000000..b8282dd020
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Ericsson - Modified for new functionality
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.service.ICachingService;
+import org.eclipse.cdt.dsf.debug.service.IProcesses;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IStack;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlInitializedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractLaunchVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.LaunchRootVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.StackFramesVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.StandardProcessVMNode;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
+import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchesListener2;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+
+/**
+ *
+ */
+@SuppressWarnings("restriction")
+public class LaunchVMProvider extends AbstractLaunchVMProvider
+ implements IDebugEventSetListener, ILaunchesListener2
+{
+ @ThreadSafe
+ public LaunchVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session)
+ {
+ super(adapter, presentationContext, session);
+
+ IRootVMNode launchNode = new LaunchRootVMNode(this);
+ setRootNode(launchNode);
+
+ // Container node to contain all processes and threads
+ IVMNode containerNode = new ContainerVMNode(this, getSession());
+ IVMNode processesNode = new StandardProcessVMNode(this);
+ addChildNodes(launchNode, new IVMNode[] { containerNode, processesNode});
+
+ IVMNode threadsNode = new ThreadVMNode(this, getSession());
+ addChildNodes(containerNode, new IVMNode[] { threadsNode });
+
+ IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
+ addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
+
+
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+ }
+
+ @Override
+ public void dispose() {
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+ DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
+ super.dispose();
+ }
+
+ @Override
+ protected boolean canSkipHandlingEvent(Object newEvent, Object eventToSkip) {
+ // Never skip the process lifecycle events.
+ if (eventToSkip instanceof ICommandControlInitializedDMEvent ||
+ eventToSkip instanceof ICommandControlShutdownDMEvent)
+ {
+ return false;
+ }
+ return super.canSkipHandlingEvent(newEvent, eventToSkip);
+ }
+
+ @Override
+ public void refresh() {
+ super.refresh();
+ try {
+ getSession().getExecutor().execute(new DsfRunnable() {
+ public void run() {
+ DsfServicesTracker tracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), getSession().getId());
+ IProcesses processesService = tracker.getService(IProcesses.class);
+ if (processesService instanceof ICachingService) {
+ ((ICachingService)processesService).flushCache(null);
+ }
+ IStack stackService = tracker.getService(IStack.class);
+ if (stackService instanceof ICachingService) {
+ ((ICachingService)stackService).flushCache(null);
+ }
+ IRunControl runControlService = tracker.getService(IRunControl.class);
+ if (runControlService instanceof ICachingService) {
+ ((ICachingService)runControlService).flushCache(null);
+ }
+ tracker.dispose();
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ // Session disposed, ignore.
+ }
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java
new file mode 100644
index 0000000000..1942e2e8a6
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Ericsson - Modified for multi threaded functionality
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
+
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMData;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractThreadVMNode;
+import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.IMemento;
+
+
+@SuppressWarnings("restriction")
+public class ThreadVMNode extends AbstractThreadVMNode
+ implements IElementLabelProvider, IElementMementoProvider
+{
+ public ThreadVMNode(AbstractDMVMProvider provider, DsfSession session) {
+ super(provider, session);
+ }
+
+ @Override
+ public String toString() {
+ return "ThreadVMNode(" + getSession().getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Override
+ protected void updateLabelInSessionThread(ILabelUpdate[] updates) {
+ for (final ILabelUpdate update : updates) {
+ final IRunControl runControl = getServicesTracker().getService(IRunControl.class);
+ if (runControl == null) {
+ handleFailedUpdate(update);
+ continue;
+ }
+
+ final IMIExecutionDMContext execDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IMIExecutionDMContext.class);
+
+ String imageKey = null;
+ final boolean threadSuspended;
+ if (runControl.isSuspended(execDmc)) {
+ threadSuspended = true;
+ imageKey = IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED;
+ } else {
+ threadSuspended = false;
+ imageKey = IDebugUIConstants.IMG_OBJS_THREAD_RUNNING;
+ }
+ update.setImageDescriptor(DebugUITools.getImageDescriptor(imageKey), 0);
+
+ // Find the Reason for the State
+ runControl.getExecutionData(execDmc,
+ new ViewerDataRequestMonitor<IExecutionDMData>(getSession().getExecutor(), update) {
+ @Override
+ public void handleCompleted(){
+ if (!isSuccess()) {
+ update.setLabel("<unavailable>", 0); //$NON-NLS-1$
+ update.done();
+ return;
+ }
+
+ final IProcesses procService = getServicesTracker().getService(IProcesses.class);
+ if ( procService == null ) {
+ handleFailedUpdate(update);
+ return;
+ }
+
+ final StateChangeReason reason = getData().getStateChangeReason();
+
+ // Retrieve the rest of the thread information
+ final IThreadDMContext threadDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IThreadDMContext.class);
+
+ procService.getExecutionData(
+ threadDmc,
+ new ViewerDataRequestMonitor<IThreadDMData>(getSession().getExecutor(), update) {
+ @Override
+ public void handleCompleted() {
+ // We can still generate a good enough label even if this call fails
+ // so continue and check if we should use getData() or not.
+
+ // Create Labels of type Thread[GDBthreadId]RealThreadID/Name (State: Reason)
+ // Thread[1] 3457 (Suspended:BREAKPOINT)
+ final StringBuilder builder = new StringBuilder("Thread["); //$NON-NLS-1$
+ builder.append(execDmc.getThreadId());
+ builder.append("] "); //$NON-NLS-1$
+ if (isSuccess()) {
+ builder.append(getData().getId());
+ builder.append(getData().getName());
+ }
+ if(threadSuspended)
+ builder.append(" (Suspended"); //$NON-NLS-1$
+ else
+ builder.append(" (Running"); //$NON-NLS-1$
+ // Reason will be null before ContainerSuspendEvent is fired
+ if(reason != null) {
+ builder.append(" : "); //$NON-NLS-1$
+ builder.append(reason);
+ }
+ builder.append(")"); //$NON-NLS-1$
+ update.setLabel(builder.toString(), 0);
+ update.done();
+ }
+ });
+ }
+ });
+
+ }
+ }
+
+ private String produceThreadElementName(String viewName, IMIExecutionDMContext execCtx) {
+ return "Thread." + execCtx.getThreadId(); //$NON-NLS-1$
+ }
+
+ private static final String MEMENTO_NAME = "THREAD_MEMENTO_NAME"; //$NON-NLS-1$
+
+ /*
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
+ */
+ public void compareElements(IElementCompareRequest[] requests) {
+
+ for ( IElementCompareRequest request : requests ) {
+
+ Object element = request.getElement();
+ IMemento memento = request.getMemento();
+ String mementoName = memento.getString(MEMENTO_NAME);
+
+ if (mementoName != null) {
+ if (element instanceof IDMVMContext) {
+
+ IDMContext dmc = ((IDMVMContext)element).getDMContext();
+
+ if ( dmc instanceof IMIExecutionDMContext) {
+
+ String elementName = produceThreadElementName( request.getPresentationContext().getId(), (IMIExecutionDMContext) dmc );
+ request.setEqual( elementName.equals( mementoName ) );
+ }
+ }
+ }
+ request.done();
+ }
+ }
+
+ /*
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
+ */
+ public void encodeElements(IElementMementoRequest[] requests) {
+
+ for ( IElementMementoRequest request : requests ) {
+
+ Object element = request.getElement();
+ IMemento memento = request.getMemento();
+
+ if (element instanceof IDMVMContext) {
+
+ IDMContext dmc = ((IDMVMContext)element).getDMContext();
+
+ if ( dmc instanceof IMIExecutionDMContext) {
+
+ String elementName = produceThreadElementName( request.getPresentationContext().getId(), (IMIExecutionDMContext) dmc );
+ memento.putString(MEMENTO_NAME, elementName);
+ }
+ }
+ request.done();
+ }
+ }
+
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.classpath b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.options b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.options
new file mode 100644
index 0000000000..28eeb8b6aa
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.options
@@ -0,0 +1 @@
+org.eclipse.cdt.dsf.gdb/debug = false
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.project b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.project
new file mode 100644
index 0000000000..01d65c0488
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.dsf.gdb</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters
new file mode 100644
index 0000000000..5d4626f8d7
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component id="org.eclipse.cdt.dsf.gdb" version="2">
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GDBDebugger.java" type="org.eclipse.cdt.dsf.gdb.launching.GDBDebugger">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GDBDebugger"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java" type="org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/LaunchMessages.java" type="org.eclipse.cdt.dsf.gdb.launching.LaunchMessages">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.LaunchMessages"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java" type="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControlDMContext.java" type="org.eclipse.cdt.dsf.gdb.service.command.GDBControlDMContext">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.service.command.GDBControlDMContext"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/ShutdownSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.ShutdownSequence">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.ShutdownSequence"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/breakpoints/CBreakpointGdbThreadsFilterExtension.java" type="org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="META-INF/MANIFEST.MF">
+<filter id="923795461">
+<message_arguments>
+<message_argument value="1.1.0.qualifier"/>
+<message_argument value="1.0.0.v20080609"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GDBServerDebugger.java" type="org.eclipse.cdt.dsf.gdb.launching.GDBServerDebugger">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GDBServerDebugger"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java" type="org.eclipse.cdt.dsf.gdb.service.command.GDBControl">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.service.command.GDBControl"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunch.java" type="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.ServicesLaunchSequence">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.launching.ServicesLaunchSequence"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/GDBRunControl.java" type="org.eclipse.cdt.dsf.gdb.service.GDBRunControl">
+<filter id="305365105">
+<message_arguments>
+<message_argument value="org.eclipse.cdt.dsf.gdb.service.GDBRunControl"/>
+<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
+</message_arguments>
+</filter>
+</resource>
+</component>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/org.eclipse.jdt.core.prefs b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..acad5c5fe9
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Tue Jun 24 11:04:03 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+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.5
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..997fe8ae32
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.GdbPlugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.cdt.dsf,
+ org.eclipse.debug.core,
+ org.eclipse.cdt.core,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.core.variables
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.cdt.dsf.gdb,
+ org.eclipse.cdt.dsf.gdb.actions,
+ org.eclipse.cdt.dsf.gdb.breakpoints,
+ org.eclipse.cdt.dsf.gdb.launching,
+ org.eclipse.cdt.dsf.gdb.service,
+ org.eclipse.cdt.dsf.gdb.service.command,
+ org.eclipse.cdt.dsf.mi.service,
+ org.eclipse.cdt.dsf.mi.service.command,
+ org.eclipse.cdt.dsf.mi.service.command.commands,
+ org.eclipse.cdt.dsf.mi.service.command.events,
+ org.eclipse.cdt.dsf.mi.service.command.output
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/about.html b/dsf-gdb/org.eclipse.cdt.dsf.gdb/about.html
new file mode 100644
index 0000000000..cb740ae8bc
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/about.html
@@ -0,0 +1,24 @@
+<!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 5, 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/dsf-gdb/org.eclipse.cdt.dsf.gdb/build.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb/build.properties
new file mode 100644
index 0000000000..6c286bf62a
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2006, 2008 Wind River Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties
new file mode 100644
index 0000000000..c3f20315fe
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2006 Wind River Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+###############################################################################
+pluginName=GDB DSF Debugger Integration Core
+providerName=Eclipse.org
+
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml
new file mode 100644
index 0000000000..c49c90e1fb
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ public="true"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
+ name="C/C++ Local Application (Experimental - DSF)"
+ id="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"
+ modes="debug">
+ </launchConfigurationType>
+ <launchConfigurationType
+ delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"
+ modes="debug"
+ name="C/C++ Remote Application (Experimental - DSF)"
+ public="true"
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ <launchConfigurationType
+ delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ id="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"
+ modes="debug"
+ name="C/C++ Attach to Running Application (Experimental - DSF)"
+ public="true"
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+