Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:47:02 -0500
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /dsf-gdb
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/AutomatedIntegrationSuite.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/PersistentSettingsManagerTest.java238
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/VisualizerVirtualBoundsGraphicObjectTest.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/MulticoreVisualizerUIPlugin.java82
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/EnableLoadMetersAction.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/FilterCanvasAction.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/RefreshAction.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SelectAllAction.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SetLoadMeterPeriodAction.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/ShowDebugToolbarAction.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/IVisualizerModelObject.java8
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCPU.java60
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCore.java49
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerExecutionState.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerLoadInfo.java29
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerModel.java91
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java105
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IMulticoreVisualizerConstants.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IPinnable.java4
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java919
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCPU.java70
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvas.java614
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java262
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilterManager.java53
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCore.java87
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerEventListener.java525
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerGraphicObject.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerLoadMeter.java81
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerMarquee.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerSelectionFinder.java84
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerStatusBar.java20
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerThread.java77
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFDebugModel.java202
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFSessionState.java78
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewTreeWalker.java73
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewUtils.java110
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/IDSFTargetDataProxy.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/MementoUtils.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java296
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisterTest.java99
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/AutomatedIntegrationSuite.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/FilePartsTest.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/LaunchUtilsTest.java280
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/ProcStatParserTest.java187
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMIBreakInsertCommand.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMICommandConstructCommand.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMIGDBSetSysroot.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandlerTests.java807
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadTests.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java251
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinColorTracker.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java200
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbSessionAdapters.java420
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbStatusHandler.java33
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbSuspendTrigger.java98
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java117
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/IGdbUIConstants.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/Messages.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfTerminateCommand.java380
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/FetchMoreChildrenAction.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbDisconnectCommand.java338
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbRestartCommand.java154
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbSteppingModeTarget.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ProcessInfo.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java37
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java47
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/DisassemblyToggleDynamicPrintfTarget.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/DisassemblyToggleTracepointsTarget.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java264
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java254
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java987
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/Messages.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/ToggleDynamicPrintfTargetFactory.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/ToggleTracepointsTargetFactory.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/AddLocalsExpressionCommandHandler.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/AddRegistersExpressionCommandHandler.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbAbstractReverseStepCommand.java123
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbConnectCommand.java1021
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbDebugNewExecutableCommand.java143
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbResumeWithoutSignalCommand.java181
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseResumeCommand.java163
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseStepIntoCommand.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseStepOverCommand.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java657
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbSaveTraceDataCommand.java55
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbSelectNextTraceRecordCommand.java166
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbSelectPrevTraceRecordCommand.java154
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbStartTracingCommand.java97
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbStopTracingCommand.java79
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbUncallCommand.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/Messages.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/RefreshableDebugCommand.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/SelectNextTraceRecordCommandHandler.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/SelectPrevTraceRecordCommandHandler.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsoleMessages.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java181
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbAbstractConsolePreferenceListener.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbBasicCliConsole.java302
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbBasicCliConsolePage.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbCliConsoleManager.java109
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbConsoleLifecycleListener.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbFullCliConsole.java128
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbFullCliConsolePage.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbTerminalConnector.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbTerminalPageConnector.java163
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/IGDBDebuggerConsole.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/IGdbTerminalControlConnector.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java235
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsoleManager.java70
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/GdbAutoTerminateAction.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/GdbConsoleClearAction.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/GdbConsolePasteAction.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/GdbConsoleScrollLockAction.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/GdbConsoleTerminateLaunchAction.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/disassembly/AddDynamicPrintfRulerAction.java155
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/disassembly/DisassemblyMessages.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AttachCDebuggerTab.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java166
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java115
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainAttachTab.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainCoreTab.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CoreFileDebuggerTab.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CoreFilePrompter.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java146
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbCoreDebuggerPage.java59
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java109
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbServerDebuggerPage.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchImages.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LocalApplicationCDebuggerTab.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/NewExecutableDialog.java171
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/NewExecutableInfo.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java79
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompterDialog.java107
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/RemoteApplicationCDebuggerTab.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SerialPortSettingsBlock.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java165
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/TCPSettingsBlock.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/memory/GdbMemoryBlockAddressInfoRetrieval.java270
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/AttachProcessHandler.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ColumnLayout.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ContentLabelProviderWrapper.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSData.java59
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSResourcesView.java205
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/SessionOSData.java185
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbConsolePreferencePage.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java509
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/ReverseDebugPreferencePage.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/sync/GdbDebugContextSyncManager.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/CollectActionPage.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/EvaluateActionPage.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/MessagesForTracepointActions.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionDialog.java49
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPreferencePage.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointGlobalActionsList.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/WhileSteppingActionPage.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java83
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/CircularProgress.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/FlatButton.java75
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/FlatRadioButton.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlModel.java308
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java436
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TracepointImageRegistry.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TracepointsMessages.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/FetchMoreChildrenEvent.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbExpressionVMProvider.java294
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbVariableVMNode.java578
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbVariableVMProvider.java184
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/Messages.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/breakpoints/GdbBreakpointVMNode.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/breakpoints/GdbBreakpointVMProvider.java555
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java232
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java912
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/GdbExecutionContextLabelText.java69
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/GdbStackFramesVMNode.java74
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/GdbStandardProcessVMNode.java262
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/IGdbLaunchVMConstants.java82
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMModelProxyStrategy.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java234
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/MessagesForGdbLaunchVM.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java732
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java126
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGDBLaunchConfigurationConstants.java75
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugConstants.java68
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java56
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/actions/IConnect.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java112
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/GDBDynamicPrintfUtils.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreInfo.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreList.java129
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java184
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPreferenceInitializer.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/Messages.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCoreLoads.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCounters.java45
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatParser.java135
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/commands/ISelectNextTraceRecordHandler.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/commands/ISelectPrevTraceRecordHandler.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/launching/CoreBuildLocalDebugLaunchDelegate.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoRegistersRetrieval.java73
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoVariablesRetrieval.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlock.java85
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java448
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrievalManager.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/MemoryBlockAddressInfoItem.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/Messages.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/GDBFocusSynchronizer.java319
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/IGDBFocusSynchronizer.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/command/commands/MIMetaGetCPUInfo.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/command/events/EventMessages.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/command/events/MITracepointSelectedEvent.java70
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/command/output/MIMetaGetCPUInfoInfo.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionUtils.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/CollectAction.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/EvaluateAction.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/ITracepointAction.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/MessagesForTracepointActions.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/WhileSteppingAction.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java310
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_0.java117
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_12.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_2.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_7.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GDBDebugger.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GDBProcess.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GDBServerDebugger.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbAttachLaunchDelegate.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java64
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java594
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbProcessFactory.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbSourceLookupDirector.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbSourceLookupParticipant.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/IProcessExtendedInfo.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ITracedLaunch.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/InferiorRuntimeProcess.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchMessages.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java475
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ServicesLaunchSequence.java245
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java73
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/memory/IGdbMemoryAddressInfoTypeRetrieval.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java267
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence_7_2.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java84
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend_7_12.java81
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpointsManager_7_0.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpointsManager_7_2.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java326
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java222
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_4.java211
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_6.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_7.java194
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBDisassembly_7_3.java95
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS.java833
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS_7_10.java89
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS_7_5.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java389
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory_7_0.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory_7_6.java168
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBPatternMatchingExpressions.java907
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java753
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java2404
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_1.java156
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_10.java90
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_12.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java702
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2_1.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_3.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_4.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisters.java248
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java755
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java544
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java1845
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_10.java158
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_12.java249
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_2_NS.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_6.java82
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBSourceLookup.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBTraceControl_7_2.java1371
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBTraceControl_7_4.java66
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java95
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java52
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBHardwareAndOS.java155
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBHardwareAndOS2.java83
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBMemory.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBMemory2.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBProcesses.java230
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBSourceLookup.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBTraceControl.java379
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBTraceControl2.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IReverseRunControl.java140
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IReverseRunControl2.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/Messages.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/SessionType.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java238
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_10.java183
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_12.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_3.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/CommandFactory_6_8.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/CustomTimeoutsMap.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBBackendCLIProcess.java123
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBBackendProcessWithoutIO.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java889
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControlDMContext.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java181
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_12.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_2.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_4.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_7.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GdbCommandTimeoutManager.java372
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/IGDBBackendProcessWithoutIO.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/IGDBControl.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBBackend_HEAD.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBBreakpointsManager_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBBreakpointsSynchronizer_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBBreakpoints_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBControl_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBDisassembly_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBExpressions_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBHardwareAndOS_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBMemory_HEAD.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBModules_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBProcesses_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBRegisters_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBRunControl_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBRunControl_NS_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBSourceLookup_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBStack_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/extensions/GDBTraceControl_HEAD.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java230
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIBackend.java118
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIBackend2.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIBreakpointPathAdjuster.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMICommandControl.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIContainerDMContext.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIExecutionDMContext.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIExpressions.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIProcessDMContext.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIProcesses.java88
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java207
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java1367
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java4049
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsSynchronizer.java1516
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIDisassembly.java410
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java2188
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIFormat.java156
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java1332
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIModules.java485
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java764
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java1243
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java1460
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java425
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java2714
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/Messages.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/BreakpointActionAdapter.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/CLIDebugActionEnabler.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/MILogActionEnabler.java89
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/MIResumeActionEnabler.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/breakpoint/actions/MIReverseDebugEnabler.java85
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractCLIProcess.java852
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java1902
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CLIEventProcessor.java641
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CLIEventProcessor_7_0.java453
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CLIEventProcessor_7_7.java33
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java185
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/IEventProcessor.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/LargePipedInputStream.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java238
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIControlDMContext.java87
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIInferiorProcess.java906
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIInferiorProcess_7_3.java148
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java637
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java694
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_12.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/Adjustable.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIAddressableSize.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIAttach.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIExecAbort.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInferior.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoBreak.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoProgram.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoRecord.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoSharedLibrary.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIInfoThreads.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIJump.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIPasscount.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIRecord.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIRemote.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIRemoteGet.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLISharedLibrary.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIShowEndian.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLISource.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIThread.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLITrace.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLITraceDump.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIUnsetEnv.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIUnsetSubstitutePath.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaCommand.java96
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetAttributes.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetChildCount.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetChildren.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetValue.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/ExprMetaGetVar.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIAddInferior.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakAfter.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakCommands.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakCondition.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakDelete.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakDisable.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakEnable.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakInsert.java185
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakList.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakPasscount.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIBreakWatch.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java366
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDPrintfInsert.java176
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataDisassemble.java85
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataEvaluateExpression.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataListRegisterNames.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataListRegisterValues.java286
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java143
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemoryBytes.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemory.java122
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemoryBytes.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIEnablePrettyPrinting.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIEnvironmentCD.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIEnvironmentDirectory.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecArguments.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecContinue.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecFinish.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecInterrupt.java63
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecJump.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecNext.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecNextInstruction.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReturn.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReverseContinue.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReverseNext.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReverseNextInstruction.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReverseStep.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecReverseStepInstruction.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecRun.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecStep.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecStepInstruction.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecUncall.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecUntil.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecFile.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileSymbolFile.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBExit.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSet.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetAutoSolib.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetBreakpointPending.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetCharset.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetCircularTraceBuffer.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetDPrintfStyle.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetDetachOnFork.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetDisconnectedTracing.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetEnv.java73
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetHostCharset.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetLanguage.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetNewConsole.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetNonStop.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPagination.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPrintObject.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPrintSevenbitStrings.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPythonPrintStack.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetRecordFullStopAtLimit.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetRemoteTimeout.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSchedulerLocking.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSolibAbsolutePrefix.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSolibSearchPath.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetStopOnSolibEvents.java19
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetSysroot.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTargetAsync.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTargetCharset.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTargetWideCharset.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTraceNotes.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTraceUser.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShow.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShowExitCode.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShowLanguage.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShowNewConsole.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBVersion.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInferiorTTYSet.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInfoOs.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInterpreterExec.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInterpreterExecConsole.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInterpreterExecConsoleKill.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListFeatures.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java74
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIRemoveInferior.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MISetSubstitutePath.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackInfoDepth.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListArguments.java49
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListFrames.java32
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackListLocals.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIStackSelectFrame.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDisconnect.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDownload.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetSelect.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetSelectCore.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetSelectTFile.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadInfo.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadListIds.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIThreadSelect.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceDefineVariable.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceFind.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceListVariables.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceSave.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceStart.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceStatus.java15
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITraceStop.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarAssign.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarCreate.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarDelete.java29
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarEvaluateExpression.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoExpression.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoNumChildren.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoPathExpression.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarInfoType.java24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarListChildren.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarSetFormat.java65
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarSetUpdateRange.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarShowAttributes.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarShowFormat.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/IMIDMEvent.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIBreakpointChangedEvent.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIBreakpointHitEvent.java115
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MICatchpointHitEvent.java83
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIDetachedEvent.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIErrorEvent.java129
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIEvent.java61
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIFunctionFinishedEvent.java92
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIInferiorExitEvent.java73
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIInferiorSignalExitEvent.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MILocationReachedEvent.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIRunningEvent.java69
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISharedLibEvent.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISignalChangedEvent.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISignalEvent.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MISteppingRangeEvent.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIStoppedEvent.java59
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadCreatedEvent.java72
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadExitEvent.java76
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadGroupAddedEvent.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadGroupCreatedEvent.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIThreadGroupExitedEvent.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIWatchpointScopeEvent.java66
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/events/MIWatchpointTriggerEvent.java164
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIAddressableSizeInfo.java24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLICatchInfo.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoBreakInfo.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoProgramInfo.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoRecordInfo.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java77
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIShowEndianInfo.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIThreadInfo.java30
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLITraceDumpInfo.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLITraceInfo.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetAttributesInfo.java18
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetChildCountInfo.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetChildrenInfo.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetValueInfo.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/ExprMetaGetVarInfo.java147
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIAddInferiorInfo.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java204
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIAsyncRecord.java98
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java119
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java128
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java800
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIConst.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java231
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataEvaluateExpressionInfo.java36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java104
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java148
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataReadMemoryBytesInfo.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataReadMemoryInfo.java258
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataWriteMemoryInfo.java20
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDisplayHint.java108
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIExecAsyncOutput.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java226
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBShowExitCodeInfo.java28
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBShowLanguageInfo.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBShowNewConsoleInfo.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBVersionInfo.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfo.java134
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java57
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java258
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIList.java70
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListFeaturesInfo.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java257
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java164
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MINotifyAsyncOutput.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIOutput.java94
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java976
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java136
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java64
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResultRecord.java96
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackInfoDepthInfo.java31
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java105
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java104
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListLocalsInfo.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStatusAsyncOutput.java4
-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/MIStringHandler.java850
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITargetDownloadInfo.java130
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThread.java322
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java40
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadListIdsInfo.java53
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceFindInfo.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceListVariablesInfo.java132
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceRecord.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceStatusInfo.java67
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceStopInfo.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java109
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVar.java172
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarAssignInfo.java48
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarChange.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarCreateInfo.java83
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarDeleteInfo.java56
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarEvaluateExpressionInfo.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoExpressionInfo.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoNumChildrenInfo.java43
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoPathExpressionInfo.java44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarInfoTypeInfo.java33
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java58
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarSetFormatInfo.java46
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarShowAttributesInfo.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarShowFormatInfo.java55
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java66
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/GDBExamplePlugin.java21
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/GdbExtendedSessionAdapters.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/actions/DsfExtendedTerminateCommand.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/actions/GdbShowVersionHandler.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/launch/GdbExtendedFinalLaunchSequence.java58
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/launch/GdbExtendedLaunch.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/launch/GdbExtendedLaunchDelegate.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/launch/GdbExtendedServicesLaunchSequence.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GDBExtendedControl.java17
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GDBExtendedService.java66
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/IGDBExtendedFunctions.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/command/GdbExtendedCommandFactory_6_8.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/command/commands/CLIGDBVersion.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/ExtendedTab.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/console/GdbExtendedConsoleMessages.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/console/GdbExtendedConsolePageParticipant.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/console/GdbExtendedInfoThreadsAction.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/console/GdbExtendedSpecialBackgroundToggle.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/viewmodel/GdbExtendedLaunchVMProvider.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/viewmodel/GdbExtendedThreadVMNode.java275
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/viewmodel/GdbExtendedVMMessages.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/viewmodel/GdbExtendedViewModelAdapter.java35
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/ClassAccessor.java42
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/AsyncCompletionWaitor.java68
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BackgroundRunner.java57
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseParametrizedTestCase.java34
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java441
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/MemoryByteBuffer.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/OnceOnlySuite.java29
-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/ServiceFactoriesManager.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java758
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/launching/TestLaunchDelegate.java70
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/launching/TestsPlugin.java152
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllRemoteSuites.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AutomatedSuite.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandLineArgsTest.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandTimeoutTest.java132
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleBreakpointsTest.java532
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleSynchronizingTest.java335
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBPatternMatchingExpressionsTest.java347
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java41
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBRemoteTracepointsTest.java388
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBTestTest.java12
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ITestConstants.java38
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java1475
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java834
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java889
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java744
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java7097
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java276
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIModifiedServicesTest.java22
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java290
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlReverseTest.java89
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java1418
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java968
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java481
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/PostMortemCoreTest.java885
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/SourceLookupTest.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/StepIntoSelectionTest.java374
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/SuiteGdb.java39
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/TraceFileTest.java403
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/GDBMultiNonStopRunControlTest.java1619
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/MIExpressionsNonStopTest.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/MIRunControlNonStopTargetAvailableTest.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/ThreadStackFrameSyncTest.java451
724 files changed, 53859 insertions, 53975 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/AutomatedIntegrationSuite.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/AutomatedIntegrationSuite.java
index 6122d10ec0..d20faee1b3 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/AutomatedIntegrationSuite.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/AutomatedIntegrationSuite.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc Dumais (Ericsson) - Initial Implementation
*******************************************************************************/
@@ -18,14 +18,10 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-
@RunWith(Suite.class)
// Add additional test case classes below
-@SuiteClasses({
- PersistentSettingsManagerTest.class,
- VisualizerVirtualBoundsGraphicObjectTest.class,
-})
+@SuiteClasses({ PersistentSettingsManagerTest.class, VisualizerVirtualBoundsGraphicObjectTest.class, })
public class AutomatedIntegrationSuite {
// Often overriding BeforeClass method here
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/PersistentSettingsManagerTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/PersistentSettingsManagerTest.java
index 6dee6dc5bc..23e10cafda 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/PersistentSettingsManagerTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/PersistentSettingsManagerTest.java
@@ -31,12 +31,12 @@ import org.junit.Test;
public class PersistentSettingsManagerTest {
// ---- variables ----
-
+
/** persistent settings manager */
private PersistentSettingsManager m_persistentSettingsManager1;
private PersistentSettingsManager m_persistentSettingsManager2;
private PersistentSettingsManager m_persistentSettingsManager3;
-
+
// set of persistent parameters
private PersistentParameter<String> m_stringParam;
private PersistentParameter<Boolean> m_booleanParam;
@@ -47,24 +47,23 @@ public class PersistentSettingsManagerTest {
private PersistentMapParameter<String> m_mapOfStringParam;
private PersistentMapParameter<Boolean> m_mapOfBooleanParam;
private PersistentMapParameter<Integer> m_mapOfIntegerParam;
-
+
// set of per-instance parameters
private PersistentParameter<String> m_stringParamInstance1;
private PersistentParameter<String> m_stringParamInstance2;
private PersistentParameter<String> m_stringParamInstance3;
-
+
// set of global parameters
private PersistentParameter<String> m_stringGlobalParamInstance1;
private PersistentParameter<String> m_stringGlobalParamInstance2;
private PersistentParameter<String> m_stringGlobalParamInstance3;
-
+
// random number generator
private Random m_random = new Random();
-
-
+
// ---- constants ----
private final static int NUM_LIST_ELEMENTS = 10;
-
+
private final static String INSTANCE_ID_1 = "instance1";
private final static String INSTANCE_ID_2 = "instance2";
private final static String INSTANCE_ID_3 = "instance3";
@@ -72,70 +71,86 @@ public class PersistentSettingsManagerTest {
private final static String DEFAULT_STRING = "Default String";
private final static Boolean DEFAULT_BOOLEAN = false;
private final static Integer DEFAULT_INTEGER = 1234321;
-
+
private final static String DEFAULT_STRING_VAL_INSTANCE1 = "Default String Instance 1";
private final static String DEFAULT_STRING_VAL_INSTANCE2 = "Default String Instance 2";
private final static String DEFAULT_STRING_VAL_INSTANCE3 = "Default String Instance 3";
private final static String DEFAULT_STRING_VAL_SHARED = "Default String Shared Instance";
-
-
+
public PersistentSettingsManagerTest() {
// 3 instances of managers - to simulate, for example, 3 views each having one manager
m_persistentSettingsManager1 = new PersistentSettingsManager("PersistentSettingsManagerTest", INSTANCE_ID_1);
- m_persistentSettingsManager2 = new PersistentSettingsManager("PersistentSettingsManagerTest", INSTANCE_ID_2);
- m_persistentSettingsManager3 = new PersistentSettingsManager("PersistentSettingsManagerTest", INSTANCE_ID_3);
-
+ m_persistentSettingsManager2 = new PersistentSettingsManager("PersistentSettingsManagerTest", INSTANCE_ID_2);
+ m_persistentSettingsManager3 = new PersistentSettingsManager("PersistentSettingsManagerTest", INSTANCE_ID_3);
+
// one persistent parameter for each supported type:
// simple types
- m_stringParam = m_persistentSettingsManager1.getNewParameter(String.class, "String Parameter", false, DEFAULT_STRING);
- m_booleanParam = m_persistentSettingsManager1.getNewParameter(Boolean.class, "Boolean Parameter", false, DEFAULT_BOOLEAN);
- m_integerParam = m_persistentSettingsManager1.getNewParameter(Integer.class, "Integer Parameter", false, DEFAULT_INTEGER);
+ m_stringParam = m_persistentSettingsManager1.getNewParameter(String.class, "String Parameter", false,
+ DEFAULT_STRING);
+ m_booleanParam = m_persistentSettingsManager1.getNewParameter(Boolean.class, "Boolean Parameter", false,
+ DEFAULT_BOOLEAN);
+ m_integerParam = m_persistentSettingsManager1.getNewParameter(Integer.class, "Integer Parameter", false,
+ DEFAULT_INTEGER);
// List<T>
- m_listOfStringParam = m_persistentSettingsManager1.getNewListParameter(String.class, "List of String Parameter", false, new ArrayList<String>());
- m_listOfBooleanParam = m_persistentSettingsManager1.getNewListParameter(Boolean.class, "List of Boolean Parameter", false, new ArrayList<Boolean>());
- m_listOfIntegerParam = m_persistentSettingsManager1.getNewListParameter(Integer.class, "List of Integer Parameter", false, new ArrayList<Integer>());
+ m_listOfStringParam = m_persistentSettingsManager1.getNewListParameter(String.class, "List of String Parameter",
+ false, new ArrayList<String>());
+ m_listOfBooleanParam = m_persistentSettingsManager1.getNewListParameter(Boolean.class,
+ "List of Boolean Parameter", false, new ArrayList<Boolean>());
+ m_listOfIntegerParam = m_persistentSettingsManager1.getNewListParameter(Integer.class,
+ "List of Integer Parameter", false, new ArrayList<Integer>());
// Map<String,T>
- m_mapOfStringParam = m_persistentSettingsManager1.getNewMapParameter(String.class, "Map of String Parameter", true, new HashMap<String,String>());
- m_mapOfBooleanParam = m_persistentSettingsManager1.getNewMapParameter(Boolean.class, "Map of Boolean Parameter", true, new HashMap<String,Boolean>());
- m_mapOfIntegerParam = m_persistentSettingsManager1.getNewMapParameter(Integer.class, "Map of Integer Parameter", true, new HashMap<String,Integer>());
-
+ m_mapOfStringParam = m_persistentSettingsManager1.getNewMapParameter(String.class, "Map of String Parameter",
+ true, new HashMap<String, String>());
+ m_mapOfBooleanParam = m_persistentSettingsManager1.getNewMapParameter(Boolean.class, "Map of Boolean Parameter",
+ true, new HashMap<String, Boolean>());
+ m_mapOfIntegerParam = m_persistentSettingsManager1.getNewMapParameter(Integer.class, "Map of Integer Parameter",
+ true, new HashMap<String, Integer>());
+
// simulate 3 instances using the same parameter, using "per instance" persistence (i.e. they'll be persisted independently)
- m_stringParamInstance1 = m_persistentSettingsManager1.getNewParameter(String.class, "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE1);
- m_stringParamInstance2 = m_persistentSettingsManager2.getNewParameter(String.class, "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE2);
- m_stringParamInstance3 = m_persistentSettingsManager3.getNewParameter(String.class, "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE3);
-
- // This is to simulate a persistent parameter, being "shared" by 3 instances (e.g. views). So, the 3 instances are persisted as a single parameter.
- m_stringGlobalParamInstance1 = m_persistentSettingsManager1.getNewParameter(String.class, "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
- m_stringGlobalParamInstance2 = m_persistentSettingsManager2.getNewParameter(String.class, "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
- m_stringGlobalParamInstance3 = m_persistentSettingsManager3.getNewParameter(String.class, "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
+ m_stringParamInstance1 = m_persistentSettingsManager1.getNewParameter(String.class,
+ "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE1);
+ m_stringParamInstance2 = m_persistentSettingsManager2.getNewParameter(String.class,
+ "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE2);
+ m_stringParamInstance3 = m_persistentSettingsManager3.getNewParameter(String.class,
+ "Per-instance String Parameter", true, DEFAULT_STRING_VAL_INSTANCE3);
+
+ // This is to simulate a persistent parameter, being "shared" by 3 instances (e.g. views). So, the 3 instances are persisted as a single parameter.
+ m_stringGlobalParamInstance1 = m_persistentSettingsManager1.getNewParameter(String.class,
+ "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
+ m_stringGlobalParamInstance2 = m_persistentSettingsManager2.getNewParameter(String.class,
+ "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
+ m_stringGlobalParamInstance3 = m_persistentSettingsManager3.getNewParameter(String.class,
+ "Global String Parameter", false, DEFAULT_STRING_VAL_SHARED);
}
-
+
// testcases
-
+
/** Test Un-supported base type - we expect an Exception */
@Test(expected = Exception.class)
public void testUnsupportedBaseType() throws Exception {
m_persistentSettingsManager1.getNewParameter(Float.class, "Float Parameter", false, 1.0f);
}
-
+
/** Test Un-supported List type - we expect an Exception */
@Test(expected = Exception.class)
public void testUnsupportedListType() throws Exception {
- m_persistentSettingsManager1.getNewListParameter(Float.class, "List of Float Parameter", false, new ArrayList<Float>());
+ m_persistentSettingsManager1.getNewListParameter(Float.class, "List of Float Parameter", false,
+ new ArrayList<Float>());
}
-
+
/** Test Un-supported Map type - we expect an Exception */
@Test(expected = Exception.class)
public void testUnsupportedMapType() throws Exception {
- m_persistentSettingsManager1.getNewMapParameter(Float.class, "Map of Float Parameter", false, new HashMap<String,Float>());
+ m_persistentSettingsManager1.getNewMapParameter(Float.class, "Map of Float Parameter", false,
+ new HashMap<String, Float>());
}
-
+
/** Test persisting one String value */
@Test
public void testPersistentParamString() throws Exception {
- // no value persisted yet - should return default
+ // no value persisted yet - should return default
assertEquals(DEFAULT_STRING, m_stringParam.value());
-
+
// set a value
String randomString = getRandomString();
m_stringParam.set(randomString);
@@ -143,7 +158,7 @@ public class PersistentSettingsManagerTest {
assertEquals(randomString, m_stringParam.value());
// force re-read from storage
assertEquals(randomString, m_stringParam.value(true));
-
+
// set a different value
randomString = getRandomString();
m_stringParam.set(randomString);
@@ -152,13 +167,13 @@ public class PersistentSettingsManagerTest {
// force re-read from storage
assertEquals(randomString, m_stringParam.value(true));
}
-
+
/** Test persisting one Boolean value */
@Test
public void testPersistentParamBoolean() throws Exception {
- // no value persisted yet - should return default
+ // no value persisted yet - should return default
assertEquals(DEFAULT_BOOLEAN, m_booleanParam.value());
-
+
// set a value
m_booleanParam.set(!DEFAULT_BOOLEAN);
// get cached value
@@ -166,11 +181,11 @@ public class PersistentSettingsManagerTest {
// force re-read from storage
assertEquals(!DEFAULT_BOOLEAN, m_booleanParam.value(true));
}
-
+
/** Test persisting one Integer value */
@Test
public void testPersistentParamInteger() throws Exception {
- // no value persisted yet - should return default
+ // no value persisted yet - should return default
assertEquals(DEFAULT_INTEGER, m_integerParam.value());
// set a value
@@ -189,176 +204,175 @@ public class PersistentSettingsManagerTest {
// force re-read from storage
assertEquals(randomInt, m_integerParam.value(true));
}
-
+
/** Test persisting a List of String */
@Test
public void testPersistentParamListOfString() throws Exception {
// no value persisted yet - should return default (empty list)
List<String> list = m_listOfStringParam.value();
- assertEquals(0,list.size());
+ assertEquals(0, list.size());
// generate list of random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
list.add(getRandomString());
}
m_listOfStringParam.set(list);
-
+
// get cached value
List<String> list2 = m_listOfStringParam.value();
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
// force re-read from storage
list2 = m_listOfStringParam.value(true);
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
}
-
+
/** Test persisting a List of Boolean */
@Test
public void testPersistentParamListOfBoolean() throws Exception {
// no value persisted yet - should return default (empty list)
List<Boolean> list = m_listOfBooleanParam.value();
- assertEquals(0,list.size());
+ assertEquals(0, list.size());
// generate list of random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
list.add(getRandomBoolean());
}
m_listOfBooleanParam.set(list);
-
+
// get cached value
List<Boolean> list2 = m_listOfBooleanParam.value();
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
// force re-read from storage
list2 = m_listOfBooleanParam.value(true);
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
}
-
+
/** Test persisting a List of Integer */
@Test
public void testPersistentParamListofInteger() throws Exception {
// no value persisted yet - should return default (empty list)
List<Integer> list = m_listOfIntegerParam.value();
- assertEquals(0,list.size());
+ assertEquals(0, list.size());
// generate list of random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
list.add(getRandomInt());
}
m_listOfIntegerParam.set(list);
-
+
List<Integer> list2;
// get cached value
list2 = m_listOfIntegerParam.value();
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
// force re-read from storage
list2 = m_listOfIntegerParam.value(true);
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
assertEquals(list.get(i), list2.get(i));
}
}
-
-
+
/** Test persisting a Map of String */
@Test
public void testPersistentParamMapOfString() throws Exception {
// no value persisted yet - should return default (empty Map)
- Map<String,String> map = m_mapOfStringParam.value();
- assertEquals(0,map.size());
-
+ Map<String, String> map = m_mapOfStringParam.value();
+ assertEquals(0, map.size());
+
// generate random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
map.put(getRandomString(), getRandomString());
}
m_mapOfStringParam.set(map);
-
+
// get cached value
- Map<String,String> map2 = m_mapOfStringParam.value();
+ Map<String, String> map2 = m_mapOfStringParam.value();
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
-
+
// force re-read from storage
map2 = m_mapOfStringParam.value(true);
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
}
-
+
/** Test persisting a Map of Boolean*/
@Test
public void testPersistentParamMapOfBoolean() throws Exception {
// no value persisted yet - should return default (empty Map)
- Map<String,Boolean> map = m_mapOfBooleanParam.value();
- assertEquals(0,map.size());
-
+ Map<String, Boolean> map = m_mapOfBooleanParam.value();
+ assertEquals(0, map.size());
+
// generate random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
map.put(getRandomString(), getRandomBoolean());
}
m_mapOfBooleanParam.set(map);
-
+
// get cached value
- Map<String,Boolean> map2 = m_mapOfBooleanParam.value();
+ Map<String, Boolean> map2 = m_mapOfBooleanParam.value();
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
-
+
// force re-read from storage
map2 = m_mapOfBooleanParam.value(true);
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
}
-
+
/** Test persisting a List of Integer */
@Test
public void testPersistentParamMapOfInteger() throws Exception {
// no value persisted yet - should return default (empty Map)
- Map<String,Integer> map = m_mapOfIntegerParam.value();
- assertEquals(0,map.size());
-
+ Map<String, Integer> map = m_mapOfIntegerParam.value();
+ assertEquals(0, map.size());
+
// generate random elements
- for(int i = 0; i < NUM_LIST_ELEMENTS; i++) {
+ for (int i = 0; i < NUM_LIST_ELEMENTS; i++) {
map.put(getRandomString(), getRandomInt());
}
m_mapOfIntegerParam.set(map);
-
+
// get cached value
- Map<String,Integer> map2 = m_mapOfIntegerParam.value();
+ Map<String, Integer> map2 = m_mapOfIntegerParam.value();
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
-
+
// force re-read from storage
map2 = m_mapOfIntegerParam.value(true);
assertEquals(map.size(), map2.size());
- for(String key : map2.keySet()) {
+ for (String key : map2.keySet()) {
assertEquals(map2.get(key), map.get(key));
}
}
-
+
/** This test simulates 3 different instances (e.g. views) writing and reading the same persistent
- * parameter. In this case the parameter is defined as "per-instance" (vs "global"), so each
+ * parameter. In this case the parameter is defined as "per-instance" (vs "global"), so each
* instance has it's own independent copy of the persistent parameter. */
@Test
public void testMultipleInstances() throws Exception {
- // no values persisted yet - should return defaults
+ // no values persisted yet - should return defaults
assertEquals(DEFAULT_STRING_VAL_INSTANCE1, m_stringParamInstance1.value());
assertEquals(DEFAULT_STRING_VAL_INSTANCE2, m_stringParamInstance2.value());
assertEquals(DEFAULT_STRING_VAL_INSTANCE3, m_stringParamInstance3.value());
-
- // set values - since the parameters were defined to save values per-instance, they should be
+
+ // set values - since the parameters were defined to save values per-instance, they should be
// persisted independently (i.e. not overwrite each other)
String randomString1 = getRandomString();
String randomString2 = getRandomString();
@@ -369,7 +383,7 @@ public class PersistentSettingsManagerTest {
assertEquals(randomString1, m_stringParamInstance1.value(true));
assertEquals(randomString2, m_stringParamInstance2.value(true));
assertEquals(randomString3, m_stringParamInstance3.value(true));
-
+
// set different values
randomString1 = getRandomString();
randomString2 = getRandomString();
@@ -381,19 +395,18 @@ public class PersistentSettingsManagerTest {
assertEquals(randomString2, m_stringParamInstance2.value(true));
assertEquals(randomString3, m_stringParamInstance3.value(true));
}
-
-
+
/** This test simulates 3 different instances (e.g. views) writing and reading the same persistent
* parameter. In this case the parameter is defined as "global" (vs "per-instance"), so only one
* copy is shared between the instances. */
@Test
public void testGlobalParamsWithMultipleInstances() throws Exception {
- // no values persisted yet - should return defaults
+ // no values persisted yet - should return defaults
assertEquals(DEFAULT_STRING_VAL_SHARED, m_stringGlobalParamInstance1.value());
assertEquals(DEFAULT_STRING_VAL_SHARED, m_stringGlobalParamInstance2.value());
assertEquals(DEFAULT_STRING_VAL_SHARED, m_stringGlobalParamInstance3.value());
-
- // set values - since the parameters were defined to save values per-instance, they should be
+
+ // set values - since the parameters were defined to save values per-instance, they should be
// persisted independently
String randomString1 = getRandomString();
String randomString2 = getRandomString();
@@ -406,7 +419,7 @@ public class PersistentSettingsManagerTest {
assertEquals(randomString3, m_stringGlobalParamInstance1.value(true));
assertEquals(randomString3, m_stringGlobalParamInstance2.value(true));
assertEquals(randomString3, m_stringGlobalParamInstance3.value(true));
-
+
// set different values
randomString1 = getRandomString();
randomString2 = getRandomString();
@@ -420,20 +433,19 @@ public class PersistentSettingsManagerTest {
assertEquals(randomString3, m_stringGlobalParamInstance2.value(true));
assertEquals(randomString3, m_stringGlobalParamInstance3.value(true));
}
-
+
// utility methods
-
+
private int getRandomInt() {
return m_random.nextInt();
}
-
+
private String getRandomString() {
return Integer.toString(getRandomInt(), 16) + Integer.toString(getRandomInt(), 16);
}
-
+
private boolean getRandomBoolean() {
return getRandomInt() % 2 == 0;
}
}
-
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/VisualizerVirtualBoundsGraphicObjectTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/VisualizerVirtualBoundsGraphicObjectTest.java
index a22270ea9f..be0cb0beb5 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/VisualizerVirtualBoundsGraphicObjectTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/ui/test/VisualizerVirtualBoundsGraphicObjectTest.java
@@ -12,19 +12,17 @@
* Contributors:
* Marc Dumais (Ericsson) - Initial API and implementation
* Marc Khouzam (Ericsson) - Move to o.e.cdt.dsf.gdb.tests (bug 455237)
- * Marc Dumais (Ericsson) - Move VisualizerVirtualBoundsGraphicObjectTest
+ * Marc Dumais (Ericsson) - Move VisualizerVirtualBoundsGraphicObjectTest
* to o.e.cdt.dsf.gdb.multicoreVisualizer.ui.tests
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.test;
-
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.cdt.visualizer.ui.canvas.VirtualBoundsGraphicObject;
import org.junit.Test;
public class VisualizerVirtualBoundsGraphicObjectTest {
-
// testcases
/**
@@ -114,7 +112,6 @@ public class VisualizerVirtualBoundsGraphicObjectTest {
org.junit.Assert.assertEquals(10, containerF.getBounds().width);
org.junit.Assert.assertEquals(10, containerF.getBounds().height);
-
// check recursive object retrieval returns expected number of child objects, for A
org.junit.Assert.assertEquals(5, containerA.getAllObjects(true).size());
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/MulticoreVisualizerUIPlugin.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/MulticoreVisualizerUIPlugin.java
index 8a1b05da3d..a40f25be55 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/MulticoreVisualizerUIPlugin.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/MulticoreVisualizerUIPlugin.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc Khouzam (Ericsson) - initial API and implementation
* William R. Swanson (Tilera Corporation) - added resource support
@@ -35,25 +35,23 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
-{
+public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin {
// --- constants ---
-
+
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui"; //$NON-NLS-1$
-
// --- static members ---
/** Singleton instance */
private static MulticoreVisualizerUIPlugin plugin;
/** Bundle context */
- private static BundleContext fgBundleContext;
+ private static BundleContext fgBundleContext;
/** Resource manager */
protected static UIResourceManager s_resources = null;
-
+
/**
* Returns the shared instance
*/
@@ -64,20 +62,18 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
/**
* Returns the bundle context for this plugin.
*/
- public static BundleContext getBundleContext() {
- return fgBundleContext;
- }
+ public static BundleContext getBundleContext() {
+ return fgBundleContext;
+ }
-
// --- constructors/destructors ---
-
+
/**
* The constructor
*/
public MulticoreVisualizerUIPlugin() {
}
-
// --- plugin startup/shutdown methods ---
/*
@@ -85,11 +81,11 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
- public void start(BundleContext context) throws Exception {
- fgBundleContext = context;
+ public void start(BundleContext context) throws Exception {
+ fgBundleContext = context;
super.start(context);
plugin = this;
-
+
// initialize resource management (strings, images, fonts, colors, etc.)
getPluginResources();
}
@@ -99,30 +95,30 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
- public void stop(BundleContext context) throws Exception {
+ public void stop(BundleContext context) throws Exception {
// clean up resource management
cleanupPluginResources();
-
+
plugin = null;
super.stop(context);
- fgBundleContext = null;
+ fgBundleContext = null;
}
-
// --- logging ---
-
+
/**
* 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
*/
@@ -132,7 +128,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
/**
* Logs an internal error with the specified throwable
- *
+ *
* @param e
* the exception to be logged
*/
@@ -140,7 +136,6 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e.getMessage(), e));
}
-
// --- accessors ---
/**
@@ -156,12 +151,11 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
return getDefault().getBundle().getSymbolicName();
}
-
// --- UI plugin support ---
-
- /**
- * copied from org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin
- */
+
+ /**
+ * copied from org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin
+ */
private static Shell debugDialogShell;
/**
@@ -183,10 +177,10 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
public static void setDialogShell(Shell shell) {
debugDialogShell = shell;
}
-
+
/**
* Returns the active workbench window
- *
+ *
* @return the active workbench window
*/
public static IWorkbenchWindow getActiveWorkbenchWindow() {
@@ -203,7 +197,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
/**
* 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() {
@@ -238,7 +232,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
}
// --- resource management ---
-
+
/** Returns resource manager for this plugin */
public UIResourceManager getPluginResources() {
if (s_resources == null) {
@@ -249,47 +243,51 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
resourceManager.setParentManager(CDTVisualizerUIPlugin.getResources());
s_resources = resourceManager;
}
-
+
return s_resources;
}
-
+
/** Releases resource manager for this plugin. */
public void cleanupPluginResources() {
- if (s_resources != null) s_resources.dispose();
+ if (s_resources != null)
+ s_resources.dispose();
}
-
+
/** Convenience method for getting plugin resource manager */
public static UIResourceManager getResources() {
return getDefault().getPluginResources();
}
-
+
/** Convenience method for looking up string resources */
public static String getString(String key) {
return getDefault().getPluginResources().getString(key);
}
+
/** Convenience method for looking up string resources */
public static String getString(String key, Object... arguments) {
return getDefault().getPluginResources().getString(key, arguments);
}
-
+
/** Convenience method for looking up image resources */
public static Image getImage(String key) {
return getDefault().getPluginResources().getImage(key);
}
+
/** Convenience method for looking up image resources */
public static ImageDescriptor getImageDescriptor(String key) {
return getDefault().getPluginResources().getImageDescriptor(key);
}
-
+
/** Convenience method for looking up font resources */
public static Font getFont(String fontName, int height) {
return getDefault().getPluginResources().getFont(fontName, height);
}
+
/** Convenience method for looking up font resources */
public static Font getFont(String fontName, int height, int style) {
return getDefault().getPluginResources().getFont(fontName, height, style);
}
-
+
/** Get the preference store for this Eclipse plug-in */
public static IEclipsePreferences getEclipsePreferenceStore() {
return InstanceScope.INSTANCE.getNode(PLUGIN_ID);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/EnableLoadMetersAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/EnableLoadMetersAction.java
index ce3aecb292..5640cf6bae 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/EnableLoadMetersAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/EnableLoadMetersAction.java
@@ -25,21 +25,20 @@ public class EnableLoadMetersAction extends VisualizerAction {
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
-
+
boolean m_enabled = false;
/** Constructor */
public EnableLoadMetersAction(boolean enable) {
m_enabled = enable;
setText(getTextToDisplay());
- setDescription(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.EnableLoadMeter.description")); //$NON-NLS-1$
+ setDescription(
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.EnableLoadMeter.description")); //$NON-NLS-1$
}
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
@@ -47,22 +46,17 @@ public class EnableLoadMetersAction extends VisualizerAction {
// --- init methods ---
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
// --- methods ---
-
+
private String getTextToDisplay() {
- if(m_enabled) {
- return MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.EnableLoadMeter.Disable.text"); //$NON-NLS-1$
- }
- else {
- return MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.EnableLoadMeter.Enable.text"); //$NON-NLS-1$
+ if (m_enabled) {
+ return MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.EnableLoadMeter.Disable.text"); //$NON-NLS-1$
+ } else {
+ return MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.EnableLoadMeter.Enable.text"); //$NON-NLS-1$
}
}
@@ -71,10 +65,10 @@ public class EnableLoadMetersAction extends VisualizerAction {
public void run() {
if (m_visualizer != null) {
// toggle enabled state
- m_enabled = !m_enabled;
+ m_enabled = !m_enabled;
m_visualizer.enableLoadMeters(m_enabled);
m_visualizer.refresh();
-
+
setText(getTextToDisplay());
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/FilterCanvasAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/FilterCanvasAction.java
index 62a0407dc2..63632b2d87 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/FilterCanvasAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/FilterCanvasAction.java
@@ -23,7 +23,7 @@ public class FilterCanvasAction extends VisualizerAction {
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
-
+
/** Does this action enable or disable the filter mechanism? */
boolean m_createFilter = false;
@@ -31,20 +31,18 @@ public class FilterCanvasAction extends VisualizerAction {
* Constructor
* @param create : Controls whether this action will create or clear the filter
*/
- public FilterCanvasAction(boolean create) {
+ public FilterCanvasAction(boolean create) {
m_createFilter = create;
if (m_createFilter) {
setText(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetFilter.text")); //$NON-NLS-1$
- }
- else {
+ } else {
setText(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.ClearFilter.text")); //$NON-NLS-1$
}
}
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
@@ -52,12 +50,10 @@ public class FilterCanvasAction extends VisualizerAction {
// --- init methods ---
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
// --- methods ---
/** Invoked when action is triggered. */
@@ -66,8 +62,7 @@ public class FilterCanvasAction extends VisualizerAction {
if (m_visualizer != null) {
if (m_createFilter) {
m_visualizer.applyCanvasFilter();
- }
- else {
+ } else {
m_visualizer.clearCanvasFilter();
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
index 21670a493d..b1ed9fadb8 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
@@ -22,30 +22,28 @@ import org.eclipse.cdt.visualizer.ui.VisualizerAction;
/** Pins the multicore visualizer to the current debug session */
public class PinToDebugSessionAction extends VisualizerAction {
-
+
// --- members ---
-
+
/** current active state of pinning */
private boolean m_pinActive;
-
+
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
-
// --- constructors/destructors ---
-
+
/** Constructor. */
public PinToDebugSessionAction() {
- super(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.PinToDebugSession.text"), //$NON-NLS-1$
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.PinToDebugSession.description"), //$NON-NLS-1$
- CDebugImages.DESC_LCL_PIN_VIEW
- );
+ super(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.PinToDebugSession.text"), //$NON-NLS-1$
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.PinToDebugSession.description"), //$NON-NLS-1$
+ CDebugImages.DESC_LCL_PIN_VIEW);
// at first, this action is disabled (un-pinned)
setChecked(false);
m_pinActive = false;
}
-
+
/** Dispose method. */
@Override
public void dispose() {
@@ -53,15 +51,13 @@ public class PinToDebugSessionAction extends VisualizerAction {
super.dispose();
}
-
// --- init methods ---
-
+
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
+
// --- methods ---
/** Invoked when action is triggered. */
@@ -72,8 +68,7 @@ public class PinToDebugSessionAction extends VisualizerAction {
if (m_pinActive) {
m_visualizer.pin();
- }
- else {
+ } else {
m_visualizer.unpin();
}
// update the toolbar
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/RefreshAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/RefreshAction.java
index 1710f3da78..c9f51492e6 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/RefreshAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/RefreshAction.java
@@ -20,46 +20,37 @@ import org.eclipse.cdt.visualizer.ui.VisualizerAction;
import org.eclipse.swt.SWT;
/** Action that refreshes the Visualizer canvas. */
-public class RefreshAction extends VisualizerAction
-{
+public class RefreshAction extends VisualizerAction {
// --- members ---
-
+
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
-
-
+
// --- constructors/destructors ---
/** Constructor. */
- public RefreshAction()
- {
- setText(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.Refresh.text")); //$NON-NLS-1$
- setDescription(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.Refresh.description")); //$NON-NLS-1$
+ public RefreshAction() {
+ setText(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.Refresh.text")); //$NON-NLS-1$
+ setDescription(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.Refresh.description")); //$NON-NLS-1$
setAccelerator(SWT.F5);
}
-
+
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
-
-
+
// --- init methods ---
-
+
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
-
+
// --- methods ---
-
+
/** Invoked when action is triggered. */
@Override
public void run() {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SelectAllAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SelectAllAction.java
index 88e28ba4c7..9f2b640c05 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SelectAllAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SelectAllAction.java
@@ -20,46 +20,37 @@ import org.eclipse.cdt.visualizer.ui.VisualizerAction;
import org.eclipse.swt.SWT;
/** Select All action for Visualizer context menu. */
-public class SelectAllAction extends VisualizerAction
-{
+public class SelectAllAction extends VisualizerAction {
// --- members ---
-
+
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
-
-
+
// --- constructors/destructors ---
/** Constructor. */
- public SelectAllAction()
- {
- setText(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.SelectAll.text")); //$NON-NLS-1$
- setDescription(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.SelectAll.description")); //$NON-NLS-1$
+ public SelectAllAction() {
+ setText(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SelectAll.text")); //$NON-NLS-1$
+ setDescription(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SelectAll.description")); //$NON-NLS-1$
setAccelerator(SWT.CTRL + 'A');
}
-
+
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
-
-
+
// --- init methods ---
-
+
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
-
+
// --- methods ---
-
+
/** Invoked when action is triggered. */
@Override
public void run() {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SetLoadMeterPeriodAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SetLoadMeterPeriodAction.java
index e1fe94f5d3..5620f94636 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SetLoadMeterPeriodAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/SetLoadMeterPeriodAction.java
@@ -23,7 +23,6 @@ import org.eclipse.cdt.visualizer.ui.VisualizerAction;
*/
public class SetLoadMeterPeriodAction extends VisualizerAction {
-
/** Visualizer instance we're associated with. */
MulticoreVisualizer m_visualizer = null;
@@ -32,15 +31,14 @@ public class SetLoadMeterPeriodAction extends VisualizerAction {
public SetLoadMeterPeriodAction(String label, int period) {
super(label, AS_RADIO_BUTTON);
m_period = period;
-
- setDescription(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.SetLoadMeterPeriod.description")); //$NON-NLS-1$
+
+ setDescription(
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.description")); //$NON-NLS-1$
}
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
@@ -48,16 +46,16 @@ public class SetLoadMeterPeriodAction extends VisualizerAction {
// --- init methods ---
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
/** Invoked when action is triggered. */
@Override
public void run() {
- if (!isChecked()) return;
-
+ if (!isChecked())
+ return;
+
if (m_visualizer != null) {
m_visualizer.setLoadMeterTimerPeriod(m_period);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/ShowDebugToolbarAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/ShowDebugToolbarAction.java
index fac7a23d6f..203aed3371 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/ShowDebugToolbarAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/ShowDebugToolbarAction.java
@@ -27,10 +27,10 @@ public class ShowDebugToolbarAction extends VisualizerAction {
/** Visualizer instance we're associated with. */
private MulticoreVisualizer m_visualizer;
-
+
/** persistent settings manager */
private PersistentSettingsManager m_persistentSettingsManager;
-
+
/** Persistent parameter that remembers if the debug actions should be shown or not */
private PersistentParameter<Boolean> m_showDebugActions;
@@ -40,37 +40,34 @@ public class ShowDebugToolbarAction extends VisualizerAction {
* @param showDebugActions : show the debug actions by default
* @param MVInstanceId : id that uniquely identifies a Multicore Visualizer instance
*/
- public ShowDebugToolbarAction(boolean showDebugActions, String MVInstanceId)
- {
- super(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.ShowDebugToolbar.text"), Action.AS_CHECK_BOX); //$NON-NLS-1$
- setDescription(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.ShowDebugToolbar.description")); //$NON-NLS-1$
-
+ public ShowDebugToolbarAction(boolean showDebugActions, String MVInstanceId) {
+ super(MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.ShowDebugToolbar.text"), //$NON-NLS-1$
+ Action.AS_CHECK_BOX);
+ setDescription(
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.ShowDebugToolbar.description")); //$NON-NLS-1$
+
m_persistentSettingsManager = new PersistentSettingsManager("ShowDebugToolbarAction", MVInstanceId); //$NON-NLS-1$
- m_showDebugActions = m_persistentSettingsManager.getNewParameter(Boolean.class,
- "showDebugActionsInMVToolbar", true, showDebugActions); //$NON-NLS-1$
-
+ m_showDebugActions = m_persistentSettingsManager.getNewParameter(Boolean.class, "showDebugActionsInMVToolbar", //$NON-NLS-1$
+ true, showDebugActions);
+
// Set initial state
this.setChecked(m_showDebugActions.value());
}
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
m_visualizer = null;
super.dispose();
}
-
// --- init methods ---
/** Initializes this action for the specified view. */
- public void init(MulticoreVisualizer visualizer)
- {
+ public void init(MulticoreVisualizer visualizer) {
m_visualizer = visualizer;
}
-
// --- methods ---
/** Invoked when action is triggered. */
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/IVisualizerModelObject.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/IVisualizerModelObject.java
index 96a10b36b5..3005fcbbfb 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/IVisualizerModelObject.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/IVisualizerModelObject.java
@@ -17,12 +17,12 @@ package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
* Common interface for visualizer model objects
*/
public interface IVisualizerModelObject {
- /** Get the ID of this model object */
+ /** Get the ID of this model object */
public int getID();
-
+
/** Get the parent of this model object*/
- public IVisualizerModelObject getParent();
-
+ public IVisualizerModelObject getParent();
+
/** Compare two IVisualizerModelObject */
public int compareTo(IVisualizerModelObject o);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCPU.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCPU.java
index bceb1ce464..518868a6d4 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCPU.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCPU.java
@@ -26,33 +26,30 @@ import java.util.List;
//----------------------------------------------------------------------------
/** Represents single CPU. */
-public class VisualizerCPU
- implements Comparable<VisualizerCPU>, IVisualizerModelObject
-{
+public class VisualizerCPU implements Comparable<VisualizerCPU>, IVisualizerModelObject {
// --- members ---
-
+
/** ID of this core. */
public int m_id;
-
+
/** Load object associated to this cpu */
protected VisualizerLoadInfo m_loadinfo;
-
+
/** List of cores */
protected ArrayList<VisualizerCore> m_cores;
-
+
/** Lookup table for cores. */
protected Hashtable<Integer, VisualizerCore> m_coreMap;
-
-
+
// --- constructors/destructors ---
-
+
/** Constructor */
public VisualizerCPU(int id) {
m_id = id;
m_cores = new ArrayList<VisualizerCore>();
m_coreMap = new Hashtable<Integer, VisualizerCore>();
}
-
+
/** Dispose method */
public void dispose() {
if (m_cores != null) {
@@ -66,63 +63,61 @@ public class VisualizerCPU
m_loadinfo = null;
}
}
-
-
+
// --- Object methods ---
-
+
/** Returns string representation. */
@Override
public String toString() {
return "CPU:" + m_id; //$NON-NLS-1$
}
-
-
+
// --- accessors ---
-
+
/** Gets ID of this CPU. */
@Override
public int getID() {
return m_id;
}
-
+
/** CPU has no parent - always returns null */
@Override
public IVisualizerModelObject getParent() {
return null;
}
-
+
/** Sets the load object associated to this CPU */
- public synchronized void setLoadInfo (VisualizerLoadInfo info) {
+ public synchronized void setLoadInfo(VisualizerLoadInfo info) {
m_loadinfo = info;
}
-
+
/** Gets the load value associated to this CPU */
public synchronized Integer getLoad() {
return (m_loadinfo == null) ? null : m_loadinfo.getLoad();
}
-
+
/** get the highest recorded load value for this CPU*/
public synchronized Integer getHighLoadWatermark() {
return (m_loadinfo == null) ? null : m_loadinfo.getHighLoadWaterMark();
}
-
+
// --- methods ---
-
+
/** Gets number of cores. */
public int getCoreCount() {
return m_cores.size();
}
-
+
/** Gets cores. */
public List<VisualizerCore> getCores() {
return m_cores;
}
-
+
/** Gets core with specified ID. */
public VisualizerCore getCore(int id) {
return m_coreMap.get(id);
}
-
+
/** Adds core. */
public VisualizerCore addCore(VisualizerCore core) {
m_cores.add(core);
@@ -136,15 +131,13 @@ public class VisualizerCPU
m_coreMap.remove(core.getID());
}
-
/** Sorts cores, cpus, etc. by IDs. */
public void sort() {
Collections.sort(m_cores);
}
-
// --- Comparable implementation ---
-
+
/** Compares this item to the specified item. */
@Override
public int compareTo(VisualizerCPU o) {
@@ -152,20 +145,19 @@ public class VisualizerCPU
if (o != null) {
if (m_id < o.m_id) {
result = -1;
- }
- else if (m_id > o.m_id) {
+ } else if (m_id > o.m_id) {
result = 1;
}
}
return result;
}
-
+
/** IVisualizerModelObject version of compareTO() */
@Override
public int compareTo(IVisualizerModelObject o) {
if (o != null) {
if (o.getClass() == this.getClass()) {
- return compareTo((VisualizerCPU)o);
+ return compareTo((VisualizerCPU) o);
}
}
return 1;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCore.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCore.java
index 3729872ba1..a805a77164 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCore.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerCore.java
@@ -16,47 +16,42 @@
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
-
/** Represents single core of a CPU. */
-public class VisualizerCore
- implements Comparable<VisualizerCore>, IVisualizerModelObject
-{
+public class VisualizerCore implements Comparable<VisualizerCore>, IVisualizerModelObject {
// --- members ---
-
+
/** CPU this core is part of. */
public VisualizerCPU m_cpu = null;
-
+
/** Linux CPU ID of this core. */
public int m_id = 0;
-
+
/** Load information associated to this core */
protected VisualizerLoadInfo m_loadinfo;
-
+
// --- constructors/destructors ---
-
+
/** Constructor */
public VisualizerCore(VisualizerCPU cpu, int id) {
m_cpu = cpu;
m_id = id;
}
-
+
/** Dispose method */
public void dispose() {
m_loadinfo = null;
}
-
-
+
// --- Object methods ---
-
+
/** Returns string representation. */
@Override
public String toString() {
return m_cpu + ",Core:" + m_id; //$NON-NLS-1$
}
-
// --- accessors ---
-
+
/** Gets CPU this core is part of. */
public VisualizerCPU getCPU() {
return m_cpu;
@@ -67,35 +62,32 @@ public class VisualizerCore
public int getID() {
return m_id;
}
-
+
/** Return CPU this core is on. */
@Override
public IVisualizerModelObject getParent() {
return getCPU();
}
-
+
/** Sets the load object associated to this core */
- public synchronized void setLoadInfo (VisualizerLoadInfo info) {
+ public synchronized void setLoadInfo(VisualizerLoadInfo info) {
m_loadinfo = info;
}
-
+
/** Gets the load value of this core */
public synchronized Integer getLoad() {
return (m_loadinfo == null) ? null : m_loadinfo.getLoad();
}
-
+
/** Get the highest recorded load value for this core */
public synchronized Integer getHighLoadWatermark() {
return (m_loadinfo == null) ? null : m_loadinfo.getHighLoadWaterMark();
}
-
// --- methods ---
-
-
-
+
// --- Comparable implementation ---
-
+
/** Compares this item to the specified item. */
@Override
public int compareTo(VisualizerCore o) {
@@ -103,8 +95,7 @@ public class VisualizerCore
if (o != null) {
if (m_id < o.m_id) {
result = -1;
- }
- else if (m_id > o.m_id) {
+ } else if (m_id > o.m_id) {
result = 1;
}
}
@@ -116,10 +107,10 @@ public class VisualizerCore
public int compareTo(IVisualizerModelObject o) {
if (o != null) {
if (o.getClass() == this.getClass()) {
- return compareTo((VisualizerCore)o);
+ return compareTo((VisualizerCore) o);
}
}
return 1;
}
-
+
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerExecutionState.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerExecutionState.java
index 12c65077d8..7032fe99b3 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerExecutionState.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerExecutionState.java
@@ -17,9 +17,6 @@ package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
/**
* Execution state for the different multicore visualizer objects.
*/
-public enum VisualizerExecutionState {
- RUNNING,
- SUSPENDED,
- CRASHED,
- EXITED
+public enum VisualizerExecutionState {
+ RUNNING, SUSPENDED, CRASHED, EXITED
};
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerLoadInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerLoadInfo.java
index acc062d54f..2f505c80ff 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerLoadInfo.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerLoadInfo.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
-
//----------------------------------------------------------------------------
//VisualizerLoadInfo
//----------------------------------------------------------------------------
@@ -24,51 +23,47 @@ package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
public class VisualizerLoadInfo {
// --- members ---
-
+
/** load */
protected Integer m_load = null;
-
+
/** the high load water-mark */
protected Integer m_highLoadWatermark = null;
-
-
+
// --- constructors/destructors ---
-
+
/** constructor */
- public VisualizerLoadInfo (Integer load) {
+ public VisualizerLoadInfo(Integer load) {
m_load = load;
}
-
- public VisualizerLoadInfo (Integer load, Integer highLoadWatermark) {
+
+ public VisualizerLoadInfo(Integer load, Integer highLoadWatermark) {
this(load);
m_highLoadWatermark = highLoadWatermark;
}
-
// --- Object methods ---
/** Returns string representation. */
@Override
public String toString() {
- if(m_highLoadWatermark != null) {
+ if (m_highLoadWatermark != null) {
return "Load:" + m_load + ", high water-mark:" + m_highLoadWatermark; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
+ } else {
return "Load:" + m_load + ", high water-mark: not defined"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
-
+
// --- accessors ---
-
+
/** Gets the CPU usage load of this core. */
public Integer getLoad() {
return m_load;
}
-
+
/** get the high load water-mark */
public Integer getHighLoadWaterMark() {
return m_highLoadWatermark;
}
-
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerModel.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerModel.java
index 8f674d1ce4..9543be19a0 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerModel.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerModel.java
@@ -23,35 +23,34 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
-/**
- * Class representing the state of the data to display in the MulticoreVisualizer.
+/**
+ * Class representing the state of the data to display in the MulticoreVisualizer.
*/
-public class VisualizerModel
-{
+public class VisualizerModel {
// --- members ---
-
+
/** List of cpus (and cores) */
protected ArrayList<VisualizerCPU> m_cpus;
-
+
/** Lookup table for CPUs */
protected Hashtable<Integer, VisualizerCPU> m_cpuMap;
-
+
/** List of threads */
protected ArrayList<VisualizerThread> m_threads;
-
+
// Setting to remove exited threads, or keep them shown.
// If we are to support this, we should have a preference
// and a way to for the user to clean up old threads,
// or maybe a timeout to remove them.
private boolean m_keepExitedThreads = false;
-
+
protected boolean m_loadMetersEnabled = false;
-
+
/** data source corresponding to this model */
protected String m_sessionId = null;
-
+
// --- constructors/destructors ---
-
+
/** Constructor */
public VisualizerModel(String sessionId) {
m_sessionId = sessionId;
@@ -59,7 +58,7 @@ public class VisualizerModel
m_cpuMap = new Hashtable<Integer, VisualizerCPU>();
m_threads = new ArrayList<VisualizerThread>();
}
-
+
/** Dispose method */
public void dispose() {
if (m_cpus != null) {
@@ -80,75 +79,75 @@ public class VisualizerModel
}
m_sessionId = null;
}
-
-
+
// --- accessors ---
- public void setLoadMetersEnabled (boolean enable) {
+ public void setLoadMetersEnabled(boolean enable) {
m_loadMetersEnabled = enable;
}
-
- public boolean getLoadMetersEnabled () {
+
+ public boolean getLoadMetersEnabled() {
return m_loadMetersEnabled;
}
-
+
/** Gets the unique id for the source this model was build from */
public String getSessionId() {
return m_sessionId;
}
-
+
// --- methods ---
-
+
/** Sorts cores, cpus, etc. by IDs. */
public void sort() {
Collections.sort(m_cpus);
- for (VisualizerCPU cpu : m_cpus) cpu.sort();
+ for (VisualizerCPU cpu : m_cpus)
+ cpu.sort();
Collections.sort(m_threads);
}
-
-
+
// --- core/cpu management ---
-
+
/** Gets number of CPUs. */
public int getCPUCount() {
return m_cpus.size();
}
-
+
/** Gets number of cores. */
public int getCoreCount() {
int count = 0;
-
- for(VisualizerCPU cpu : m_cpus) {
+
+ for (VisualizerCPU cpu : m_cpus) {
count += cpu.getCoreCount();
}
return count;
}
-
+
/** Gets number of threads. */
- public int getThreadCount () {
+ public int getThreadCount() {
return m_threads.size();
}
-
+
/** Gets CPU with specified ID. */
public VisualizerCPU getCPU(int id) {
return m_cpuMap.get(id);
}
-
+
/** Gets Core with specified ID. */
public VisualizerCore getCore(int id) {
VisualizerCore result = null;
- for (VisualizerCPU cpu: m_cpus) {
+ for (VisualizerCPU cpu : m_cpus) {
result = cpu.getCore(id);
- if (result != null) break;
+ if (result != null)
+ break;
}
return result;
}
-
+
/** Gets CPU set. */
public List<VisualizerCPU> getCPUs() {
return m_cpus;
}
-
+
/** Adds CPU. */
public VisualizerCPU addCPU(VisualizerCPU cpu) {
m_cpus.add(cpu);
@@ -162,26 +161,25 @@ public class VisualizerModel
m_cpuMap.remove(cpu.getID());
}
-
/** Gets maximum number of cores per CPU. */
public int getCoresPerCPU() {
int maxCores = 1;
for (VisualizerCPU cpu : m_cpus) {
int cores = cpu.getCoreCount();
- if (cores > maxCores) maxCores = cores;
+ if (cores > maxCores)
+ maxCores = cores;
}
return maxCores;
}
-
-
+
// --- thread management ---
-
+
/** Gets threads. */
public List<VisualizerThread> getThreads() {
return m_threads;
}
- /**
+ /**
* Finds thread(s) by process ID.
* If no threads are found, returns null rather
* than an empty list.
@@ -190,14 +188,15 @@ public class VisualizerModel
List<VisualizerThread> result = null;
for (VisualizerThread thread : m_threads) {
if (thread.getPID() == processId) {
- if (result == null) result = new ArrayList<VisualizerThread>();
+ if (result == null)
+ result = new ArrayList<VisualizerThread>();
result.add(thread);
}
}
return result;
}
- /**
+ /**
* Find a thread by GDB threadId.
* Since thread ids are unique across a GDB session,
* we can uniquely find a thread based on its id.
@@ -224,7 +223,7 @@ public class VisualizerModel
m_threads.remove(thread);
}
- /**
+ /**
* Removes thread by GDB threadId.
*/
public void removeThread(int threadId) {
@@ -237,7 +236,7 @@ public class VisualizerModel
}
}
}
-
+
/**
* Mark the specified thread as having exited.
*/
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
index 7327782962..dfbd3e6568 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
@@ -10,7 +10,7 @@
*
* Contributors:
* William R. Swanson (Tilera Corporation) - initial API and implementation
- * Marc Khouzam (Ericsson) - Added knowledge about execution
+ * Marc Khouzam (Ericsson) - Added knowledge about execution
* state and os/gdb thread ids
* Marc Dumais (Ericsson) - Bug 405390
* Marc Dumais (Ericsson) - Bug 409965
@@ -21,19 +21,16 @@ package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
-
/** Represents single thread. */
-public class VisualizerThread
- implements Comparable<VisualizerThread>, IVisualizerModelObject
-{
+public class VisualizerThread implements Comparable<VisualizerThread>, IVisualizerModelObject {
// --- members ---
-
+
/** Current core this thread is on. */
protected VisualizerCore m_core;
-
+
/** Process ID (pid). */
protected int m_pid;
-
+
/** OS Thread ID (tid). */
protected int m_tid;
@@ -44,9 +41,8 @@ public class VisualizerThread
protected VisualizerExecutionState m_threadState;
/** Location of this Thread, if any, based on his MIFrame */
- protected String m_locInfo;
+ protected String m_locInfo;
-
// --- constructors/destructors ---
/** Constructor. */
@@ -55,7 +51,8 @@ public class VisualizerThread
}
/** Constructor. */
- public VisualizerThread(VisualizerCore core, int pid, int tid, int gdbtid, VisualizerExecutionState state, IFrameDMData frame) {
+ public VisualizerThread(VisualizerCore core, int pid, int tid, int gdbtid, VisualizerExecutionState state,
+ IFrameDMData frame) {
m_core = core;
m_pid = pid;
m_tid = tid;
@@ -63,26 +60,21 @@ public class VisualizerThread
m_threadState = state;
setLocationInfo(frame);
}
-
+
/** Dispose method */
public void dispose() {
m_core = null;
}
-
-
+
// --- Object methods ---
-
+
/** Equality comparison. */
@Override
public boolean equals(Object obj) {
boolean result = false;
if (obj instanceof VisualizerThread) {
VisualizerThread v = (VisualizerThread) obj;
- result = (
- v.m_pid == m_pid &&
- v.m_tid == m_tid &&
- v.m_gdbtid == m_gdbtid
- );
+ result = (v.m_pid == m_pid && v.m_tid == m_tid && v.m_gdbtid == m_gdbtid);
}
return result;
}
@@ -91,24 +83,23 @@ public class VisualizerThread
public int hashCode() {
return m_pid ^ m_tid ^ m_gdbtid;
}
-
+
/** Returns string representation. */
@Override
public String toString() {
StringBuilder output = new StringBuilder();
output.append(m_core).append(",Proc:").append(m_pid) //$NON-NLS-1$
- .append(",Thread:(").append(m_tid).append(",").append(m_gdbtid).append(")"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ .append(",Thread:(").append(m_tid).append(",").append(m_gdbtid).append(")"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
return output.toString();
}
-
// --- accessors ---
-
+
/** Gets core. */
- public VisualizerCore getCore() {
+ public VisualizerCore getCore() {
return m_core;
}
-
+
public void setCore(VisualizerCore core) {
m_core = core;
}
@@ -116,23 +107,22 @@ public class VisualizerThread
/** Returns true if this is the "process" thread, i.e.
* its PID and OS TID are the same.
*/
- public boolean isProcessThread()
- {
+ public boolean isProcessThread() {
return m_pid == m_tid;
}
-
+
/** Gets process id (pid). */
public int getPID() {
return m_pid;
}
-
+
/** Gets thread id (tid). */
- public int getTID() {
+ public int getTID() {
return m_tid;
}
-
+
/** Sets thread id (tid). */
- public void setTID(int tid) {
+ public void setTID(int tid) {
m_tid = tid;
}
@@ -147,9 +137,9 @@ public class VisualizerThread
public IVisualizerModelObject getParent() {
return getCore();
}
-
+
/** Gets gdb thread id. */
- public int getGDBTID() {
+ public int getGDBTID() {
return m_gdbtid;
}
@@ -157,19 +147,16 @@ public class VisualizerThread
public VisualizerExecutionState getState() {
return m_threadState;
}
-
+
/** Sets thread execution state. */
public void setState(VisualizerExecutionState state) {
m_threadState = state;
}
-
-
+
// --- methods ---
-
-
// --- Comparable implementation ---
-
+
/** Compares this item to the specified item. */
@Override
public int compareTo(VisualizerThread o) {
@@ -177,26 +164,23 @@ public class VisualizerThread
if (o != null) {
if (m_pid < o.m_pid) {
result = -1;
- }
- else if (m_pid > o.m_pid) {
+ } else if (m_pid > o.m_pid) {
result = 1;
- }
- else if (getID() < o.getID()) {
+ } else if (getID() < o.getID()) {
result = -1;
- }
- else if (getID() > o.getID()) {
+ } else if (getID() > o.getID()) {
result = 1;
}
}
return result;
}
-
+
/** IVisualizerModelObject version of compareTo() */
@Override
public int compareTo(IVisualizerModelObject o) {
if (o != null) {
if (o.getClass() == this.getClass()) {
- return compareTo((VisualizerThread)o);
+ return compareTo((VisualizerThread) o);
}
}
return 1;
@@ -206,14 +190,14 @@ public class VisualizerThread
* Sets the location info of this thread
* @param s a string, displayinf location information of this thread.
*/
- public void setLocationInfo(String s) {
- this.m_locInfo = s;
- }
+ public void setLocationInfo(String s) {
+ this.m_locInfo = s;
+ }
/**
* Sets the location info of this thread, based on given
* {@link IFrameDMData}
- *
+ *
* @param dmData
* a {@link IFrameDMData} (can be <code>null</code>)
*/
@@ -223,15 +207,13 @@ public class VisualizerThread
} else {
StringBuilder label = new StringBuilder();
// Add the function name
- if (dmData.getFunction() != null
- && dmData.getFunction().length() != 0) {
+ if (dmData.getFunction() != null && dmData.getFunction().length() != 0) {
label.append(" "); //$NON-NLS-1$
label.append(dmData.getFunction());
label.append("()"); //$NON-NLS-1$
}
- boolean hasFileName = dmData.getFile() != null
- && dmData.getFile().length() != 0;
+ boolean hasFileName = dmData.getFile() != null && dmData.getFile().length() != 0;
// Add full file name
if (hasFileName) {
@@ -247,9 +229,7 @@ public class VisualizerThread
}
// Add module
- if (!hasFileName
- && (dmData.getModule() != null && dmData.getModule()
- .length() != 0)) {
+ if (!hasFileName && (dmData.getModule() != null && dmData.getModule().length() != 0)) {
label.append(" "); //$NON-NLS-1$
label.append(dmData.getModule());
label.append(" "); //$NON-NLS-1$
@@ -265,13 +245,12 @@ public class VisualizerThread
/**
* Gets the location of this thread or <code>null</code> if none.
- *
+ *
* @return a String, or <code>null</code>
* @since 3.0
*/
public String getLocationInfo() {
- if (m_threadState == VisualizerExecutionState.RUNNING
- || m_threadState == VisualizerExecutionState.EXITED) {
+ if (m_threadState == VisualizerExecutionState.RUNNING || m_threadState == VisualizerExecutionState.EXITED) {
return null;
}
return m_locInfo;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IMulticoreVisualizerConstants.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IMulticoreVisualizerConstants.java
index b38c7b5c3b..cb0109d75d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IMulticoreVisualizerConstants.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IMulticoreVisualizerConstants.java
@@ -18,17 +18,15 @@ package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
import org.eclipse.cdt.visualizer.ui.util.Colors;
import org.eclipse.swt.graphics.Color;
-
/**
* Constants to be used in the Multicore Visualizer.
*/
-public class IMulticoreVisualizerConstants
-{
+public class IMulticoreVisualizerConstants {
// General canvas colors
public static final Color COLOR_SELECTED = Colors.CYAN;
-
+
// Colors for drawing threads
-
+
/** Color to be used to draw a running thread */
public static final Color COLOR_RUNNING_THREAD = Colors.GREEN;
/** Color to be used to draw a suspended thread */
@@ -42,7 +40,7 @@ public class IMulticoreVisualizerConstants
public static final Color COLOR_PROCESS_THREAD = Colors.WHITE;
// Colors for drawing cores
-
+
/** Color to be used to draw a running core */
public static final Color COLOR_RUNNING_CORE_FG = Colors.GREEN;
public static final Color COLOR_RUNNING_CORE_BG = Colors.DARK_GREEN;
@@ -52,14 +50,14 @@ public class IMulticoreVisualizerConstants
/** Color to be used to draw a crashed core */
public static final Color COLOR_CRASHED_CORE_FG = Colors.RED;
public static final Color COLOR_CRASHED_CORE_BG = Colors.DARK_RED;
-
+
// Colors for drawing CPUs
-
+
/** Foreground color for cpu */
public static final Color COLOR_CPU_FG = Colors.GREEN;
/** Background color for cpu */
- public static final Color COLOR_CPU_BG = Colors.getColor(0,64,0);
-
+ public static final Color COLOR_CPU_BG = Colors.getColor(0, 64, 0);
+
// Colors for text
/** Foreground color to be used to draw a the text for a thread */
@@ -68,23 +66,23 @@ public class IMulticoreVisualizerConstants
public static final Color COLOR_THREAD_TEXT_BG = Colors.BLACK;
/** Color to be used to draw a the text for a core */
- public static final Color COLOR_CORE_TEXT_FG = Colors.WHITE;
+ public static final Color COLOR_CORE_TEXT_FG = Colors.WHITE;
public static final Color COLOR_CORE_TEXT_BG = Colors.BLACK;
-
+
/** Color to be used to draw the load text */
public static final Color COLOR_LOAD_TEXT = Colors.GREEN;
-
+
/** Color used to draw text to the status bar */
public static final Color COLOR_STATUS_BAR_TEXT = Colors.GREEN;
-
+
// Colors for load meters
-
+
/** Color used to draw the bar representing load, under normal load */
public static final Color COLOR_LOAD_LOADBAR_NORMAL = Colors.GREEN;
/** Color used to draw the bar representing load, under high load */
public static final Color COLOR_LOAD_LOADBAR_OVERLOAD = Colors.RED;
/** Color used to draw the load meter foreground */
- public static final Color COLOR_LOAD_UNDERBAR_FG = Colors.getColor(0,200,0);
+ public static final Color COLOR_LOAD_UNDERBAR_FG = Colors.getColor(0, 200, 0);
/** Color used to draw the load meter background */
- public static final Color COLOR_LOAD_UNDERBAR_BG_DEFAULT = Colors.getColor(0,64,0);
+ public static final Color COLOR_LOAD_UNDERBAR_BG_DEFAULT = Colors.getColor(0, 64, 0);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IPinnable.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IPinnable.java
index c468cd49ed..25adaf8a69 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IPinnable.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/IPinnable.java
@@ -21,12 +21,12 @@ public interface IPinnable {
* Pins to the current context
*/
public void pin();
-
+
/**
* Unpins
*/
public void unpin();
-
+
/** Returns whether currently pinned */
public boolean isPinned();
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
index 8f48f4a6a5..9376dad953 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
@@ -118,25 +118,25 @@ import org.eclipse.swt.widgets.Composite;
/**
* The Multicore Visualizer is a generic visualizer that displays
* CPUs, cores, threads graphically.
- *
+ *
* This visualizer uses the CDT Visualizer framework.
*/
@SuppressWarnings("restriction")
public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPinnable {
// --- constants ---
-
+
private static final String THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER = "The thread id does not convert to an integer: "; //$NON-NLS-1$
- /** Eclipse ID for this view */
+ /** Eclipse ID for this view */
public static final String ECLIPSE_ID = "org.eclipse.cdt.dsf.gdb.multicorevisualizer.visualizer"; //$NON-NLS-1$
-
+
// --- members ---
-
+
/**
* The data model drawn by this visualizer.
*/
protected VisualizerModel fDataModel;
-
+
/**
* Proxy to the target data needed to build the model
*/
@@ -144,43 +144,42 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
/** Downcast reference to canvas. */
protected MulticoreVisualizerCanvas m_canvas;
-
+
/** DSF debug context session object. */
protected DSFSessionState m_sessionState;
-
+
/** Event listener class for DSF events */
protected MulticoreVisualizerEventListener fEventListener;
-
+
/** Cached reference to Debug View viewer. */
protected TreeModelViewer m_debugViewer = null;
-
+
/** Model changed listener, attached to Debug View. */
protected IModelChangedListener m_modelChangedListener = null;
-
+
/** Debug view selection changed listener, attached to Debug View. */
protected ISelectionChangedListener m_debugViewSelectionChangedListener = null;
-
- /** Unique id that differentiates the possible multiple instances of the MV.
- * It's derived from the secondary view Part id of the view associated to the
+
+ /** Unique id that differentiates the possible multiple instances of the MV.
+ * It's derived from the secondary view Part id of the view associated to the
* current instance of the MV. */
protected String m_visualizerInstanceId = null;
-
+
// This is used to cache the CPU and core
// contexts, each time the model is recreated. This way
// we can avoid asking the backend for the CPU/core
// geometry each time we want to update the load information.
protected List<IDMContext> m_cpuCoreContextsCache = null;
-
/** Main switch that determines if we should display the load meters */
private PersistentParameter<Boolean> m_loadMetersEnabled;
-
+
/** Timer used to trigger the update of the CPU/core load meters */
protected Timer m_updateLoadMeterTimer = null;
-
+
/** update period for the load meters */
private PersistentParameter<Integer> m_loadMeterTimerPeriod;
-
+
// Load meters refresh periods, in ms
/** constant for the very short load meters update period */
private static final int LOAD_METER_TIMER_MIN = 100;
@@ -189,89 +188,86 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
/** constant for the medium load meters update period */
private static final int LOAD_METER_TIMER_MEDIUM = 1000;
/** constant for the long load meters update period */
- private static final int LOAD_METER_TIMER_SLOW = 5000;
-
+ private static final int LOAD_METER_TIMER_SLOW = 5000;
+
/** Whether to show debug actions in toolbar, by default */
- private static final boolean SHOW_DEBUG_ACTIONS_IN_MV_TOOLBAR_DEFAULT = true;
-
+ private static final boolean SHOW_DEBUG_ACTIONS_IN_MV_TOOLBAR_DEFAULT = true;
+
/** Currently pinned session id, if any */
private String m_currentPinedSessionId = null;
-
// --- UI members ---
/** Whether actions have been initialized. */
protected boolean m_actionsInitialized = false;
-
+
/** Toolbar / menu action */
- protected Separator m_separatorAction = null;
+ protected Separator m_separatorAction = null;
/** Toolbar / menu action */
protected ResumeCommandAction m_resumeAction = null;
-
+
/** Toolbar / menu action */
protected SuspendCommandAction m_suspendAction = null;
-
+
/** Toolbar / menu action */
protected TerminateCommandAction m_terminateAction = null;
-
+
/** Toolbar / menu action */
protected StepReturnCommandAction m_stepReturnAction = null;
-
+
/** Toolbar / menu action */
protected StepOverCommandAction m_stepOverAction = null;
-
+
/** Toolbar / menu action */
protected StepIntoCommandAction m_stepIntoAction = null;
-
+
/** Toolbar / menu action */
protected DropToFrameCommandAction m_dropToFrameAction = null;
-
+
/** Toolbar / menu action */
protected SelectAllAction m_selectAllAction = null;
-
+
/** Toolbar / menu action */
protected RefreshAction m_refreshAction = null;
-
+
/** Sub-menu */
protected IMenuManager m_loadMetersSubMenu = null;
-
+
/** Sub-sub menu */
protected IMenuManager m_loadMetersRefreshSubSubmenu = null;
-
+
/** Menu action */
protected EnableLoadMetersAction m_enableLoadMetersAction = null;
-
+
/** Menu action */
protected List<SetLoadMeterPeriodAction> m_setLoadMeterPeriodActions = null;
-
+
/** Menu action */
protected FilterCanvasAction m_setFilterAction = null;
/** Menu action */
- protected FilterCanvasAction m_clearFilterAction = null;
-
+ protected FilterCanvasAction m_clearFilterAction = null;
+
/** Menu action */
protected PinToDebugSessionAction m_pinToDbgSessionAction = null;
-
+
/** Menu action */
protected ShowDebugToolbarAction m_showDebugToolbarAction = null;
-
+
/** persistent settings manager */
protected PersistentSettingsManager m_persistentSettingsManager = null;
// --- constructors/destructors ---
-
+
/** Constructor. */
- public MulticoreVisualizer()
- {
+ public MulticoreVisualizer() {
fTargetData = new DSFDebugModel();
}
-
+
/** Dispose method. */
@Override
- public void dispose()
- {
+ public void dispose() {
super.dispose();
removeDebugViewerListener();
disposeActions();
@@ -283,17 +279,16 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_cpuCoreContextsCache = null;
}
}
-
-
+
// --- init methods ---
-
+
/** Invoked when visualizer is created, to permit any initialization. */
@Override
public void initializeVisualizer() {
fEventListener = new MulticoreVisualizerEventListener(this);
- m_cpuCoreContextsCache = new ArrayList<IDMContext>();
+ m_cpuCoreContextsCache = new ArrayList<IDMContext>();
m_visualizerInstanceId = getViewer().getView().getViewSite().getSecondaryId();
-
+
// The first visualizer view will have a null secondary id - override that
if (m_visualizerInstanceId == null) {
m_visualizerInstanceId = "0"; //$NON-NLS-1$
@@ -302,99 +297,100 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
/**
- * Initialize the persistent parameters
+ * Initialize the persistent parameters
*/
protected void initializePersistentParameters(String visualizerInstanceId) {
// setting managers
m_persistentSettingsManager = new PersistentSettingsManager("MulticoreVisualizer", visualizerInstanceId); //$NON-NLS-1$
// define persistent parameters:
- m_loadMetersEnabled = m_persistentSettingsManager.getNewParameter(Boolean.class,
- "enableLoadMeters", true, false); //$NON-NLS-1$
- m_loadMeterTimerPeriod = m_persistentSettingsManager.getNewParameter(Integer.class,
- "loadMeterTimerPeriod", true, LOAD_METER_TIMER_MEDIUM); //$NON-NLS-1$
+ m_loadMetersEnabled = m_persistentSettingsManager.getNewParameter(Boolean.class, "enableLoadMeters", true, //$NON-NLS-1$
+ false);
+ m_loadMeterTimerPeriod = m_persistentSettingsManager.getNewParameter(Integer.class, "loadMeterTimerPeriod", //$NON-NLS-1$
+ true, LOAD_METER_TIMER_MEDIUM);
}
-
+
/**
* Sets-up the timer associated to load meters refresh
*/
protected void initializeLoadMeterTimer() {
- if (!getLoadMetersEnabled()) return;
- m_updateLoadMeterTimer = getLoadTimer(m_sessionState, getLoadMeterTimerPeriod());
+ if (!getLoadMetersEnabled())
+ return;
+ m_updateLoadMeterTimer = getLoadTimer(m_sessionState, getLoadMeterTimerPeriod());
// one-shot timer (re-scheduled upon successful triggering)
- m_updateLoadMeterTimer.setRepeating(false);
+ m_updateLoadMeterTimer.setRepeating(false);
}
-
+
/**
* disposes of the load meter timer
*/
protected void disposeLoadMeterTimer() {
- if(m_updateLoadMeterTimer != null) {
+ if (m_updateLoadMeterTimer != null) {
m_updateLoadMeterTimer.dispose();
m_updateLoadMeterTimer = null;
}
}
-
+
/** Invoked when visualizer is disposed, to permit any cleanup. */
@Override
- public void disposeVisualizer()
- {
+ public void disposeVisualizer() {
// handle any other cleanup
dispose();
}
-
-
+
// --- accessors ---
-
+
/** Returns non-localized unique name for this visualizer. */
@Override
public String getName() {
return "multicore"; //$NON-NLS-1$
}
-
+
/** Returns localized name to display for this visualizer. */
@Override
public String getDisplayName() {
- return Messages.MulticoreVisualizer_name;
+ return Messages.MulticoreVisualizer_name;
}
-
+
/** Returns localized tooltip text to display for this visualizer. */
@Override
public String getDescription() {
- return Messages.MulticoreVisualizer_tooltip;
+ return Messages.MulticoreVisualizer_tooltip;
}
-
+
/**
* takes care of the details of changing the load meter timer period
*/
public void setLoadMeterTimerPeriod(int p) {
assert (p > LOAD_METER_TIMER_MIN);
- if (getLoadMeterTimerPeriod() == p) return;
+ if (getLoadMeterTimerPeriod() == p)
+ return;
m_loadMeterTimerPeriod.set(p > LOAD_METER_TIMER_MIN ? p : LOAD_METER_TIMER_MIN);
disposeLoadMeterTimer();
initializeLoadMeterTimer();
}
-
+
/** Gets the load meter period */
public int getLoadMeterTimerPeriod() {
return m_loadMeterTimerPeriod != null ? m_loadMeterTimerPeriod.value() : 0;
}
-
+
/**
* enables or disables the load meters
*/
public void enableLoadMeters(boolean enabled) {
- if (getLoadMetersEnabled() == enabled) return;
+ if (getLoadMetersEnabled() == enabled)
+ return;
setLoadMetersEnabled(enabled);
// save load meter enablement in model
fDataModel.setLoadMetersEnabled(getLoadMetersEnabled());
disposeLoadMeterTimer();
initializeLoadMeterTimer();
}
-
+
/** Returns whether the load meters are enabled */
public boolean getLoadMetersEnabled() {
- return m_loadMetersEnabled != null? m_loadMetersEnabled.value() : false;
+ return m_loadMetersEnabled != null ? m_loadMetersEnabled.value() : false;
}
public void setLoadMetersEnabled(boolean enabled) {
@@ -402,20 +398,18 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
// --- canvas management ---
-
+
/** Creates and returns visualizer canvas control. */
@Override
- public GraphicCanvas createCanvas(Composite parent)
- {
+ public GraphicCanvas createCanvas(Composite parent) {
m_canvas = new MulticoreVisualizerCanvas(parent);
m_canvas.addSelectionChangedListener(this);
return m_canvas;
}
-
+
/** Invoked when canvas control should be disposed. */
@Override
- public void disposeCanvas()
- {
+ public void disposeCanvas() {
if (m_canvas != null) {
m_canvas.removeSelectionChangedListener(this);
m_canvas.dispose();
@@ -423,33 +417,31 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
disposeLoadMeterTimer();
}
-
+
/** Invoked after visualizer control creation, */
@Override
- protected void initializeCanvas(GraphicCanvas canvas)
- {
+ protected void initializeCanvas(GraphicCanvas canvas) {
// Any workbench views left open at application shutdown may be instanced
// before our plugins are fully loaded, so make sure resource manager is initialized.
// Note: this also associates the resource manager with the Colors class;
// until this is done, the Colors constants are null.
CDTVisualizerUIPlugin.getResources();
-
+
m_canvas.setBackground(Colors.BLACK);
m_canvas.setForeground(Colors.GREEN);
}
-
+
/** Returns downcast reference to grid view canvas. */
- public MulticoreVisualizerCanvas getMulticoreVisualizerCanvas()
- {
+ public MulticoreVisualizerCanvas getMulticoreVisualizerCanvas() {
return (MulticoreVisualizerCanvas) getCanvas();
}
-
+
/** Sets-up a canvas filter */
public void applyCanvasFilter() {
m_canvas.applyFilter();
refresh();
}
-
+
/** Removes current canvas filter */
public void clearCanvasFilter() {
m_canvas.clearFilter();
@@ -460,76 +452,81 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
public boolean isCanvasFilterActive() {
return m_canvas.isFilterActive();
}
-
+
/** Return the data model backing this multicore visualizer */
public VisualizerModel getModel() {
return fDataModel;
}
-
-
+
// --- action management ---
/** Creates actions for menus/toolbar. */
- protected void createActions()
- {
- if (m_actionsInitialized) return; // already done
-
+ protected void createActions() {
+ if (m_actionsInitialized)
+ return; // already done
+
LaunchView debugView = DebugViewUtils.getDebugView();
-
- m_separatorAction = new Separator();
-
- m_resumeAction = new ResumeCommandAction();
- if (debugView != null) m_resumeAction.init(debugView);
-
- m_suspendAction = new SuspendCommandAction();
- if (debugView != null) m_suspendAction.init(debugView);
-
- m_terminateAction = new TerminateCommandAction();
- if (debugView != null) m_terminateAction.init(debugView);
-
-
- m_stepReturnAction = new StepReturnCommandAction();
- if (debugView != null) m_stepReturnAction.init(debugView);
-
- m_stepOverAction = new StepOverCommandAction();
- if (debugView != null) m_stepOverAction.init(debugView);
-
- m_stepIntoAction = new StepIntoCommandAction();
- if (debugView != null) m_stepIntoAction.init(debugView);
+
+ m_separatorAction = new Separator();
+
+ m_resumeAction = new ResumeCommandAction();
+ if (debugView != null)
+ m_resumeAction.init(debugView);
+
+ m_suspendAction = new SuspendCommandAction();
+ if (debugView != null)
+ m_suspendAction.init(debugView);
+
+ m_terminateAction = new TerminateCommandAction();
+ if (debugView != null)
+ m_terminateAction.init(debugView);
+
+ m_stepReturnAction = new StepReturnCommandAction();
+ if (debugView != null)
+ m_stepReturnAction.init(debugView);
+
+ m_stepOverAction = new StepOverCommandAction();
+ if (debugView != null)
+ m_stepOverAction.init(debugView);
+
+ m_stepIntoAction = new StepIntoCommandAction();
+ if (debugView != null)
+ m_stepIntoAction.init(debugView);
m_dropToFrameAction = new DropToFrameCommandAction();
- if (debugView != null) m_dropToFrameAction.init(debugView);
-
+ if (debugView != null)
+ m_dropToFrameAction.init(debugView);
+
m_selectAllAction = new SelectAllAction();
m_selectAllAction.init(this);
-
+
m_refreshAction = new RefreshAction();
m_refreshAction.init(this);
// create load meters sub-menu and associated actions
- m_loadMetersSubMenu = new MenuManager(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.LoadMeterSubmenu.text")); //$NON-NLS-1$
- m_loadMetersRefreshSubSubmenu = new MenuManager(MulticoreVisualizerUIPlugin.getString(
- "MulticoreVisualizer.actions.LoadMetersRefreshSubSubmenu.text")); //$NON-NLS-1$
-
+ m_loadMetersSubMenu = new MenuManager(
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.LoadMeterSubmenu.text")); //$NON-NLS-1$
+ m_loadMetersRefreshSubSubmenu = new MenuManager(
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.LoadMetersRefreshSubSubmenu.text")); //$NON-NLS-1$
+
m_enableLoadMetersAction = new EnableLoadMetersAction(getLoadMetersEnabled());
m_enableLoadMetersAction.init(this);
- // enable the load meter sub-menu
- m_enableLoadMetersAction.setEnabled(true);
+ // enable the load meter sub-menu
+ m_enableLoadMetersAction.setEnabled(true);
m_setLoadMeterPeriodActions = new ArrayList<SetLoadMeterPeriodAction>();
m_setLoadMeterPeriodActions.add(new SetLoadMeterPeriodAction(
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.fast.text"), //$NON-NLS-1$
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.fast.text"), //$NON-NLS-1$
LOAD_METER_TIMER_FAST));
-
- // TODO: the default load meter refresh speed is set here but we could instead rely on the value saved in the data store
+
+ // TODO: the default load meter refresh speed is set here but we could instead rely on the value saved in the data store
SetLoadMeterPeriodAction defaultAction = new SetLoadMeterPeriodAction(
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.medium.text"), //$NON-NLS-1$
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.medium.text"), //$NON-NLS-1$
LOAD_METER_TIMER_MEDIUM);
m_setLoadMeterPeriodActions.add(defaultAction);
-
+
m_setLoadMeterPeriodActions.add(new SetLoadMeterPeriodAction(
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.slow.text"), //$NON-NLS-1$
+ MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.actions.SetLoadMeterPeriod.slow.text"), //$NON-NLS-1$
LOAD_METER_TIMER_SLOW));
for (SetLoadMeterPeriodAction act : m_setLoadMeterPeriodActions) {
act.init(this);
@@ -537,7 +534,7 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
defaultAction.setChecked(true);
defaultAction.run();
-
+
// canvas filter actions - they will be dynamically enabled/disabled
// according to canvas selection
m_setFilterAction = new FilterCanvasAction(true);
@@ -547,55 +544,54 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_clearFilterAction = new FilterCanvasAction(false);
m_clearFilterAction.init(this);
m_clearFilterAction.setEnabled(false);
-
+
m_pinToDbgSessionAction = new PinToDebugSessionAction();
m_pinToDbgSessionAction.init(this);
m_pinToDbgSessionAction.setEnabled(false);
-
+
// default: do not show debug actions
- m_showDebugToolbarAction = new ShowDebugToolbarAction(SHOW_DEBUG_ACTIONS_IN_MV_TOOLBAR_DEFAULT,
- m_visualizerInstanceId);
+ m_showDebugToolbarAction = new ShowDebugToolbarAction(SHOW_DEBUG_ACTIONS_IN_MV_TOOLBAR_DEFAULT,
+ m_visualizerInstanceId);
m_showDebugToolbarAction.init(this);
m_showDebugToolbarAction.setEnabled(true);
-
+
// Note: debug view may not be initialized at startup,
// so we'll pretend the actions are not yet updated,
// and reinitialize them later.
m_actionsInitialized = (debugView != null);
}
-
+
/** Updates actions displayed on menu/toolbars. */
- protected void updateActions()
- {
- if (! m_actionsInitialized) return;
+ protected void updateActions() {
+ if (!m_actionsInitialized)
+ return;
boolean enabled = hasSelection();
m_selectAllAction.setEnabled(enabled);
m_refreshAction.setEnabled(enabled);
-
- // enable "filter-to selection" menu item if there is a
+
+ // enable "filter-to selection" menu item if there is a
// canvas selection
m_setFilterAction.setEnabled(m_canvas.hasSelection());
-
+
// enable "Clear filter" menu item if filter is active
m_clearFilterAction.setEnabled(isCanvasFilterActive());
-
- // show the load meter refresh speed sub-menu only
- // if the load meters are enabled
- m_loadMetersRefreshSubSubmenu.setVisible(getLoadMetersEnabled());
-
- // Enable pinning menu item when there is a current debug session
- m_pinToDbgSessionAction.setEnabled(m_sessionState != null);
-
+
+ // show the load meter refresh speed sub-menu only
+ // if the load meters are enabled
+ m_loadMetersRefreshSubSubmenu.setVisible(getLoadMetersEnabled());
+
+ // Enable pinning menu item when there is a current debug session
+ m_pinToDbgSessionAction.setEnabled(m_sessionState != null);
+
// We should not change the enablement of the debug view
// actions, as they are automatically enabled/disabled
// by the platform.
}
/** Updates actions specific to context menu. */
- protected void updateContextMenuActions(Point location)
- {
- }
+ protected void updateContextMenuActions(Point location) {
+ }
/** Cleans up actions. */
protected void disposeActions() {
@@ -607,62 +603,62 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_resumeAction.dispose();
m_resumeAction = null;
}
-
+
if (m_suspendAction != null) {
m_suspendAction.dispose();
m_suspendAction = null;
}
-
+
if (m_terminateAction != null) {
m_terminateAction.dispose();
m_terminateAction = null;
}
-
+
if (m_stepReturnAction != null) {
m_stepReturnAction.dispose();
m_stepReturnAction = null;
}
-
+
if (m_stepOverAction != null) {
m_stepOverAction.dispose();
m_stepOverAction = null;
}
-
+
if (m_stepIntoAction != null) {
m_stepIntoAction.dispose();
m_stepIntoAction = null;
}
-
+
if (m_dropToFrameAction != null) {
m_dropToFrameAction.dispose();
m_dropToFrameAction = null;
}
-
+
if (m_selectAllAction != null) {
m_selectAllAction.dispose();
m_selectAllAction = null;
}
-
+
if (m_refreshAction != null) {
m_refreshAction.dispose();
m_refreshAction = null;
}
-
+
if (m_loadMetersSubMenu != null) {
m_loadMetersSubMenu.dispose();
m_loadMetersSubMenu = null;
}
-
+
if (m_loadMetersRefreshSubSubmenu != null) {
m_loadMetersRefreshSubSubmenu.dispose();
m_loadMetersRefreshSubSubmenu = null;
}
-
- if (m_enableLoadMetersAction != null ) {
+
+ if (m_enableLoadMetersAction != null) {
m_enableLoadMetersAction.dispose();
m_enableLoadMetersAction = null;
}
-
+
if (m_setLoadMeterPeriodActions != null) {
for (SetLoadMeterPeriodAction act : m_setLoadMeterPeriodActions) {
act.dispose();
@@ -670,7 +666,7 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_setLoadMeterPeriodActions.clear();
m_setLoadMeterPeriodActions = null;
}
-
+
if (m_setFilterAction != null) {
m_setFilterAction.dispose();
m_setFilterAction = null;
@@ -680,32 +676,30 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_clearFilterAction.dispose();
m_clearFilterAction = null;
}
-
+
if (m_pinToDbgSessionAction != null) {
m_pinToDbgSessionAction.dispose();
m_pinToDbgSessionAction = null;
}
-
+
if (m_showDebugToolbarAction != null) {
m_showDebugToolbarAction.dispose();
m_showDebugToolbarAction = null;
}
-
+
m_actionsInitialized = false;
}
-
// --- menu/toolbar management ---
/** Invoked when visualizer is selected, to populate the toolbar. */
@Override
- public void populateToolBar(IToolBarManager toolBarManager)
- {
+ public void populateToolBar(IToolBarManager toolBarManager) {
// initialize menu/toolbar actions, if needed
createActions();
// display debug buttons only if MV is not pinned
- // note: if in the future we want to display the debug buttons even
+ // note: if in the future we want to display the debug buttons even
// when pinned, all that needs to be done it to remove this check.
if (!m_pinToDbgSessionAction.isChecked()) {
// only show the debug actions in toolbar, if configured to do so
@@ -723,17 +717,16 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
}
toolBarManager.add(m_pinToDbgSessionAction);
-
+
updateActions();
}
/** Invoked when visualizer is selected, to populate the toolbar's menu. */
@Override
- public void populateMenu(IMenuManager menuManager)
- {
+ public void populateMenu(IMenuManager menuManager) {
// initialize menu/toolbar actions, if needed
createActions();
-
+
menuManager.add(m_showDebugToolbarAction);
// TODO: Anything we want to hide on the toolbar menu?
@@ -742,137 +735,130 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
/** Invoked when visualizer view's context menu is invoked, to populate it. */
@Override
- public void populateContextMenu(IMenuManager menuManager)
- {
+ public void populateContextMenu(IMenuManager menuManager) {
// initialize menu/toolbar actions, if needed
createActions();
menuManager.add(m_resumeAction);
menuManager.add(m_suspendAction);
menuManager.add(m_terminateAction);
-
+
menuManager.add(m_separatorAction);
-
+
menuManager.add(m_stepReturnAction);
menuManager.add(m_stepOverAction);
menuManager.add(m_stepIntoAction);
menuManager.add(m_dropToFrameAction);
menuManager.add(m_separatorAction);
-
+
menuManager.add(m_selectAllAction);
menuManager.add(m_refreshAction);
-
+
menuManager.add(m_separatorAction);
-
+
// add load meters sub-menus and actions
m_loadMetersSubMenu.removeAll();
m_loadMetersRefreshSubSubmenu.removeAll();
-
+
menuManager.add(m_loadMetersSubMenu);
-
- m_loadMetersSubMenu.add(m_enableLoadMetersAction);
+
+ m_loadMetersSubMenu.add(m_enableLoadMetersAction);
m_loadMetersSubMenu.add(m_loadMetersRefreshSubSubmenu);
-
+
for (SetLoadMeterPeriodAction act : m_setLoadMeterPeriodActions) {
m_loadMetersRefreshSubSubmenu.add(act);
}
-
+
// add filtering options
menuManager.add(m_separatorAction);
menuManager.add(m_setFilterAction);
menuManager.add(m_clearFilterAction);
-
+
updateActions();
Point location = m_viewer.getContextMenuLocation();
updateContextMenuActions(location);
}
-
// --- visualizer selection management ---
-
+
/** Invoked when visualizer has been selected. */
@Override
public void visualizerSelected() {
updateActions();
};
-
+
/** Invoked when another visualizer has been selected, hiding this one. */
@Override
public void visualizerDeselected() {
};
-
// --- workbench selection management ---
-
- /**
- * Tests whether if the IVisualizer can display the selection
- * (or something reachable from it).
+
+ /**
+ * Tests whether if the IVisualizer can display the selection
+ * (or something reachable from it).
*/
@Override
- public int handlesSelection(ISelection selection)
- {
+ public int handlesSelection(ISelection selection) {
// By default, we don't support anything.
int result = 0;
-
+
Object sel = SelectionUtils.getSelectedObject(selection);
- if (sel instanceof GdbLaunch ||
- sel instanceof GDBProcess ||
- sel instanceof IDMVMContext)
- {
+ if (sel instanceof GdbLaunch || sel instanceof GDBProcess || sel instanceof IDMVMContext) {
result = 1;
- }
- else {
+ } else {
result = 0;
}
-
+
// While we're here, see if we need to attach debug view listener
updateDebugViewListener();
-
+
return result;
}
-
+
/**
* Adds listener to debug view's viewer, so we can detect
* Debug View updates (which it doesn't bother to properly
* communicate to the rest of the world, sigh).
*/
- protected void updateDebugViewListener()
- {
+ protected void updateDebugViewListener() {
attachDebugViewerListener();
}
-
+
/** Attaches debug viewer listener. */
- protected void attachDebugViewerListener()
- {
+ protected void attachDebugViewerListener() {
// NOTE: debug viewer might not exist yet, so we
// attach the listener at the first opportunity to do so.
if (m_debugViewer == null) {
m_debugViewer = DebugViewUtils.getDebugViewer();
if (m_debugViewer != null) {
- m_modelChangedListener =
- new IModelChangedListener() {
+ m_modelChangedListener = new IModelChangedListener() {
@Override
- public void modelChanged(IModelDelta delta, IModelProxy proxy)
- {
+ public void modelChanged(IModelDelta delta, IModelProxy proxy) {
// Execute a refresh after any pending UI updates.
- GUIUtils.exec( new Runnable() { @Override public void run() {
- // check if we need to update the debug context
- updateDebugContext();
- }});
+ GUIUtils.exec(new Runnable() {
+ @Override
+ public void run() {
+ // check if we need to update the debug context
+ updateDebugContext();
+ }
+ });
}
};
- m_debugViewSelectionChangedListener =
- new ISelectionChangedListener() {
+ m_debugViewSelectionChangedListener = new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Execute a refresh after any pending UI updates.
+ GUIUtils.exec(new Runnable() {
@Override
- public void selectionChanged(SelectionChangedEvent event) {
- // Execute a refresh after any pending UI updates.
- GUIUtils.exec( new Runnable() { @Override public void run() {
- // Update canvas selection to match to dbg view selection
- updateCanvasSelectionFromDebugView();
- }});
+ public void run() {
+ // Update canvas selection to match to dbg view selection
+ updateCanvasSelectionFromDebugView();
}
- };
+ });
+ }
+ };
m_debugViewer.addModelChangedListener(m_modelChangedListener);
m_debugViewer.addSelectionChangedListener(m_debugViewSelectionChangedListener);
}
@@ -880,8 +866,7 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
/** Removes debug viewer listener. */
- protected void removeDebugViewerListener()
- {
+ protected void removeDebugViewerListener() {
if (m_modelChangedListener != null && m_debugViewSelectionChangedListener != null) {
if (m_debugViewer != null) {
m_debugViewer.removeModelChangedListener(m_modelChangedListener);
@@ -892,27 +877,25 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
}
}
-
+
private void removeEventListener() {
if (m_sessionState != null) {
m_sessionState.removeServiceEventListener(fEventListener);
}
}
- /**
- * Invoked by VisualizerViewer when workbench selection changes.
- */
+ /**
+ * Invoked by VisualizerViewer when workbench selection changes.
+ */
@Override
- public void workbenchSelectionChanged(ISelection selection)
- {
+ public void workbenchSelectionChanged(ISelection selection) {
// See if we need to update our debug info from
// the workbench selection. This will be done asynchronously.
boolean changed = updateDebugContext();
if (changed) {
update();
- }
- else {
+ } else {
// Even if debug info doesn't change, we still want to
// check whether the canvas selection needs to change
// to reflect the current workbench selection.
@@ -922,26 +905,23 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
// Also check whether we need to attach debug view listener.
updateDebugViewListener();
}
-
+
/** Refreshes visualizer content from model. */
- public void refresh()
- {
+ public void refresh() {
m_canvas.requestRecache();
m_canvas.requestUpdate();
}
-
-
+
/** Updates the UI elements such as the toolbar and context menu */
public void raiseVisualizerChangedEvent() {
// FIXME: replace hack below by raising a new VisualizerChanged
// event, listened-to by VisualizerViewer, that causes it to raise
// its own VISUALIZER_CHANGED event. See bug 442584 for details
-
- // for now do a non-change to the selection to trigger a call to
+
+ // for now do a non-change to the selection to trigger a call to
// VisualizerView#updateUI()
setSelection(getSelection());
}
-
// --- ISelectionChangedListener implementation ---
@@ -953,37 +933,32 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
@Override
public void selectionChanged(SelectionChangedEvent event) {
super.selectionChanged(event);
-
+
// Force Debug View's selection to reflect visualizer selection,
// since debug view doesn't update itself from the workbench selection.
// NOTE: This can be overridden by the model selection policy, if there is one.
ISelection debugViewSelection = visualizerToDebugViewSelection(getSelection());
DebugViewUtils.setDebugViewSelection(debugViewSelection);
-
+
// update actions to reflect change of selection
updateActions();
}
-
-
+
// --- Selection conversion methods ---
-
+
/** Gets debug view selection from visualizer selection. */
- protected ISelection visualizerToDebugViewSelection(ISelection visualizerSelection)
- {
- MulticoreVisualizerSelectionFinder selectionFinder =
- new MulticoreVisualizerSelectionFinder();
- ISelection workbenchSelection =
- selectionFinder.findSelection(visualizerSelection);
+ protected ISelection visualizerToDebugViewSelection(ISelection visualizerSelection) {
+ MulticoreVisualizerSelectionFinder selectionFinder = new MulticoreVisualizerSelectionFinder();
+ ISelection workbenchSelection = selectionFinder.findSelection(visualizerSelection);
return workbenchSelection;
}
-
+
/** Gets visualizer selection from debug view selection. */
- protected ISelection workbenchToVisualizerSelection(ISelection workbenchSelection)
- {
+ protected ISelection workbenchToVisualizerSelection(ISelection workbenchSelection) {
ISelection visualizerSelection = null;
-
+
List<Object> items = SelectionUtils.getSelectedObjects(workbenchSelection);
-
+
if (m_canvas != null) {
// Use the current canvas model to match Debug View items
// with corresponding threads, if any.
@@ -996,34 +971,32 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
// Currently, we ignore selections other than DSF context objects.
// TODO: any other cases where we could map selections to canvas?
- if (item instanceof IDMVMContext)
- {
+ if (item instanceof IDMVMContext) {
IDMContext context = ((IDMVMContext) item).getDMContext();
- IMIProcessDMContext processContext =
- DMContexts.getAncestorOfType(context, IMIProcessDMContext.class);
+ IMIProcessDMContext processContext = DMContexts.getAncestorOfType(context,
+ IMIProcessDMContext.class);
int pid = Integer.parseInt(processContext.getProcId());
- IMIExecutionDMContext execContext =
- DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
+ IMIExecutionDMContext execContext = DMContexts.getAncestorOfType(context,
+ IMIExecutionDMContext.class);
- int tid = 0;
- if (execContext != null) {
- try {
- tid = Integer.parseInt(execContext.getThreadId());
- } catch (NumberFormatException e) {
- // continue tid=0
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execContext.getThreadId();
- }
- }
+ int tid = 0;
+ if (execContext != null) {
+ try {
+ tid = Integer.parseInt(execContext.getThreadId());
+ } catch (NumberFormatException e) {
+ // continue tid=0
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execContext.getThreadId();
+ }
+ }
if (tid == 0) { // process
List<VisualizerThread> threads = model.getThreadsForProcess(pid);
if (threads != null) {
selected.addAll(threads);
}
- }
- else { // thread
+ } else { // thread
VisualizerThread thread = model.getThread(tid);
// here "tid" is the "GDB thread id", which is not
// unique across sessions, so make sure the thread
@@ -1037,13 +1010,12 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
visualizerSelection = SelectionUtils.toSelection(selected);
}
}
-
+
return visualizerSelection;
}
-
-
+
// --- IPinnable implementation ---
-
+
/**
* Pins the multicore visualizer to the current debug session, preventing
* it from switching to a different session.
@@ -1053,12 +1025,12 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
// No current session - do nothing
if (m_sessionState == null)
return;
-
+
m_currentPinedSessionId = m_sessionState.getSessionID();
-
+
m_showDebugToolbarAction.setEnabled(false);
}
-
+
/**
* Unpins the visualizer.
*/
@@ -1068,45 +1040,42 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
// force visualizer to re-evaluate its current session and
// display the correct one, if needed
workbenchSelectionChanged(null);
-
+
m_showDebugToolbarAction.setEnabled(true);
}
-
+
/** Returns whether the MV is currently pinned to a session */
@Override
public boolean isPinned() {
return m_currentPinedSessionId != null;
}
-
// --- DSF Context Management ---
-
+
/** Updates debug context being displayed by canvas.
* Returns true if canvas context actually changes, false if not.
*/
- public boolean updateDebugContext()
- {
+ public boolean updateDebugContext() {
// is the visualizer pinned? Then inhibit context change
if (isPinned())
return false;
-
+
String sessionId = null;
IAdaptable debugContext = DebugUITools.getDebugContext();
if (debugContext instanceof IDMVMContext) {
- sessionId = ((IDMVMContext)debugContext).getDMContext().getSessionId();
+ sessionId = ((IDMVMContext) debugContext).getDMContext().getSessionId();
} else if (debugContext instanceof GdbLaunch) {
- GdbLaunch gdbLaunch = (GdbLaunch)debugContext;
+ GdbLaunch gdbLaunch = (GdbLaunch) debugContext;
if (gdbLaunch.isTerminated() == false) {
sessionId = gdbLaunch.getSession().getId();
}
} else if (debugContext instanceof GDBProcess) {
- ILaunch launch = ((GDBProcess)debugContext).getLaunch();
- if (launch.isTerminated() == false &&
- launch instanceof GdbLaunch) {
- sessionId = ((GdbLaunch)launch).getSession().getId();
+ ILaunch launch = ((GDBProcess) debugContext).getLaunch();
+ if (launch.isTerminated() == false && launch instanceof GdbLaunch) {
+ sessionId = ((GdbLaunch) launch).getSession().getId();
}
}
-
+
return setDebugSession(sessionId);
}
@@ -1116,34 +1085,29 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
public boolean setDebugSession(String sessionId) {
boolean changed = false;
- if (m_sessionState != null &&
- ! m_sessionState.getSessionID().equals(sessionId))
- {
+ if (m_sessionState != null && !m_sessionState.getSessionID().equals(sessionId)) {
// stop timer that updates the load meters
disposeLoadMeterTimer();
-
+
m_sessionState.removeServiceEventListener(fEventListener);
m_sessionState.dispose();
m_sessionState = null;
changed = true;
}
-
- if (m_sessionState == null &&
- sessionId != null)
- {
+
+ if (m_sessionState == null && sessionId != null) {
m_sessionState = new DSFSessionState(sessionId);
m_sessionState.addServiceEventListener(fEventListener);
// start timer that updates the load meters
initializeLoadMeterTimer();
changed = true;
}
-
+
return changed;
}
-
// --- Update methods ---
-
+
/** Updates visualizer canvas state. */
public void update() {
// Create new VisualizerModel and hand it to canvas,
@@ -1156,84 +1120,88 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
// clear CPU/core cache
m_cpuCoreContextsCache.clear();
-
+
fDataModel = new VisualizerModel(m_sessionState.getSessionID());
getVisualizerModel(fDataModel);
}
-
+
/** Sets canvas model. (Also updates canvas selection.) */
protected void setCanvasModel(VisualizerModel model) {
final VisualizerModel model_f = model;
- GUIUtils.exec(new Runnable() { @Override public void run() {
- if(m_canvas != null) {
- m_canvas.setModel(model_f);
- // Update the canvas's selection from the current workbench selection.
- updateCanvasSelectionInternal();
+ GUIUtils.exec(new Runnable() {
+ @Override
+ public void run() {
+ if (m_canvas != null) {
+ m_canvas.setModel(model_f);
+ // Update the canvas's selection from the current workbench selection.
+ updateCanvasSelectionInternal();
+ }
}
- }});
+ });
}
-
+
/** Updates canvas selection from current workbench selection. */
protected void updateCanvasSelection() {
- GUIUtils.exec(new Runnable() { @Override public void run() {
- // Update the canvas's selection from the current workbench selection.
- updateCanvasSelectionInternal();
- }});
+ GUIUtils.exec(new Runnable() {
+ @Override
+ public void run() {
+ // Update the canvas's selection from the current workbench selection.
+ updateCanvasSelectionInternal();
+ }
+ });
}
-
+
/** Updates canvas selection from current workbench selection.
* Note: this method assumes it is called on the UI thread. */
- protected void updateCanvasSelectionInternal()
- {
+ protected void updateCanvasSelectionInternal() {
updateCanvasSelectionInternal(SelectionUtils.getWorkbenchSelection());
}
-
+
/** Updates canvas selection from current debug view selection.
* Note: this method assumes it is called on the UI thread. */
- protected void updateCanvasSelectionFromDebugView()
- {
+ protected void updateCanvasSelectionFromDebugView() {
updateCanvasSelectionInternal(DebugViewUtils.getDebugViewSelection());
}
-
+
/** Updates canvas selection from current workbench selection.
* Note: this method assumes it is called on the UI thread. */
- protected void updateCanvasSelectionInternal(ISelection selection)
- {
+ protected void updateCanvasSelectionInternal(ISelection selection) {
ISelection canvasSelection = workbenchToVisualizerSelection(selection);
-
+
// canvas does not raise a selection changed event in this case
// to avoid circular selection update events
if (canvasSelection != null)
m_canvas.setSelection(canvasSelection, false);
}
-
-
+
/** Selects all thread(s) displayed in the canvas. */
- public void selectAll()
- {
+ public void selectAll() {
m_canvas.selectAll();
}
-
+
// --- Visualizer model update methods ---
-
- /**
+
+ /**
* Starts visualizer model request.
*/
protected void getVisualizerModel(final VisualizerModel model) {
- m_sessionState.execute(new DsfRunnable() { @Override public void run() {
- // get model asynchronously starting at the top of the hierarchy
- getCPUs(model, new ImmediateRequestMonitor() {
- @Override
- protected void handleCompleted() {
- model.setLoadMetersEnabled(getLoadMetersEnabled());
- updateLoads(model);
- model.sort();
- setCanvasModel(model);
- }
- });
- }});
+ m_sessionState.execute(new DsfRunnable() {
+ @Override
+ public void run() {
+ // get model asynchronously starting at the top of the hierarchy
+ getCPUs(model, new ImmediateRequestMonitor() {
+ @Override
+ protected void handleCompleted() {
+ model.setLoadMetersEnabled(getLoadMetersEnabled());
+ updateLoads(model);
+ model.sort();
+ setCanvasModel(model);
+ }
+ });
+ }
+ });
}
-
+
@ConfinedToDsfExecutor("getSession().getExecutor()")
protected void getCPUs(final VisualizerModel model, final RequestMonitor rm) {
fTargetData.getCPUs(m_sessionState, new ImmediateDataRequestMonitor<ICPUDMContext[]>() {
@@ -1244,27 +1212,26 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
});
}
-
+
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getCores(ICPUDMContext[] cpuContexts, final VisualizerModel model, final RequestMonitor rm)
- {
+ protected void getCores(ICPUDMContext[] cpuContexts, final VisualizerModel model, final RequestMonitor rm) {
if (cpuContexts == null || cpuContexts.length == 0) {
// Whoops, no CPU data.
// We'll fake a CPU and use it to contain any cores we find.
-
+
model.addCPU(new VisualizerCPU(0));
-
+
// Collect core data.
fTargetData.getCores(m_sessionState, new ImmediateDataRequestMonitor<ICoreDMContext[]>() {
@Override
protected void handleCompleted() {
// Get Cores
ICoreDMContext[] coreContexts = isSuccess() ? getData() : null;
-
+
ICPUDMContext cpu = null;
if (coreContexts != null && coreContexts.length > 0) {
- // TODO: This keeps the functionality to the same level before change: 459114,
- // although it's noted that this does not cover the possibility to have multiple CPU's
+ // TODO: This keeps the functionality to the same level before change: 459114,
+ // although it's noted that this does not cover the possibility to have multiple CPU's
// within the list of resolved cores
cpu = DMContexts.getAncestorOfType(coreContexts[0], ICPUDMContext.class);
}
@@ -1276,14 +1243,14 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
} else {
// save CPU contexts
m_cpuCoreContextsCache.addAll(Arrays.asList(cpuContexts));
-
+
final CountingRequestMonitor crm = new ImmediateCountingRequestMonitor(rm);
crm.setDoneCount(cpuContexts.length);
-
+
for (final ICPUDMContext cpuContext : cpuContexts) {
int cpuID = Integer.parseInt(cpuContext.getId());
model.addCPU(new VisualizerCPU(cpuID));
-
+
// Collect core data.
fTargetData.getCores(m_sessionState, cpuContext, new ImmediateDataRequestMonitor<ICoreDMContext[]>() {
@Override
@@ -1295,13 +1262,10 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
}
}
}
-
+
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getThreads(final ICPUDMContext cpuContext,
- ICoreDMContext[] coreContexts,
- final VisualizerModel model,
- RequestMonitor rm)
- {
+ protected void getThreads(final ICPUDMContext cpuContext, ICoreDMContext[] coreContexts,
+ final VisualizerModel model, RequestMonitor rm) {
if (coreContexts == null || coreContexts.length == 0) {
// no cores for this cpu context
// That's fine.
@@ -1309,7 +1273,7 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
} else {
// save core contexts
m_cpuCoreContextsCache.addAll(Arrays.asList(coreContexts));
-
+
int cpuID = Integer.parseInt(cpuContext.getId());
VisualizerCPU cpu = model.getCPU(cpuID);
@@ -1319,26 +1283,23 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
for (final ICoreDMContext coreContext : coreContexts) {
int coreID = Integer.parseInt(coreContext.getId());
cpu.addCore(new VisualizerCore(cpu, coreID));
-
+
// Collect thread data
- fTargetData.getThreads(m_sessionState, cpuContext, coreContext, new ImmediateDataRequestMonitor<IDMContext[]>() {
- @Override
- protected void handleCompleted() {
- IDMContext[] threadContexts = isSuccess() ? getData() : null;
- getThreadData(cpuContext, coreContext, threadContexts, model, crm);
- }
- });
- }
+ fTargetData.getThreads(m_sessionState, cpuContext, coreContext,
+ new ImmediateDataRequestMonitor<IDMContext[]>() {
+ @Override
+ protected void handleCompleted() {
+ IDMContext[] threadContexts = isSuccess() ? getData() : null;
+ getThreadData(cpuContext, coreContext, threadContexts, model, crm);
+ }
+ });
+ }
}
}
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getThreadData(final ICPUDMContext cpuContext,
- final ICoreDMContext coreContext,
- IDMContext[] threadContexts,
- final VisualizerModel model,
- RequestMonitor rm)
- {
+ protected void getThreadData(final ICPUDMContext cpuContext, final ICoreDMContext coreContext,
+ IDMContext[] threadContexts, final VisualizerModel model, RequestMonitor rm) {
if (threadContexts == null || threadContexts.length == 0) {
// no threads for this core
// That's fine.
@@ -1348,114 +1309,104 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
crm.setDoneCount(threadContexts.length);
for (IDMContext threadContext : threadContexts) {
- final IMIExecutionDMContext execContext =
- DMContexts.getAncestorOfType(threadContext, IMIExecutionDMContext.class);
+ final IMIExecutionDMContext execContext = DMContexts.getAncestorOfType(threadContext,
+ IMIExecutionDMContext.class);
// Don't add the thread to the model just yet, let's wait until we have its data and execution state.
// Collect thread data
- fTargetData.getThreadData(m_sessionState, cpuContext, coreContext, execContext, new ImmediateDataRequestMonitor<IThreadDMData>() {
- @Override
- protected void handleCompleted() {
- IThreadDMData threadData = isSuccess() ? getData() : null;
- getThreadExecutionState(cpuContext, coreContext, execContext, threadData, model, crm);
- }
- });
+ fTargetData.getThreadData(m_sessionState, cpuContext, coreContext, execContext,
+ new ImmediateDataRequestMonitor<IThreadDMData>() {
+ @Override
+ protected void handleCompleted() {
+ IThreadDMData threadData = isSuccess() ? getData() : null;
+ getThreadExecutionState(cpuContext, coreContext, execContext, threadData, model, crm);
+ }
+ });
}
}
}
-
+
/** Invoked when getThreads() request completes. */
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getThreadExecutionState(final ICPUDMContext cpuContext,
- final ICoreDMContext coreContext,
- final IMIExecutionDMContext execContext,
- final IThreadDMData threadData,
- final VisualizerModel model,
- final RequestMonitor rm)
- {
+ protected void getThreadExecutionState(final ICPUDMContext cpuContext, final ICoreDMContext coreContext,
+ final IMIExecutionDMContext execContext, final IThreadDMData threadData, final VisualizerModel model,
+ final RequestMonitor rm) {
// Get the execution state
- fTargetData.getThreadExecutionState(m_sessionState, cpuContext, coreContext, execContext,
- threadData, new ImmediateDataRequestMonitor<VisualizerExecutionState>() {
- @Override
- protected void handleCompleted() {
- final VisualizerExecutionState state = isSuccess() ? getData() : null;
- if (state != null && !(state.equals(VisualizerExecutionState.RUNNING)) ) {
- // Get the frame data
- fTargetData.getTopFrameData(m_sessionState, execContext, new ImmediateDataRequestMonitor<IFrameDMData>() {
- @Override
- protected void handleCompleted() {
- IFrameDMData frameData = isSuccess() ? getData() : null;
- getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData,
- frameData, state, model, rm);
+ fTargetData.getThreadExecutionState(m_sessionState, cpuContext, coreContext, execContext, threadData,
+ new ImmediateDataRequestMonitor<VisualizerExecutionState>() {
+ @Override
+ protected void handleCompleted() {
+ final VisualizerExecutionState state = isSuccess() ? getData() : null;
+ if (state != null && !(state.equals(VisualizerExecutionState.RUNNING))) {
+ // Get the frame data
+ fTargetData.getTopFrameData(m_sessionState, execContext,
+ new ImmediateDataRequestMonitor<IFrameDMData>() {
+ @Override
+ protected void handleCompleted() {
+ IFrameDMData frameData = isSuccess() ? getData() : null;
+ getThreadExecutionStateDone(cpuContext, coreContext, execContext,
+ threadData, frameData, state, model, rm);
+ }
+ });
+ } else {
+ // frame data is not valid
+ getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData, null, state,
+ model, rm);
}
- });
- } else {
- // frame data is not valid
- getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData,
- null, state, model, rm);
- }
- }
- });
+ }
+ });
}
-
/** Invoked when getThreadExecutionState() request completes. */
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getThreadExecutionStateDone(ICPUDMContext cpuContext,
- ICoreDMContext coreContext,
- IMIExecutionDMContext execContext,
- IThreadDMData threadData,
- IFrameDMData frame,
- VisualizerExecutionState state,
- VisualizerModel model,
- RequestMonitor rm)
- {
- int cpuID = Integer.parseInt(cpuContext.getId());
- VisualizerCPU cpu = model.getCPU(cpuID);
+ protected void getThreadExecutionStateDone(ICPUDMContext cpuContext, ICoreDMContext coreContext,
+ IMIExecutionDMContext execContext, IThreadDMData threadData, IFrameDMData frame,
+ VisualizerExecutionState state, VisualizerModel model, RequestMonitor rm) {
+ int cpuID = Integer.parseInt(cpuContext.getId());
+ VisualizerCPU cpu = model.getCPU(cpuID);
int coreID = Integer.parseInt(coreContext.getId());
VisualizerCore core = cpu.getCore(coreID);
-
+
if (state == null) {
// Unable to obtain execution state. Assume running
state = VisualizerExecutionState.RUNNING;
}
- IMIProcessDMContext processContext =
- DMContexts.getAncestorOfType(execContext, IMIProcessDMContext.class);
+ IMIProcessDMContext processContext = DMContexts.getAncestorOfType(execContext, IMIProcessDMContext.class);
int pid = Integer.parseInt(processContext.getProcId());
- int tid;
- try {
- tid = Integer.parseInt(execContext.getThreadId());
- } catch (NumberFormatException e) {
- rm.setStatus(new Status(IStatus.ERROR, MulticoreVisualizerUIPlugin.PLUGIN_ID, IStatus.ERROR,
- "Unxepected thread id format:" + execContext.getThreadId(), e)); //$NON-NLS-1$
- rm.done();
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execContext.getThreadId();
- return;
- }
+ int tid;
+ try {
+ tid = Integer.parseInt(execContext.getThreadId());
+ } catch (NumberFormatException e) {
+ rm.setStatus(new Status(IStatus.ERROR, MulticoreVisualizerUIPlugin.PLUGIN_ID, IStatus.ERROR,
+ "Unxepected thread id format:" + execContext.getThreadId(), e)); //$NON-NLS-1$
+ rm.done();
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execContext.getThreadId();
+ return;
+ }
String osTIDValue = threadData.getId();
// If we can't get the real Linux OS tid, fallback to using the gdb thread id
int osTid = (osTIDValue == null) ? tid : Integer.parseInt(osTIDValue);
- // add thread if not already there - there is a potential race condition where a
- // thread can be added twice to the model: once at model creation and once more
+ // add thread if not already there - there is a potential race condition where a
+ // thread can be added twice to the model: once at model creation and once more
// through the listener. Checking at both places to prevent this.
VisualizerThread t = model.getThread(tid);
if (t == null) {
model.addThread(new VisualizerThread(core, pid, osTid, tid, state, frame));
}
- // if the thread is already in the model, update it's parameters.
+ // if the thread is already in the model, update it's parameters.
else {
t.setCore(core);
t.setTID(osTid);
t.setState(state);
t.setLocationInfo(frame);
}
-
+
rm.done();
}
-
+
/** Updates the loads for all cpus and cores */
@ConfinedToDsfExecutor("getSession().getExecutor()")
protected void updateLoads(final VisualizerModel model) {
@@ -1467,7 +1418,7 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
if (!getLoadMetersEnabled()) {
return;
}
-
+
final CountingRequestMonitor crm = new ImmediateCountingRequestMonitor() {
@Override
protected void handleSuccess() {
@@ -1477,13 +1428,13 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
m_canvas.requestUpdate();
}
if (m_updateLoadMeterTimer != null) {
- // re-start timer
+ // re-start timer
m_updateLoadMeterTimer.start();
}
}
};
crm.setDoneCount(m_cpuCoreContextsCache.size());
-
+
// ask load for each CPU and core
for (final IDMContext context : m_cpuCoreContextsCache) {
fTargetData.getLoad(m_sessionState, context, new ImmediateDataRequestMonitor<ILoadInfo>() {
@@ -1495,33 +1446,32 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
});
}
}
-
+
/** Invoked when a getLoad() request completes. */
@ConfinedToDsfExecutor("getSession().getExecutor()")
- protected void getLoadDone(IDMContext context, ILoadInfo load, VisualizerModel model, RequestMonitor rm)
- {
+ protected void getLoadDone(IDMContext context, ILoadInfo load, VisualizerModel model, RequestMonitor rm) {
Integer l = null;
-
+
if (load != null) {
l = Integer.valueOf(load.getLoad());
}
-
- // CPU context? Update the correct CPU in the model
+
+ // CPU context? Update the correct CPU in the model
if (context instanceof ICPUDMContext) {
ICPUDMContext cpuContext = (ICPUDMContext) context;
VisualizerCPU cpu = model.getCPU(Integer.parseInt(cpuContext.getId()));
cpu.setLoadInfo(new VisualizerLoadInfo(l));
}
// Core context? Update the correct core in the model
- else if(context instanceof ICoreDMContext) {
+ else if (context instanceof ICoreDMContext) {
ICoreDMContext coreContext = (ICoreDMContext) context;
VisualizerCore core = model.getCore(Integer.parseInt(coreContext.getId()));
core.setLoadInfo(new VisualizerLoadInfo(l));
}
-
+
rm.done();
}
-
+
private Timer getLoadTimer(final DSFSessionState sessionState, final int timeout) {
Timer t = new Timer(timeout) {
@Override
@@ -1546,4 +1496,3 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
return t;
}
}
-
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCPU.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCPU.java
index a8b9494359..d90a5cd9be 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCPU.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCPU.java
@@ -27,38 +27,35 @@ import org.eclipse.swt.graphics.GC;
/**
* Graphic object for MulticoreVisualizer.
*/
-public class MulticoreVisualizerCPU extends MulticoreVisualizerGraphicObject
-{
+public class MulticoreVisualizerCPU extends MulticoreVisualizerGraphicObject {
// --- members ---
-
+
/** CPU ID. */
protected int m_id;
-
+
/** Child cores. */
protected ArrayList<MulticoreVisualizerCore> m_cores;
-
+
/** Load meter associated to this CPU */
protected MulticoreVisualizerLoadMeter m_loadMeter;
-
+
/** Background color used to draw cpu */
protected static final Color BG_COLOR = IMulticoreVisualizerConstants.COLOR_CPU_BG;
-
+
/** Foreground coloe used to draw cpu */
protected static final Color FG_COLOR = IMulticoreVisualizerConstants.COLOR_CPU_FG;
-
// --- constructors/destructors ---
-
+
/** Constructor */
- public MulticoreVisualizerCPU(int id)
- {
+ public MulticoreVisualizerCPU(int id) {
m_id = id;
m_cores = new ArrayList<MulticoreVisualizerCore>();
-
+
// default load meter
m_loadMeter = new MulticoreVisualizerLoadMeter(null, null);
}
-
+
/** Dispose method */
@Override
public void dispose() {
@@ -67,85 +64,78 @@ public class MulticoreVisualizerCPU extends MulticoreVisualizerGraphicObject
m_loadMeter.dispose();
}
}
-
-
+
// --- accessors ---
-
+
/** Gets CPU ID. */
public int getID() {
return m_id;
}
-
// --- methods ---
-
+
/** Adds child core. */
- public void addCore(MulticoreVisualizerCore core)
- {
+ public void addCore(MulticoreVisualizerCore core) {
m_cores.add(core);
}
-
+
/** Removes child core. */
- public void removeCore(MulticoreVisualizerCore core)
- {
+ public void removeCore(MulticoreVisualizerCore core) {
m_cores.remove(core);
}
-
+
/** Gets list of child cores. */
- public List<MulticoreVisualizerCore> getCores()
- {
+ public List<MulticoreVisualizerCore> getCores() {
return m_cores;
}
/** Sets the load meter associated to this CPU */
- public void setLoadMeter (MulticoreVisualizerLoadMeter meter) {
+ public void setLoadMeter(MulticoreVisualizerLoadMeter meter) {
m_loadMeter = meter;
}
-
+
/** Gets the load meter associated to this CPU */
public MulticoreVisualizerLoadMeter getLoadMeter() {
return m_loadMeter;
}
-
+
// --- paint methods ---
-
+
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
public void paintContent(GC gc) {
gc.setBackground(BG_COLOR);
-
+
// We want the load meter to share the same BG color
m_loadMeter.setParentBgColor(BG_COLOR);
-
+
// highlight in a different color if selected
- if (m_selected)
- {
+ if (m_selected) {
gc.setForeground(IMulticoreVisualizerConstants.COLOR_SELECTED);
- }
- else {
+ } else {
gc.setForeground(FG_COLOR);
}
gc.fillRectangle(m_bounds);
gc.drawRectangle(m_bounds);
}
-
+
/** Returns true if object has decorations to paint. */
@Override
public boolean hasDecorations() {
return true;
}
-
+
/** Invoked to allow element to paint decorations on top of anything drawn on it */
@Override
public void paintDecorations(GC gc) {
if (m_bounds.height > 20) {
gc.setForeground(IMulticoreVisualizerConstants.COLOR_CPU_FG);
gc.setBackground(IMulticoreVisualizerConstants.COLOR_CPU_BG);
-
+
int text_indent_x = 2;
int text_indent_y = 0;
- int tx = m_bounds.x + m_bounds.width - text_indent_x;
+ int tx = m_bounds.x + m_bounds.width - text_indent_x;
int ty = m_bounds.y + m_bounds.height - text_indent_y;
GUIUtils.drawTextAligned(gc, Integer.toString(m_id), m_bounds, tx, ty, false, false);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvas.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvas.java
index 2428419235..367d001c54 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvas.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvas.java
@@ -10,7 +10,7 @@
*
* Contributors:
* William R. Swanson (Tilera Corporation) - initial API and implementation
- * Marc Dumais (Ericsson) - Bug 396076
+ * Marc Dumais (Ericsson) - Bug 396076
* Marc Dumais (Ericsson) - Bug 396184
* Marc Dumais (Ericsson) - Bug 396200
* Marc Dumais (Ericsson) - Bug 396293
@@ -54,74 +54,68 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
-
/**
* MulticoreVisualizer's display canvas.
*/
-public class MulticoreVisualizerCanvas extends GraphicCanvas
- implements ISelectionProvider
-{
+public class MulticoreVisualizerCanvas extends GraphicCanvas implements ISelectionProvider {
// --- constants ---
/** Canvas update interval in milliseconds. */
protected static final int CANVAS_UPDATE_INTERVAL = 100;
-
+
/** Spacing to allow between threads, when many are displayed on same tile. */
protected static final int THREAD_SPACING = 8;
-
+
protected static final int SELECTION_SLOP = 20;
-
// --- members ---
-
+
/** Update timer */
protected Timer m_updateTimer = null;
-
+
/** Whether we need to recache graphic objects. */
protected boolean m_recache = true;
-
+
/** Whether we need to recache objects that depend on target state */
protected boolean m_recacheState = true;
-
+
/** Whether view size has changed, requiring us to recalculate object sizes */
protected boolean m_recacheSizes = true;
-
+
/** Whether the load information has changed and we need to update the load meters */
protected boolean m_recacheLoadMeters = true;
-
+
/** Whether we need to repaint the canvas */
protected boolean m_update = true;
-
// --- UI members ---
-
+
/** Text font */
protected Font m_textFont = null;
-
+
/** Externally visible selection manager. */
protected SelectionManager m_selectionManager;
- /** Mouse-drag marquee graphic element */
- protected MulticoreVisualizerMarquee m_marquee = null;
-
- /** Last mouse down/up point, for shift-click selections. */
- protected Point m_lastSelectionClick = new Point(0,0);
-
+ /** Mouse-drag marquee graphic element */
+ protected MulticoreVisualizerMarquee m_marquee = null;
+
+ /** Last mouse down/up point, for shift-click selections. */
+ protected Point m_lastSelectionClick = new Point(0, 0);
+
/** Mouse click/drag monitor */
- protected MouseMonitor m_mouseMonitor = null;
-
+ protected MouseMonitor m_mouseMonitor = null;
// --- cached repaint state ---
-
+
/** Current visualizer model we're displaying. */
protected VisualizerModel m_model = null;
-
+
/** Number of CPUs to display. */
protected int m_cpu_count = 15;
-
+
/** Number of Cores per CPU to display. */
protected int m_cores_per_cpu = 3;
-
+
/** List of CPUs we're displaying. */
protected ArrayList<MulticoreVisualizerCPU> m_cpus = null;
/** Mapping from model to view objects. */
@@ -131,29 +125,29 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
protected ArrayList<MulticoreVisualizerCore> m_cores = null;
/** Mapping from model to view objects. */
protected Hashtable<VisualizerCore, MulticoreVisualizerCore> m_coreMap = null;
-
+
/** Graphic objects representing threads */
protected ArrayList<MulticoreVisualizerThread> m_threads = null;
/** Mapping from model to view objects. */
protected Hashtable<VisualizerThread, MulticoreVisualizerThread> m_threadMap = null;
-
+
/** Selected PIDs. */
protected HashSet<Integer> m_selectedPIDs = null;
-
+
/** Canvas filter manager */
protected MulticoreVisualizerCanvasFilterManager m_canvasFilterManager = null;
-
+
/** Canvas status bar */
protected MulticoreVisualizerStatusBar m_statusBar = null;
// --- constructors/destructors ---
-
+
/** Constructor. */
public MulticoreVisualizerCanvas(Composite parent) {
super(parent);
initMulticoreVisualizerCanvas(parent);
}
-
+
/** Dispose method. */
@Override
public void dispose() {
@@ -161,29 +155,28 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
super.dispose();
}
-
// --- init methods ---
-
+
/** Initializes control */
protected void initMulticoreVisualizerCanvas(Composite parent) {
// perform any initialization here
-
+
// text font
m_textFont = CDTVisualizerUIPlugin.getResources().getFont("Luxi Sans", 6); //$NON-NLS-1$
setFont(m_textFont);
-
+
// initialize cached state storage
- m_cpus = new ArrayList<MulticoreVisualizerCPU>();
- m_cpuMap = new Hashtable<VisualizerCPU, MulticoreVisualizerCPU>();
-
- m_cores = new ArrayList<MulticoreVisualizerCore>();
- m_coreMap = new Hashtable<VisualizerCore, MulticoreVisualizerCore>();
-
- m_threads = new ArrayList<MulticoreVisualizerThread>();
- m_threadMap = new Hashtable<VisualizerThread, MulticoreVisualizerThread>();
-
+ m_cpus = new ArrayList<MulticoreVisualizerCPU>();
+ m_cpuMap = new Hashtable<VisualizerCPU, MulticoreVisualizerCPU>();
+
+ m_cores = new ArrayList<MulticoreVisualizerCore>();
+ m_coreMap = new Hashtable<VisualizerCore, MulticoreVisualizerCore>();
+
+ m_threads = new ArrayList<MulticoreVisualizerThread>();
+ m_threadMap = new Hashtable<VisualizerThread, MulticoreVisualizerThread>();
+
m_selectedPIDs = new HashSet<Integer>();
-
+
// mouse-drag monitor
m_mouseMonitor = new MouseMonitor(this) {
/** Invoked for a selection click at the specified point. */
@@ -202,7 +195,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
@Override
public void mouseDown(int button, int x, int y, int keys) {
if (button == RIGHT_BUTTON) {
- if (! hasSelection()) {
+ if (!hasSelection()) {
// If there isn't a selection currently, try to
// select item(s) under the mouse before popping up the context menu.
MulticoreVisualizerCanvas.this.select(x, y, keys);
@@ -218,13 +211,13 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
};
-
+
// selection marquee
m_marquee = new MulticoreVisualizerMarquee();
// selection manager
m_selectionManager = new SelectionManager(this, "MulticoreVisualizerCanvas selection manager"); //$NON-NLS-1$
-
+
// add update timer
m_updateTimer = new Timer(CANVAS_UPDATE_INTERVAL) {
@Override
@@ -234,104 +227,99 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
};
m_updateTimer.setRepeating(false); // one-shot timer
m_updateTimer.start();
-
+
// filter manager
m_canvasFilterManager = new MulticoreVisualizerCanvasFilterManager(this);
-
+
// status bar
m_statusBar = new MulticoreVisualizerStatusBar();
}
-
+
/** Cleans up control */
protected void cleanupMulticoreVisualizerCanvas() {
if (m_updateTimer != null) {
m_updateTimer.dispose();
m_updateTimer = null;
}
- if (m_marquee != null) {
- m_marquee.dispose();
- m_marquee = null;
- }
- if (m_mouseMonitor != null) {
- m_mouseMonitor.dispose();
- m_mouseMonitor = null;
- }
- if (m_selectionManager != null) {
- m_selectionManager.dispose();
- m_selectionManager = null;
- }
- if (m_cpus != null) {
- m_cpus.clear();
- m_cpus = null;
- }
- if (m_cpuMap != null) {
- m_cpuMap.clear();
- m_cpuMap = null;
- }
- if (m_cores != null) {
- m_cores.clear();
- m_cores = null;
- }
- if (m_coreMap != null) {
- m_coreMap.clear();
- m_coreMap = null;
- }
- if (m_threads != null) {
- m_threads.clear();
- m_threads = null;
- }
- if (m_threadMap != null) {
- m_threadMap.clear();
- m_threadMap = null;
- }
- if (m_selectedPIDs != null) {
- m_selectedPIDs.clear();
- m_selectedPIDs = null;
- }
- if (m_canvasFilterManager != null) {
- m_canvasFilterManager.dispose();
- m_canvasFilterManager = null;
- }
- if (m_statusBar != null) {
- m_statusBar.dispose();
- m_statusBar = null;
- }
+ if (m_marquee != null) {
+ m_marquee.dispose();
+ m_marquee = null;
+ }
+ if (m_mouseMonitor != null) {
+ m_mouseMonitor.dispose();
+ m_mouseMonitor = null;
+ }
+ if (m_selectionManager != null) {
+ m_selectionManager.dispose();
+ m_selectionManager = null;
+ }
+ if (m_cpus != null) {
+ m_cpus.clear();
+ m_cpus = null;
+ }
+ if (m_cpuMap != null) {
+ m_cpuMap.clear();
+ m_cpuMap = null;
+ }
+ if (m_cores != null) {
+ m_cores.clear();
+ m_cores = null;
+ }
+ if (m_coreMap != null) {
+ m_coreMap.clear();
+ m_coreMap = null;
+ }
+ if (m_threads != null) {
+ m_threads.clear();
+ m_threads = null;
+ }
+ if (m_threadMap != null) {
+ m_threadMap.clear();
+ m_threadMap = null;
+ }
+ if (m_selectedPIDs != null) {
+ m_selectedPIDs.clear();
+ m_selectedPIDs = null;
+ }
+ if (m_canvasFilterManager != null) {
+ m_canvasFilterManager.dispose();
+ m_canvasFilterManager = null;
+ }
+ if (m_statusBar != null) {
+ m_statusBar.dispose();
+ m_statusBar = null;
+ }
}
-
// --- accessors ---
-
+
/** Gets currently displayed model. */
- public VisualizerModel getModel()
- {
+ public VisualizerModel getModel() {
return m_model;
}
-
+
/** Sets model to display, and requests canvas update. */
- public void setModel(VisualizerModel model)
- {
+ public void setModel(VisualizerModel model) {
m_model = model;
-
+
// Set filter associated to new model
if (m_model != null) {
m_canvasFilterManager.setCurrentFilter(m_model.getSessionId());
- }
- else {
+ } else {
m_canvasFilterManager.setCurrentFilter(null);
}
-
+
requestRecache();
requestUpdate();
}
-
+
/** Requests that next paint call should update the load meters */
public void refreshLoadMeters() {
requestRecache(false, false, true);
}
-
-
+
// --- resize methods ---
-
+
/** Invoked when control is resized. */
@Override
public void resized(Rectangle bounds) {
@@ -339,25 +327,26 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
// note: resize itself will trigger an update, so we don't have to request one
}
-
// --- update methods ---
-
+
/**
* Requests an update on next timer tick.
* NOTE: use this method instead of normal update(),
* multiple update requests on same tick are batched.
*/
public void requestUpdate() {
- GUIUtils.exec(new Runnable() { @Override public void run() {
- if (m_updateTimer != null) {
- m_updateTimer.start();
+ GUIUtils.exec(new Runnable() {
+ @Override
+ public void run() {
+ if (m_updateTimer != null) {
+ m_updateTimer.start();
+ }
}
- }});
+ });
}
-
// --- paint methods ---
-
+
/** Requests that next paint call should recache state and/or size information */
// synchronized so we don't change recache flags while doing a recache
public synchronized void requestRecache() {
@@ -369,7 +358,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
public synchronized void requestRecache(boolean state, boolean sizes) {
requestRecache(state, sizes, true);
}
-
+
/**
* Requests that the next paint call should recache state and/or size and/or load information
*/
@@ -385,11 +374,11 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
// re-compute filter to reflect latest model changes
m_canvasFilterManager.updateCurrentFilter();
}
-
- /**
+
+ /**
* Fits n square items into a rectangle of the specified size.
* Returns largest edge of one of the square items that allows
- * them all to pack neatly in rows/columns in the specified area.
+ * them all to pack neatly in rows/columns in the specified area.
*/
public int fitSquareItems(int nitems, int width, int height) {
int max_edge = 0;
@@ -399,40 +388,44 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
int w = width / items_per_row;
int h = height / rows;
int edge = (w < h) ? w : h;
- if (edge * rows > height || edge * items_per_row > width) continue;
- if (edge > max_edge) max_edge = edge;
+ if (edge * rows > height || edge * items_per_row > width)
+ continue;
+ if (edge > max_edge)
+ max_edge = edge;
}
- }
- else {
+ } else {
for (int items_per_col = nitems; items_per_col > 0; --items_per_col) {
int cols = (int) Math.ceil(1.0 * nitems / items_per_col);
int w = width / cols;
int h = height / items_per_col;
int edge = (w < h) ? w : h;
- if (edge * cols > width || edge * items_per_col > height) continue;
- if (edge > max_edge) max_edge = edge;
+ if (edge * cols > width || edge * items_per_col > height)
+ continue;
+ if (edge > max_edge)
+ max_edge = edge;
}
}
return max_edge;
}
-
+
/**
* Allows overriding classes to change this behavior.
*/
protected boolean getCPULoadEnabled() {
return m_model == null ? false : m_model.getLoadMetersEnabled();
}
-
+
/** Recache persistent objects (tiles, etc.) for new monitor */
// synchronized so we don't change recache flags while doing a recache
public synchronized void recache() {
- if (! m_recache) return; // nothing to do, free the lock quickly
+ if (!m_recache)
+ return; // nothing to do, free the lock quickly
if (m_recacheState) {
// clear all grid view objects
clear();
-
+
// clear cached state
m_cpus.clear();
m_cores.clear();
@@ -440,17 +433,17 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
m_cpuMap.clear();
m_coreMap.clear();
m_threadMap.clear();
-
+
if (m_model != null) {
for (VisualizerCPU cpu : m_model.getCPUs()) {
- // current filter permits displaying this CPU?
+ // current filter permits displaying this CPU?
if (m_canvasFilterManager.displayObject(cpu)) {
MulticoreVisualizerCPU mcpu = new MulticoreVisualizerCPU(cpu.getID());
m_cpus.add(mcpu);
m_cpuMap.put(cpu, mcpu);
for (VisualizerCore core : cpu.getCores()) {
// current filter permits displaying this core?
- if(m_canvasFilterManager.displayObject(core)) {
+ if (m_canvasFilterManager.displayObject(core)) {
MulticoreVisualizerCore mcore = new MulticoreVisualizerCore(mcpu, core.getID());
m_cores.add(mcore);
m_coreMap.put(core, mcore);
@@ -459,13 +452,13 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
+
// we've recached state, which implies recacheing sizes and load meters
m_recacheState = false;
m_recacheLoadMeters = true;
m_recacheSizes = true;
}
-
+
if (m_recacheLoadMeters) {
// refresh the visualizer CPU and core load meters
if (m_model != null) {
@@ -475,7 +468,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
MulticoreVisualizerCPU visualizerCpu = m_cpuMap.get(modelCpu);
// when filtering is active, not all objects might be in the map
if (visualizerCpu != null) {
- // update CPUs load meter
+ // update CPUs load meter
MulticoreVisualizerLoadMeter meter = visualizerCpu.getLoadMeter();
meter.setEnabled(getCPULoadEnabled());
meter.setLoad(modelCpu.getLoad());
@@ -495,63 +488,60 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
+
m_recacheSizes = true;
m_recacheLoadMeters = false;
}
if (m_recacheSizes) {
// avoid doing resize calculations if the model is not ready
- if (m_model == null ) {
+ if (m_model == null) {
m_recacheSizes = false;
return;
}
// update cached size information
-
+
// General margin/spacing constants.
- int cpu_margin = 8; // margin around edges of CPU grid
- int cpu_separation = 6; // spacing between CPUS
+ int cpu_margin = 8; // margin around edges of CPU grid
+ int cpu_separation = 6; // spacing between CPUS
int statusBarHeight;
// reserve space for status bar only if filter is active
if (isFilterActive()) {
- statusBarHeight = 20;
- }
- else {
- statusBarHeight = 0;
+ statusBarHeight = 20;
+ } else {
+ statusBarHeight = 0;
}
-
+
// make room when load meters are present, else use a more compact layout
- int core_margin = getCPULoadEnabled() ? 20 : 12; // margin around cores in a CPU
- int core_separation = 4; // spacing between cores
+ int core_margin = getCPULoadEnabled() ? 20 : 12; // margin around cores in a CPU
+ int core_separation = 4; // spacing between cores
- int loadMeterWidth = core_margin*3/5;
- int loadMeterHMargin = core_margin/5;
+ int loadMeterWidth = core_margin * 3 / 5;
+ int loadMeterHMargin = core_margin / 5;
int loadMeterHCoreMargin = loadMeterHMargin + 5;
-
+
// Get overall area we have for laying out content.
Rectangle bounds = getClientArea();
GUIUtils.inset(bounds, cpu_margin);
// Figure out area to allocate to each CPU box.
- int ncpus = m_cpus.size();
- int width = bounds.width + cpu_separation;
+ int ncpus = m_cpus.size();
+ int width = bounds.width + cpu_separation;
int height = bounds.height + cpu_separation - statusBarHeight;
-
+
// put status bar at the bottom of the canvas area
- m_statusBar.setBounds(cpu_margin,
- bounds.y + bounds.height - 2 * cpu_margin,
- width ,
- statusBarHeight);
-
+ m_statusBar.setBounds(cpu_margin, bounds.y + bounds.height - 2 * cpu_margin, width, statusBarHeight);
+
int cpu_edge = fitSquareItems(ncpus, width, height);
int cpu_size = cpu_edge - cpu_separation;
- if (cpu_size < 0) cpu_size = 0;
-
+ if (cpu_size < 0)
+ cpu_size = 0;
+
// Calculate area on each CPU for placing cores.
int ncores = 0;
// find the greatest number of cores on a given CPU and use
// that number for size calculations for all CPUs - this way
- // we avoid displaying cores of varying sizes, in different
+ // we avoid displaying cores of varying sizes, in different
// CPUs.
for (MulticoreVisualizerCPU cpu : m_cpus) {
int n = cpu.getCores().size();
@@ -559,33 +549,27 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
ncores = n;
}
}
- int cpu_width = cpu_size - core_margin * 2 + core_separation;
+ int cpu_width = cpu_size - core_margin * 2 + core_separation;
int cpu_height = cpu_size - core_margin * 2 + core_separation;
- int core_edge = fitSquareItems(ncores, cpu_width, cpu_height);
- int core_size = core_edge - core_separation;
- if (core_size < 0) core_size = 0;
-
+ int core_edge = fitSquareItems(ncores, cpu_width, cpu_height);
+ int core_size = core_edge - core_separation;
+ if (core_size < 0)
+ core_size = 0;
+
int x = bounds.x, y = bounds.y;
for (MulticoreVisualizerCPU cpu : m_cpus) {
- cpu.setBounds(x, y, cpu_size-1, cpu_size-1);
+ cpu.setBounds(x, y, cpu_size - 1, cpu_size - 1);
// put cpu meter in the right margin of the CPU
- cpu.getLoadMeter().setBounds(x + cpu_size - 2*cpu_margin,
- y + 2*core_margin,
- loadMeterWidth,
- cpu_size-3*core_margin);
-
+ cpu.getLoadMeter().setBounds(x + cpu_size - 2 * cpu_margin, y + 2 * core_margin, loadMeterWidth,
+ cpu_size - 3 * core_margin);
+
int left = x + core_margin;
int cx = left, cy = y + core_margin;
- for (MulticoreVisualizerCore core : cpu.getCores())
- {
+ for (MulticoreVisualizerCore core : cpu.getCores()) {
core.setBounds(cx, cy, core_size, core_size);
-
- core.getLoadMeter().setBounds(
- cx + core_size - loadMeterHCoreMargin - loadMeterWidth,
- cy + core_size * 1 / 3,
- loadMeterWidth,
- core_size * 2 / 3 - loadMeterHCoreMargin
- );
+
+ core.getLoadMeter().setBounds(cx + core_size - loadMeterHCoreMargin - loadMeterWidth,
+ cy + core_size * 1 / 3, loadMeterWidth, core_size * 2 / 3 - loadMeterHCoreMargin);
cx += core_size + core_separation;
if (cx + core_size + core_margin > x + cpu_size) {
@@ -593,7 +577,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
cy += core_size + core_separation;
}
}
-
+
x += cpu_size + cpu_separation;
if (x + cpu_size > bounds.x + width) {
x = bounds.x;
@@ -605,7 +589,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
m_recache = false;
}
-
+
/** Invoked when canvas repaint event is raised.
* Default implementation clears canvas to background color.
*/
@@ -614,12 +598,12 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
// NOTE: We have a little setup to do first,
// so we delay clearing/redrawing the canvas until needed,
// to minimize any potential visual flickering.
-
+
// recache/resize tiles & shims if needed
recache();
// do any "per frame" updating/replacement of graphic objects
-
+
// recalculate process/thread graphic objects on the fly
// TODO: can we cache/pool these and just move them around?
for (MulticoreVisualizerCore core : m_cores) {
@@ -627,23 +611,22 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
m_threads.clear();
m_threadMap.clear();
-
+
// update based on current processes/threads
if (m_model != null) {
-
+
// NOTE: we assume that we've already created and sized the graphic
// objects for cpus/cores in recache() above,
// so we can use these to determine the size/location of more dynamic elements
// like processes and threads
-
+
for (VisualizerThread thread : m_model.getThreads()) {
- // current filter permits displaying this thread?
- if(m_canvasFilterManager.displayObject(thread)) {
+ // current filter permits displaying this thread?
+ if (m_canvasFilterManager.displayObject(thread)) {
VisualizerCore core = thread.getCore();
MulticoreVisualizerCore mcore = m_coreMap.get(core);
if (mcore != null) {
- MulticoreVisualizerThread mthread =
- new MulticoreVisualizerThread(mcore, thread);
+ MulticoreVisualizerThread mthread = new MulticoreVisualizerThread(mcore, thread);
mcore.addThread(mthread);
m_threads.add(mthread);
m_threadMap.put(thread, mthread);
@@ -654,7 +637,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
// now set sizes of processes/threads for each tile
for (MulticoreVisualizerCore core : m_cores) {
Rectangle bounds = core.getBounds();
-
+
// how we lay out threads depends on how many there are
List<MulticoreVisualizerThread> threads = core.getThreads();
int threadspotsize = MulticoreVisualizerThread.THREAD_SPOT_SIZE;
@@ -664,14 +647,16 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
int tx = bounds.x + 2;
int ty = bounds.y + 2;
int dty = (count < 1) ? 0 : tileheight / count;
- if (dty > threadheight) dty = threadheight;
+ if (dty > threadheight)
+ dty = threadheight;
if (count > 0 && dty * count <= tileheight) {
ty = bounds.y + 2 + (tileheight - (dty * count)) / 2;
- if (ty < bounds.y + 2) ty = bounds.y + 2;
- }
- else if (count > 0) {
+ if (ty < bounds.y + 2)
+ ty = bounds.y + 2;
+ } else if (count > 0) {
dty = tileheight / count;
- if (dty > threadheight) dty = threadheight;
+ if (dty > threadheight)
+ dty = threadheight;
}
int t = 0;
for (MulticoreVisualizerThread threadobj : threads) {
@@ -680,7 +665,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
+
// restore canvas object highlighting from model object selection
restoreSelection();
@@ -695,13 +680,13 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
for (MulticoreVisualizerThread mthread : m_threads) {
mthread.setProcessSelected(m_selectedPIDs.contains(mthread.getPID()));
}
-
+
// NOW we can clear the background
clearCanvas(gc);
// Make sure color/font resources are properly initialized.
MulticoreVisualizerUIPlugin.getResources();
-
+
// paint cpus
for (MulticoreVisualizerCPU cpu : m_cpus) {
cpu.paintContent(gc);
@@ -715,7 +700,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
core.getLoadMeter().paintContent(gc);
core.getLoadMeter().paintDecorations(gc);
}
-
+
// paint cpus IDs on top of cores
for (MulticoreVisualizerCPU cpu : m_cpus) {
cpu.paintDecorations(gc);
@@ -725,23 +710,21 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
for (MulticoreVisualizerThread thread : m_threads) {
thread.paintContent(gc);
}
-
+
// paint status bar
if (m_canvasFilterManager.isCurrentFilterActive()) {
m_statusBar.setMessage(m_canvasFilterManager.getCurrentFilter().toString());
m_statusBar.paintContent(gc);
}
-
+
// paint drag-selection marquee last, so it's on top.
m_marquee.paintContent(gc);
}
-
-
+
// --- mouse event handlers ---
/** Invoked when mouse is dragged. */
- public void drag(int x, int y, int keys, int dragState)
- {
+ public void drag(int x, int y, int keys, int dragState) {
Rectangle region = m_mouseMonitor.getDragRegion();
switch (dragState) {
case MouseMonitor.MOUSE_DRAG_BEGIN:
@@ -760,47 +743,43 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
boolean addToSelection = MouseMonitor.isShiftDown(keys);
boolean toggleSelection = MouseMonitor.isControlDown(keys);
-
+
selectRegion(m_marquee.getBounds(), addToSelection, toggleSelection);
// remember last mouse-up point for shift-click selection
m_lastSelectionClick.x = x;
m_lastSelectionClick.y = y;
-
+
update();
break;
}
}
/** Invoked for a selection click at the specified point. */
- public void select(int x, int y, int keys)
- {
+ public void select(int x, int y, int keys) {
boolean addToSelection = MouseMonitor.isShiftDown(keys);
boolean toggleSelection = MouseMonitor.isControlDown(keys);
-
- selectPoint(x,y, addToSelection, toggleSelection);
+
+ selectPoint(x, y, addToSelection, toggleSelection);
}
-
// --- selection methods ---
/**
* Selects item(s), if any, in specified region
- *
+ *
* If addToSelection is true, appends item(s) to current selection
* without changing selection state of other items.
- *
+ *
* If toggleSelection is true, toggles selection of item(s)
* without changing selection state of other items.
- *
+ *
* If both are true, deselects item(s)
* without changing selection state of other items.
- *
+ *
* Otherwise, selects item(s) and deselects other items.
*/
- public void selectRegion(Rectangle region,
- boolean addToSelection, boolean toggleSelection)
- {
+ public void selectRegion(Rectangle region, boolean addToSelection, boolean toggleSelection) {
boolean changed = false;
List<MulticoreVisualizerGraphicObject> selectableObjects = getSelectableObjects();
@@ -813,20 +792,17 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
gobj.setSelected(false);
changed = true;
}
- }
- else if (addToSelection) {
+ } else if (addToSelection) {
if (within) {
gobj.setSelected(true);
changed = true;
}
- }
- else if (toggleSelection) {
+ } else if (toggleSelection) {
if (within) {
- gobj.setSelected(! gobj.isSelected());
+ gobj.setSelected(!gobj.isSelected());
changed = true;
}
- }
- else {
+ } else {
gobj.setSelected(within);
changed = true;
}
@@ -835,37 +811,35 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
if (changed)
selectionChanged();
}
-
+
/**
* Selects item(s), if any, at specified point.
- *
+ *
* If addToSelection is true, appends item(s) to current selection
* without changing selection state of other items.
- *
+ *
* If toggleSelection is true, toggles selection of item(s)
* without changing selection state of other items.
- *
+ *
* If both are true, deselects item(s)
* without changing selection state of other items.
- *
+ *
* Otherwise, selects item(s) and deselects other items.
*/
- public void selectPoint(int x, int y,
- boolean addToSelection, boolean toggleSelection)
- {
+ public void selectPoint(int x, int y, boolean addToSelection, boolean toggleSelection) {
List<MulticoreVisualizerGraphicObject> selectedObjects = new ArrayList<MulticoreVisualizerGraphicObject>();
List<MulticoreVisualizerGraphicObject> selectableObjects = getSelectableObjects();
- // the list of selectable objects is ordered to have contained objects
- // before container objects, so the first match we find is the specific
+ // the list of selectable objects is ordered to have contained objects
+ // before container objects, so the first match we find is the specific
// one we want.
for (MulticoreVisualizerGraphicObject gobj : selectableObjects) {
- if (gobj.contains(x,y)) {
+ if (gobj.contains(x, y)) {
selectedObjects.add(gobj);
break;
}
}
-
+
// else we assume it landed outside any CPU; de-select everything
if (selectedObjects.isEmpty()) {
clearSelection();
@@ -877,10 +851,9 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
// overlap the edge of this region)
if (addToSelection) {
int slop = SELECTION_SLOP;
- Rectangle r1 = new Rectangle(m_lastSelectionClick.x - slop/2,
- m_lastSelectionClick.y - slop/2,
- slop, slop);
- Rectangle r2 = new Rectangle(x - slop/2, y - slop/2, slop, slop);
+ Rectangle r1 = new Rectangle(m_lastSelectionClick.x - slop / 2, m_lastSelectionClick.y - slop / 2, slop,
+ slop);
+ Rectangle r2 = new Rectangle(x - slop / 2, y - slop / 2, slop, slop);
Rectangle region = r1.union(r2);
for (MulticoreVisualizerGraphicObject gobj : selectableObjects) {
@@ -900,20 +873,17 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
gobj.setSelected(false);
changed = true;
}
- }
- else if (addToSelection) {
+ } else if (addToSelection) {
if (within) {
gobj.setSelected(true);
changed = true;
}
- }
- else if (toggleSelection) {
+ } else if (toggleSelection) {
if (within) {
- gobj.setSelected(! gobj.isSelected());
+ gobj.setSelected(!gobj.isSelected());
changed = true;
}
- }
- else {
+ } else {
gobj.setSelected(within);
changed = true;
}
@@ -926,14 +896,11 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
m_lastSelectionClick.x = x;
m_lastSelectionClick.y = y;
}
-
-
-
+
// --- selection management methods ---
-
+
/** Selects all items in the canvas. */
- public void selectAll()
- {
+ public void selectAll() {
List<MulticoreVisualizerGraphicObject> selectableObjects = getSelectableObjects();
for (MulticoreVisualizerGraphicObject gobj : selectableObjects) {
@@ -954,7 +921,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
selectionChanged();
}
-
+
/** Things to do whenever the selection changes. */
protected void selectionChanged() {
selectionChanged(true);
@@ -972,7 +939,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
protected void updateSelection(boolean raiseEvent) {
// get model objects (if any) corresponding to canvas selection
HashSet<Object> selectedObjects = new HashSet<Object>();
-
+
// threads
if (m_threads != null) {
for (MulticoreVisualizerThread tobj : m_threads) {
@@ -981,7 +948,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
+
// cpus and cores
if (m_model != null) {
for (VisualizerCPU modelCpu : m_model.getCPUs()) {
@@ -997,31 +964,29 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
+
// update model object selection
ISelection selection = SelectionUtils.toSelection(selectedObjects);
setSelection(selection, raiseEvent);
}
-
+
/** Restores current selection from saved list of model objects. */
protected void restoreSelection() {
ISelection selection = getSelection();
List<Object> selectedObjects = SelectionUtils.getSelectedObjects(selection);
-
+
for (Object modelObj : selectedObjects) {
if (modelObj instanceof VisualizerThread) {
MulticoreVisualizerThread thread = m_threadMap.get(modelObj);
if (thread != null) {
thread.setSelected(true);
}
- }
- else if (modelObj instanceof VisualizerCore) {
+ } else if (modelObj instanceof VisualizerCore) {
MulticoreVisualizerCore core = m_coreMap.get(modelObj);
if (core != null) {
core.setSelected(true);
}
- }
- else if (modelObj instanceof VisualizerCPU) {
+ } else if (modelObj instanceof VisualizerCPU) {
MulticoreVisualizerCPU cpu = m_cpuMap.get(modelObj);
if (cpu != null) {
cpu.setSelected(true);
@@ -1029,26 +994,25 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
}
}
}
-
- /**
+
+ /**
* Gets the current list of selectable objects. The list is ordered by object type,
* so that more specific objects will appear first, followed by enclosing objects.
- * For instance, threads are before cores and cores before CPUs.
+ * For instance, threads are before cores and cores before CPUs.
*/
- protected List<MulticoreVisualizerGraphicObject> getSelectableObjects () {
- List<MulticoreVisualizerGraphicObject> selectableObjects = new ArrayList<MulticoreVisualizerGraphicObject>();
+ protected List<MulticoreVisualizerGraphicObject> getSelectableObjects() {
+ List<MulticoreVisualizerGraphicObject> selectableObjects = new ArrayList<MulticoreVisualizerGraphicObject>();
selectableObjects.addAll(m_threads);
selectableObjects.addAll(m_cores);
selectableObjects.addAll(m_cpus);
-
+
return selectableObjects;
- }
-
-
+ }
+
// --- ISelectionProvider implementation ---
-
+
// Delegate to selection manager.
-
+
/** Adds external listener for selection change events. */
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
@@ -1062,61 +1026,56 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
m_selectionManager.removeSelectionChangedListener(listener);
}
}
-
+
/** Raises selection changed event. */
public void raiseSelectionChangedEvent() {
m_selectionManager.raiseSelectionChangedEvent();
}
-
+
/** Returns true if we have a selection. */
- public boolean hasSelection()
- {
+ public boolean hasSelection() {
return m_selectionManager.hasSelection();
}
-
+
/** Gets current externally-visible selection. */
@Override
- public ISelection getSelection()
- {
+ public ISelection getSelection() {
return m_selectionManager.getSelection();
}
-
+
/** Sets externally-visible selection. */
@Override
- public void setSelection(ISelection selection)
- {
+ public void setSelection(ISelection selection) {
setSelection(selection, true);
}
-
+
/** Sets externally-visible selection. */
- public void setSelection(ISelection selection, boolean raiseEvent)
- {
+ public void setSelection(ISelection selection, boolean raiseEvent) {
m_selectionManager.setSelection(selection, raiseEvent);
requestUpdate();
}
-
- /** Sets whether selection events are enabled. */
- public void setSelectionEventsEnabled(boolean enabled) {
- m_selectionManager.setSelectionEventsEnabled(enabled);
- }
-
-
- // --- canvas filter methods ---
-
- /** Set-up a canvas white-list filter. */
- public void applyFilter() {
- m_canvasFilterManager.applyFilter();
- }
-
- /** Removes the canvas filter currently in place */
- public void clearFilter() {
- m_canvasFilterManager.clearFilter();
- }
-
- /** Tells if a canvas filter is currently in place */
- public boolean isFilterActive() {
- return m_canvasFilterManager.isCurrentFilterActive();
- }
+
+ /** Sets whether selection events are enabled. */
+ public void setSelectionEventsEnabled(boolean enabled) {
+ m_selectionManager.setSelectionEventsEnabled(enabled);
+ }
+
+ // --- canvas filter methods ---
+
+ /** Set-up a canvas white-list filter. */
+ public void applyFilter() {
+ m_canvasFilterManager.applyFilter();
+ }
+
+ /** Removes the canvas filter currently in place */
+ public void clearFilter() {
+ m_canvasFilterManager.clearFilter();
+ }
+
+ /** Tells if a canvas filter is currently in place */
+ public boolean isFilterActive() {
+ return m_canvasFilterManager.isCurrentFilterActive();
+ }
@Override
public IGraphicObject getGraphicObject(Class<?> type, int x, int y) {
@@ -1126,7 +1085,8 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
if (gobj.contains(x, y)) {
if (type != null) {
Class<?> objType = gobj.getClass();
- if (! type.isAssignableFrom(objType)) continue;
+ if (!type.isAssignableFrom(objType))
+ continue;
}
result = gobj;
break;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
index 362d07170a..93283d006e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
@@ -27,66 +27,65 @@ import org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.model.VisualizerT
import org.eclipse.cdt.visualizer.ui.util.SelectionUtils;
import org.eclipse.jface.viewers.ISelection;
-
/**
- * White-list Filter for the graphical objects displayed in the multicore
- * visualizer canvas.
+ * White-list Filter for the graphical objects displayed in the multicore
+ * visualizer canvas.
*/
public class MulticoreVisualizerCanvasFilter {
-
- /** white list of objects on which the filter is based */
+
+ /** white list of objects on which the filter is based */
List<IVisualizerModelObject> m_filterList = null;
-
- /**
+
+ /**
* the dynamically expanded list, containing elements in the
* white list and their parents - recalculated as required
- * since some elements can move around and change parent
+ * since some elements can move around and change parent
*/
List<IVisualizerModelObject> m_dynamicFilterList = null;
-
+
/** reference to the canvas */
private MulticoreVisualizerCanvas m_canvas = null;
-
+
/** whether the filter is active */
- private boolean m_filterActive = false;
-
+ private boolean m_filterActive = false;
+
/** counter that reflects the number of CPUs shown once the filter is applied */
private int m_shownCpu = 0;
-
+
/** counter that reflects the number of cores shown once the filter is applied */
private int m_shownCore = 0;
-
+
/** counter that reflects the number of threads shown once the filter is applied */
private int m_shownThread = 0;
-
+
/** total number of CPUs in the current MV model */
private int m_totalCpu = 0;
-
+
/** total number of cores in the current MV model */
private int m_totalCore = 0;
-
+
/** total number of threads in the current MV model */
private int m_totalThread = 0;
-
+
/** String constant used to denote that the filter is not active */
- private static final String STR_FILTER_NOT_ACTIVE =
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.view.CanvasFilter.NotActive.text"); //$NON-NLS-1$
-
+ private static final String STR_FILTER_NOT_ACTIVE = MulticoreVisualizerUIPlugin
+ .getString("MulticoreVisualizer.view.CanvasFilter.NotActive.text"); //$NON-NLS-1$
+
/** String constant used to denote that the filter is active */
- private static final String STR_FILTER_ACTIVE =
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.view.CanvasFilter.Active.text"); //$NON-NLS-1$
-
+ private static final String STR_FILTER_ACTIVE = MulticoreVisualizerUIPlugin
+ .getString("MulticoreVisualizer.view.CanvasFilter.Active.text"); //$NON-NLS-1$
+
/** String constant used to represent CPUs */
- private static final String STR_CPU =
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.view.CanvasFilter.cpu.text"); //$NON-NLS-1$
-
+ private static final String STR_CPU = MulticoreVisualizerUIPlugin
+ .getString("MulticoreVisualizer.view.CanvasFilter.cpu.text"); //$NON-NLS-1$
+
/** String constant used to represent cores */
- private static final String STR_CORE =
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.view.CanvasFilter.core.text"); //$NON-NLS-1$
-
+ private static final String STR_CORE = MulticoreVisualizerUIPlugin
+ .getString("MulticoreVisualizer.view.CanvasFilter.core.text"); //$NON-NLS-1$
+
/** String constant used to represent threads */
- private static final String STR_THREAD =
- MulticoreVisualizerUIPlugin.getString("MulticoreVisualizer.view.CanvasFilter.thread.text"); //$NON-NLS-1$
+ private static final String STR_THREAD = MulticoreVisualizerUIPlugin
+ .getString("MulticoreVisualizer.view.CanvasFilter.thread.text"); //$NON-NLS-1$
// --- constructors/destructors ---
@@ -94,123 +93,120 @@ public class MulticoreVisualizerCanvasFilter {
public MulticoreVisualizerCanvasFilter(MulticoreVisualizerCanvas canvas) {
m_canvas = canvas;
}
-
+
/** Dispose method */
public void dispose() {
clearFilter();
m_canvas = null;
}
-
// --- filter methods ---
-
+
/**
- * Sets-up a canvas white-list filter from the current canvas selection.
- * Any applicable selected objects are added to the filter.
- */
- public void applyFilter() {
- // replace current filter? Clear old one first.
- if (isFilterActive()) {
- clearFilter();
- }
-
- m_filterList = new ArrayList<IVisualizerModelObject>();
- m_dynamicFilterList = new ArrayList<IVisualizerModelObject>();
-
- m_filterActive = true;
-
- // get list of selected objects the filter applies-for
- ISelection selection = m_canvas.getSelection();
- List<Object> selectedObjects = SelectionUtils.getSelectedObjects(selection);
-
- for (Object obj : selectedObjects) {
- if (obj instanceof IVisualizerModelObject) {
- m_filterList.add((IVisualizerModelObject)obj);
- }
- }
- }
-
+ * Sets-up a canvas white-list filter from the current canvas selection.
+ * Any applicable selected objects are added to the filter.
+ */
+ public void applyFilter() {
+ // replace current filter? Clear old one first.
+ if (isFilterActive()) {
+ clearFilter();
+ }
+
+ m_filterList = new ArrayList<IVisualizerModelObject>();
+ m_dynamicFilterList = new ArrayList<IVisualizerModelObject>();
+
+ m_filterActive = true;
+
+ // get list of selected objects the filter applies-for
+ ISelection selection = m_canvas.getSelection();
+ List<Object> selectedObjects = SelectionUtils.getSelectedObjects(selection);
+
+ for (Object obj : selectedObjects) {
+ if (obj instanceof IVisualizerModelObject) {
+ m_filterList.add((IVisualizerModelObject) obj);
+ }
+ }
+ }
+
/** Removes any canvas filter currently in place */
public void clearFilter() {
if (m_filterList != null) {
m_filterList.clear();
m_filterList = null;
}
-
+
if (m_dynamicFilterList != null) {
m_dynamicFilterList.clear();
m_dynamicFilterList = null;
}
resetCounters();
m_filterActive = false;
-
+
}
/** returns whether a canvas filter is currently in place */
public boolean isFilterActive() {
return m_filterActive;
}
-
- /**
- * Updates the dynamic filter so it contains the up-to-date parent objects
- */
- public void updateFilter() {
- if (m_filterList == null || m_canvas == null)
- return;
-
- VisualizerModel model = m_canvas.getModel();
-
- resetCounters();
- m_dynamicFilterList.clear();
-
- for (IVisualizerModelObject elem : m_filterList) {
- // element still in current model?
- if (isElementInCurrentModel(elem)) {
- // add element to list
- addElementToFilterList(elem);
-
- // also add all its ancestors
- IVisualizerModelObject parent;
-
- // Bug 407673 - if element is a thread, lookup the parent (core)
- // from the current model, to be sure it's up-to-date
- if (elem instanceof VisualizerThread && model != null) {
- parent = model.getThread(((VisualizerThread) elem).getGDBTID()).getParent();
- }
- else {
- parent = elem.getParent();
- }
- while (parent != null) {
- addElementToFilterList(parent);
- parent = parent.getParent();
- }
- }
- }
- }
/**
- * returns whether a candidate model object should be displayed,
- * according to the current filter.
+ * Updates the dynamic filter so it contains the up-to-date parent objects
+ */
+ public void updateFilter() {
+ if (m_filterList == null || m_canvas == null)
+ return;
+
+ VisualizerModel model = m_canvas.getModel();
+
+ resetCounters();
+ m_dynamicFilterList.clear();
+
+ for (IVisualizerModelObject elem : m_filterList) {
+ // element still in current model?
+ if (isElementInCurrentModel(elem)) {
+ // add element to list
+ addElementToFilterList(elem);
+
+ // also add all its ancestors
+ IVisualizerModelObject parent;
+
+ // Bug 407673 - if element is a thread, lookup the parent (core)
+ // from the current model, to be sure it's up-to-date
+ if (elem instanceof VisualizerThread && model != null) {
+ parent = model.getThread(((VisualizerThread) elem).getGDBTID()).getParent();
+ } else {
+ parent = elem.getParent();
+ }
+ while (parent != null) {
+ addElementToFilterList(parent);
+ parent = parent.getParent();
+ }
+ }
+ }
+ }
+
+ /**
+ * returns whether a candidate model object should be displayed,
+ * according to the current filter.
*/
public boolean displayObject(final IVisualizerModelObject candidate) {
- // filter not active? Let anything be displayed
+ // filter not active? Let anything be displayed
if (!m_filterActive) {
return true;
}
-
- // Candidate is in white list?
+
+ // Candidate is in white list?
if (isElementInFilterList(candidate)) {
return true;
}
-
+
return false;
}
-
-
+
// --- filter list management ---
-
+
/**
- * Adds an element to the dynamic filter list, if an equivalent
+ * Adds an element to the dynamic filter list, if an equivalent
* element is not already in there.
*/
private void addElementToFilterList(final IVisualizerModelObject elem) {
@@ -219,24 +215,23 @@ public class MulticoreVisualizerCanvasFilter {
stepStatsCounter(elem);
}
}
-
+
/**
- * Returns whether an element already has an equivalent in the
+ * Returns whether an element already has an equivalent in the
* dynamic filter list.
*/
private boolean isElementInFilterList(final IVisualizerModelObject candidate) {
// is the candidate in the dynamic filter list?
for (IVisualizerModelObject elem : m_dynamicFilterList) {
- // Note: we are comparing the content (IDs), not references.
+ // Note: we are comparing the content (IDs), not references.
if (candidate.compareTo(elem) == 0) {
return true;
}
}
return false;
}
-
-
- /** returns whether a model object currently in the filter still exists in
+
+ /** returns whether a model object currently in the filter still exists in
* the current model.
*/
private boolean isElementInCurrentModel(IVisualizerModelObject element) {
@@ -250,8 +245,7 @@ public class MulticoreVisualizerCanvasFilter {
return true;
}
}
- }
- else if (element instanceof VisualizerCore) {
+ } else if (element instanceof VisualizerCore) {
VisualizerCore core = model.getCore(element.getID());
if (core != null) {
// Note: we are comparing the content (IDs), not references.
@@ -259,8 +253,7 @@ public class MulticoreVisualizerCanvasFilter {
return true;
}
}
- }
- else if (element instanceof VisualizerCPU) {
+ } else if (element instanceof VisualizerCPU) {
VisualizerCPU cpu = model.getCPU(element.getID());
if (cpu != null) {
// Note: we are comparing the content (IDs), not references.
@@ -272,24 +265,22 @@ public class MulticoreVisualizerCanvasFilter {
}
return false;
}
-
+
// --- Stats counters ---
-
- /**
- * Steps the filter counters for a given type of model object.
- */
+
+ /**
+ * Steps the filter counters for a given type of model object.
+ */
private void stepStatsCounter(IVisualizerModelObject modelObj) {
if (modelObj instanceof VisualizerCPU) {
m_shownCpu++;
- }
- else if (modelObj instanceof VisualizerCore) {
+ } else if (modelObj instanceof VisualizerCore) {
m_shownCore++;
- }
- else if (modelObj instanceof VisualizerThread) {
+ } else if (modelObj instanceof VisualizerThread) {
m_shownThread++;
}
}
-
+
/** Resets the filter counters */
private void resetCounters() {
m_shownCpu = 0;
@@ -305,27 +296,20 @@ public class MulticoreVisualizerCanvasFilter {
}
}
}
-
/** returns a String giving the current filtering stats */
private String getStats() {
return STR_FILTER_ACTIVE + " " + STR_CPU + " " + m_shownCpu + "/" + m_totalCpu + ", " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
STR_CORE + " " + m_shownCore + "/" + m_totalCore + ", " + //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
- STR_THREAD + " " + m_shownThread + "/" + m_totalThread; //$NON-NLS-1$//$NON-NLS-2$
+ STR_THREAD + " " + m_shownThread + "/" + m_totalThread; //$NON-NLS-1$//$NON-NLS-2$
}
-
+
@Override
public String toString() {
if (isFilterActive()) {
return getStats();
- }
- else {
+ } else {
return STR_FILTER_NOT_ACTIVE;
}
}
}
-
-
-
-
-
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilterManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilterManager.java
index 0d739f1587..82ef92bf0d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilterManager.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilterManager.java
@@ -21,32 +21,32 @@ import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.dsf.service.DsfSession.SessionEndedListener;
/**
- * Manages the canvas filters for all current debug sessions.
+ * Manages the canvas filters for all current debug sessions.
*/
public class MulticoreVisualizerCanvasFilterManager implements SessionEndedListener {
- /** map containing the filter lists for different debug sessions */
- private Hashtable<String,MulticoreVisualizerCanvasFilter> m_filterSessionMap = null;
+ /** map containing the filter lists for different debug sessions */
+ private Hashtable<String, MulticoreVisualizerCanvasFilter> m_filterSessionMap = null;
/** reference to the canvas */
private MulticoreVisualizerCanvas m_canvas = null;
-
+
/** filter currently in place */
private MulticoreVisualizerCanvasFilter m_currentFilter = null;
-
+
/** Constructor */
public MulticoreVisualizerCanvasFilterManager(MulticoreVisualizerCanvas canvas) {
- m_filterSessionMap = new Hashtable<String,MulticoreVisualizerCanvasFilter>();
+ m_filterSessionMap = new Hashtable<String, MulticoreVisualizerCanvasFilter>();
m_canvas = canvas;
// add listener to be notified when a debug session ends
DsfSession.addSessionEndedListener(this);
}
-
+
/** dispose method */
public void dispose() {
// remove listener
DsfSession.removeSessionEndedListener(this);
-
+
// dispose of any filter
if (m_filterSessionMap != null) {
for (MulticoreVisualizerCanvasFilter filter : m_filterSessionMap.values()) {
@@ -58,80 +58,79 @@ public class MulticoreVisualizerCanvasFilterManager implements SessionEndedListe
m_canvas = null;
m_currentFilter = null;
}
-
+
/**
- * Returns the filter for a given debug session if it exists, or else
+ * Returns the filter for a given debug session if it exists, or else
* creates a new filter for that session.
*/
public MulticoreVisualizerCanvasFilter getFilter(String sessionId) {
MulticoreVisualizerCanvasFilter filter = null;
// already a filter for this session ?
filter = m_filterSessionMap.get(sessionId);
-
+
// no filter yet for this session? Create one
if (filter == null) {
// create one
filter = new MulticoreVisualizerCanvasFilter(m_canvas);
m_filterSessionMap.put(sessionId, filter);
-
+
}
return filter;
}
-
+
/** Removes the filter in place for a given debug session, if any. */
public void removeFilter(String sessionId) {
if (m_filterSessionMap.containsKey(sessionId)) {
m_filterSessionMap.remove(sessionId);
}
}
-
+
/** Re-computes the current filter to reflect latest model changes */
public void updateCurrentFilter() {
- if( m_currentFilter != null) {
+ if (m_currentFilter != null) {
m_currentFilter.updateFilter();
}
}
-
+
/** Sets-up a filter, based on the current canvas selection */
public void applyFilter() {
- if( m_currentFilter != null) {
+ if (m_currentFilter != null) {
m_currentFilter.applyFilter();
}
}
-
+
/** Clears the current filter */
public void clearFilter() {
- if( m_currentFilter != null) {
+ if (m_currentFilter != null) {
m_currentFilter.clearFilter();
}
}
-
+
/** Sets the current filter for a given model/session */
public void setCurrentFilter(String sessionId) {
if (sessionId == null) {
m_currentFilter = null;
- }
- else {
+ } else {
m_currentFilter = getFilter(sessionId);
}
}
-
+
/** Returns the current filter */
public MulticoreVisualizerCanvasFilter getCurrentFilter() {
return m_currentFilter;
}
-
+
/** Checks if the current filter is active */
public boolean isCurrentFilterActive() {
- if( m_currentFilter != null) {
+ if (m_currentFilter != null) {
return m_currentFilter.isFilterActive();
}
return false;
}
-
+
/** Checks if the current filter permits the display of an object */
public boolean displayObject(final IVisualizerModelObject obj) {
- if( m_currentFilter != null) {
+ if (m_currentFilter != null) {
return m_currentFilter.displayObject(obj);
}
return false;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCore.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCore.java
index 4d4ec0cee3..5f2ab47c33 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCore.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCore.java
@@ -29,35 +29,35 @@ import org.eclipse.swt.graphics.GC;
/**
* MulticoreVisualizer CPU core object.
*/
-public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject
-{
+public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject {
// --- members ---
-
+
/** Parent CPU. */
protected MulticoreVisualizerCPU m_cpu = null;
-
+
/** Core ID. */
protected int m_id;
-
+
/** List of threads currently on this core. */
protected ArrayList<MulticoreVisualizerThread> m_threads;
-
+
/** Load meter associated to this core */
protected MulticoreVisualizerLoadMeter m_loadMeter;
-
+
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerCore(MulticoreVisualizerCPU cpu, int id) {
m_cpu = cpu;
- if (m_cpu != null) m_cpu.addCore(this);
+ if (m_cpu != null)
+ m_cpu.addCore(this);
m_id = id;
m_threads = new ArrayList<MulticoreVisualizerThread>();
-
+
// default load meter
m_loadMeter = new MulticoreVisualizerLoadMeter(null, null);
}
-
+
/** Dispose method */
@Override
public void dispose() {
@@ -70,10 +70,9 @@ public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject
m_loadMeter.dispose();
}
}
-
-
+
// --- accessors ---
-
+
/** Gets parent CPU. */
public MulticoreVisualizerCPU getCPU() {
return m_cpu;
@@ -84,38 +83,33 @@ public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject
return m_id;
}
-
// --- methods ---
-
+
/** Adds child thread. */
- public void addThread(MulticoreVisualizerThread thread)
- {
+ public void addThread(MulticoreVisualizerThread thread) {
m_threads.add(thread);
}
-
+
/** Removes child thread. */
- public void removeThread(MulticoreVisualizerThread thread)
- {
+ public void removeThread(MulticoreVisualizerThread thread) {
m_threads.remove(thread);
}
-
+
/** Removes all child threads. */
- public void removeAllThreads()
- {
+ public void removeAllThreads() {
m_threads.clear();
}
-
+
/** Gets list of child threads. */
- public List<MulticoreVisualizerThread> getThreads()
- {
+ public List<MulticoreVisualizerThread> getThreads() {
return m_threads;
}
-
+
/** Sets the load meter associated to this core */
- public void setLoadMeter (MulticoreVisualizerLoadMeter meter) {
+ public void setLoadMeter(MulticoreVisualizerLoadMeter meter) {
m_loadMeter = meter;
}
-
+
/** Gets the load meter associated to this core */
public MulticoreVisualizerLoadMeter getLoadMeter() {
return m_loadMeter;
@@ -129,7 +123,7 @@ public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject
*/
protected VisualizerExecutionState getCoreState() {
VisualizerExecutionState state = VisualizerExecutionState.RUNNING;
-
+
for (MulticoreVisualizerThread thread : m_threads) {
switch (thread.getState()) {
case CRASHED:
@@ -145,53 +139,54 @@ public class MulticoreVisualizerCore extends MulticoreVisualizerGraphicObject
break;
}
}
-
+
return state;
}
-
+
/** Returns core color for current state. */
protected Color getCoreStateColor(boolean foreground) {
VisualizerExecutionState state = getCoreState();
-
+
switch (state) {
case RUNNING:
- if (foreground) return IMulticoreVisualizerConstants.COLOR_RUNNING_CORE_FG;
+ if (foreground)
+ return IMulticoreVisualizerConstants.COLOR_RUNNING_CORE_FG;
return IMulticoreVisualizerConstants.COLOR_RUNNING_CORE_BG;
case SUSPENDED:
- if (foreground) return IMulticoreVisualizerConstants.COLOR_SUSPENDED_CORE_FG;
+ if (foreground)
+ return IMulticoreVisualizerConstants.COLOR_SUSPENDED_CORE_FG;
return IMulticoreVisualizerConstants.COLOR_SUSPENDED_CORE_BG;
case CRASHED:
- if (foreground) return IMulticoreVisualizerConstants.COLOR_CRASHED_CORE_FG;
+ if (foreground)
+ return IMulticoreVisualizerConstants.COLOR_CRASHED_CORE_FG;
return IMulticoreVisualizerConstants.COLOR_CRASHED_CORE_BG;
}
-
+
assert false;
return Colors.BLACK;
}
-
+
// --- paint methods ---
-
+
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
public void paintContent(GC gc) {
Color bg = getCoreStateColor(false);
-
+
gc.setBackground(bg);
// We want the load meter to share the same BG color
m_loadMeter.setParentBgColor(bg);
// highlight in a different color if selected
- if (m_selected)
- {
+ if (m_selected) {
gc.setForeground(IMulticoreVisualizerConstants.COLOR_SELECTED);
- }
- else {
+ } else {
gc.setForeground(getCoreStateColor(true));
}
gc.fillRectangle(m_bounds);
gc.drawRectangle(m_bounds);
-
+
if (m_bounds.height > 16) {
int text_indent = 3;
int tx = m_bounds.x + m_bounds.width - text_indent;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerEventListener.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerEventListener.java
index 7ea09bd627..f1e67aa80e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerEventListener.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerEventListener.java
@@ -56,33 +56,30 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MISignalEvent;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
-
/**
* DSF event listener class for the Multicore Visualizer.
* This class will handle different relevant DSF events
* and update the Multicore Visualizer accordingly.
*/
public class MulticoreVisualizerEventListener {
-
+
private static final String THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER = "The thread id does not convert to an integer: "; //$NON-NLS-1$
- // --- members ---
+ // --- members ---
/** Visualizer we're managing events for. */
protected MulticoreVisualizer fVisualizer;
-
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerEventListener(MulticoreVisualizer visualizer) {
fVisualizer = visualizer;
}
-
// --- event handlers ---
-
- /**
- * Invoked when a thread or process is suspended.
+
+ /**
+ * Invoked when a thread or process is suspended.
* Updates both state of the thread and the core it's running on
*/
@DsfServiceEventHandler
@@ -94,86 +91,82 @@ public class MulticoreVisualizerEventListener {
}
IDMContext context = event.getDMContext();
-
// all-stop mode? If so, we take the opportunity, now that GDB has suspended
// execution, to re-create the model so that we synchronize with the debug session
- if (context != null && isSessionAllStop(context.getSessionId()) ) {
+ if (context != null && isSessionAllStop(context.getSessionId())) {
fVisualizer.update();
return;
}
-
+
// non-stop mode
if (context instanceof IContainerDMContext) {
- // We don't deal with processes
- } else if (context instanceof IMIExecutionDMContext) {
- // Thread suspended
-
- final IMIExecutionDMContext execDmc = (IMIExecutionDMContext)context;
- IThreadDMContext threadContext =
- DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class);
-
- final DsfServicesTracker tracker =
- new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
- execDmc.getSessionId());
+ // We don't deal with processes
+ } else if (context instanceof IMIExecutionDMContext) {
+ // Thread suspended
+
+ final IMIExecutionDMContext execDmc = (IMIExecutionDMContext) context;
+ IThreadDMContext threadContext = DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class);
+
+ final DsfServicesTracker tracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
+ execDmc.getSessionId());
IProcesses procService = tracker.getService(IProcesses.class);
final IStack stackService = tracker.getService(IStack.class);
tracker.dispose();
-
- procService.getExecutionData(threadContext,
- new ImmediateDataRequestMonitor<IThreadDMData>() {
- @Override
- protected void handleSuccess() {
- IThreadDMData data = getData();
-
- // Check whether we know about cores
- if (data instanceof IGdbThreadDMData) {
- String[] cores = ((IGdbThreadDMData)data).getCores();
- if (cores != null) {
- assert cores.length == 1; // A thread belongs to a single core
- int coreId = Integer.parseInt(cores[0]);
- final VisualizerCore vCore = model.getCore(coreId);
-
- int tid;
- VisualizerThread threadTmp = null;
- try {
- tid = Integer.parseInt(execDmc.getThreadId());
- threadTmp = model.getThread(tid);
- } catch (NumberFormatException e) {
- // unable to resolve thread
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
- return;
- }
-
- if (threadTmp != null) {
- final VisualizerThread thread = threadTmp;
- assert thread.getState() == VisualizerExecutionState.RUNNING;
-
- VisualizerExecutionState _newState = VisualizerExecutionState.SUSPENDED;
-
- if (event.getReason() == StateChangeReason.SIGNAL) {
- if (event instanceof IMIDMEvent) {
- Object miEvent = ((IMIDMEvent)event).getMIEvent();
- if (miEvent instanceof MISignalEvent) {
- String signalName = ((MISignalEvent)miEvent).getName();
- if (DSFDebugModel.isCrashSignal(signalName)) {
- _newState = VisualizerExecutionState.CRASHED;
- }
- }
- }
- }
- final VisualizerExecutionState newState = _newState;
- if (stackService != null) {
- stackService.getTopFrame(execDmc,
- new ImmediateDataRequestMonitor<IFrameDMContext>(null) {
- @Override
- protected void handleCompleted() {
- IFrameDMContext targetFrameContext = null;
- if (isSuccess()) {
- targetFrameContext = getData();
- }
- if (targetFrameContext != null) {
- stackService.getFrameData(targetFrameContext,
+
+ procService.getExecutionData(threadContext, new ImmediateDataRequestMonitor<IThreadDMData>() {
+ @Override
+ protected void handleSuccess() {
+ IThreadDMData data = getData();
+
+ // Check whether we know about cores
+ if (data instanceof IGdbThreadDMData) {
+ String[] cores = ((IGdbThreadDMData) data).getCores();
+ if (cores != null) {
+ assert cores.length == 1; // A thread belongs to a single core
+ int coreId = Integer.parseInt(cores[0]);
+ final VisualizerCore vCore = model.getCore(coreId);
+
+ int tid;
+ VisualizerThread threadTmp = null;
+ try {
+ tid = Integer.parseInt(execDmc.getThreadId());
+ threadTmp = model.getThread(tid);
+ } catch (NumberFormatException e) {
+ // unable to resolve thread
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
+ return;
+ }
+
+ if (threadTmp != null) {
+ final VisualizerThread thread = threadTmp;
+ assert thread.getState() == VisualizerExecutionState.RUNNING;
+
+ VisualizerExecutionState _newState = VisualizerExecutionState.SUSPENDED;
+
+ if (event.getReason() == StateChangeReason.SIGNAL) {
+ if (event instanceof IMIDMEvent) {
+ Object miEvent = ((IMIDMEvent) event).getMIEvent();
+ if (miEvent instanceof MISignalEvent) {
+ String signalName = ((MISignalEvent) miEvent).getName();
+ if (DSFDebugModel.isCrashSignal(signalName)) {
+ _newState = VisualizerExecutionState.CRASHED;
+ }
+ }
+ }
+ }
+ final VisualizerExecutionState newState = _newState;
+ if (stackService != null) {
+ stackService.getTopFrame(execDmc,
+ new ImmediateDataRequestMonitor<IFrameDMContext>(null) {
+ @Override
+ protected void handleCompleted() {
+ IFrameDMContext targetFrameContext = null;
+ if (isSuccess()) {
+ targetFrameContext = getData();
+ }
+ if (targetFrameContext != null) {
+ stackService.getFrameData(targetFrameContext,
new ImmediateDataRequestMonitor<IFrameDMData>(null) {
@Override
protected void handleCompleted() {
@@ -181,28 +174,29 @@ public class MulticoreVisualizerEventListener {
if (isSuccess()) {
frameData = getData();
}
- updateThread(thread, newState, vCore, frameData);
+ updateThread(thread, newState, vCore,
+ frameData);
}
});
- } else {
- updateThread(thread, newState, vCore, null);
- }
+ } else {
+ updateThread(thread, newState, vCore, null);
}
+ }
});
- } else {
- updateThread(thread, newState, vCore, null);
- }
-
- }
+ } else {
+ updateThread(thread, newState, vCore, null);
+ }
+
}
}
}
}
- );
- }
+ });
+ }
}
-
- private void updateThread(VisualizerThread thread, VisualizerExecutionState newState, VisualizerCore vCore, IFrameDMData frameData) {
+
+ private void updateThread(VisualizerThread thread, VisualizerExecutionState newState, VisualizerCore vCore,
+ IFrameDMData frameData) {
thread.setState(newState);
thread.setCore(vCore);
thread.setLocationInfo(frameData);
@@ -217,46 +211,46 @@ public class MulticoreVisualizerEventListener {
if (model == null) {
return;
}
-
+
IDMContext context = event.getDMContext();
-
+
// in all-stop mode... : update all threads states to "running"
- if (context != null && isSessionAllStop(context.getSessionId()) ) {
+ if (context != null && isSessionAllStop(context.getSessionId())) {
List<VisualizerThread> tList = model.getThreads();
- for(VisualizerThread t : tList) {
+ for (VisualizerThread t : tList) {
t.setState(VisualizerExecutionState.RUNNING);
t.setLocationInfo((String) null);
}
fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
return;
}
-
+
// Non-stop mode
if (context instanceof IContainerDMContext) {
- // We don't deal with processes
- } else if (context instanceof IMIExecutionDMContext) {
- // Thread resumed
- int tid;
- VisualizerThread thread = null;
- String strThreadId = ((IMIExecutionDMContext) context).getThreadId();
- try {
- tid = Integer.parseInt(strThreadId);
- thread = model.getThread(tid);
- } catch (NumberFormatException e) {
- // unable to resolve thread
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
- return;
- }
-
- if (thread != null) {
- assert thread.getState() == VisualizerExecutionState.SUSPENDED ||
- thread.getState() == VisualizerExecutionState.CRASHED;
-
- thread.setState(VisualizerExecutionState.RUNNING);
- thread.setLocationInfo((String) null);
- fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
- }
- }
+ // We don't deal with processes
+ } else if (context instanceof IMIExecutionDMContext) {
+ // Thread resumed
+ int tid;
+ VisualizerThread thread = null;
+ String strThreadId = ((IMIExecutionDMContext) context).getThreadId();
+ try {
+ tid = Integer.parseInt(strThreadId);
+ thread = model.getThread(tid);
+ } catch (NumberFormatException e) {
+ // unable to resolve thread
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
+ return;
+ }
+
+ if (thread != null) {
+ assert thread.getState() == VisualizerExecutionState.SUSPENDED
+ || thread.getState() == VisualizerExecutionState.CRASHED;
+
+ thread.setState(VisualizerExecutionState.RUNNING);
+ thread.setLocationInfo((String) null);
+ fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
+ }
+ }
}
/** Invoked when a thread or process starts. */
@@ -267,121 +261,118 @@ public class MulticoreVisualizerEventListener {
if (model == null) {
return;
}
-
+
IDMContext context = event.getDMContext();
- if (context == null) return;
+ if (context == null)
+ return;
final String sessionId = context.getSessionId();
-
- // all-stop mode?
- // If so we can't ask GDB for more info about the new thread at this moment.
- // So we still add it to the model, on core zero and with a OS thread id of
- // zero. The next time the execution is stopped, the model will be re-created
+
+ // all-stop mode?
+ // If so we can't ask GDB for more info about the new thread at this moment.
+ // So we still add it to the model, on core zero and with a OS thread id of
+ // zero. The next time the execution is stopped, the model will be re-created
// and show the correct thread ids and cores.
- if (isSessionAllStop(sessionId) && context instanceof IMIExecutionDMContext ) {
- final IMIExecutionDMContext execDmc = (IMIExecutionDMContext)context;
- final IMIProcessDMContext processContext =
- DMContexts.getAncestorOfType(execDmc, IMIProcessDMContext.class);
-
+ if (isSessionAllStop(sessionId) && context instanceof IMIExecutionDMContext) {
+ final IMIExecutionDMContext execDmc = (IMIExecutionDMContext) context;
+ final IMIProcessDMContext processContext = DMContexts.getAncestorOfType(execDmc, IMIProcessDMContext.class);
+
// put it on core zero
VisualizerCore vCore = model.getCore(0);
- if (vCore == null) return;
-
+ if (vCore == null)
+ return;
+
int pid = Integer.parseInt(processContext.getProcId());
- int tid;
- try {
- tid = Integer.parseInt(execDmc.getThreadId());
- } catch (NumberFormatException e) {
- // unable to resolve thread
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
- return;
- }
+ int tid;
+ try {
+ tid = Integer.parseInt(execDmc.getThreadId());
+ } catch (NumberFormatException e) {
+ // unable to resolve thread
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
+ return;
+ }
int osTid = 0;
- // add thread if not already there - there is a potential race condition where a
- // thread can be added twice to the model: once at model creation and once more
+ // add thread if not already there - there is a potential race condition where a
+ // thread can be added twice to the model: once at model creation and once more
// through the listener. Checking at both places to prevent this.
- if (model.getThread(tid) == null ) {
+ if (model.getThread(tid) == null) {
model.addThread(new VisualizerThread(vCore, pid, osTid, tid, VisualizerExecutionState.RUNNING));
- fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
+ fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
}
return;
}
-
+
// non-stop mode
if (context instanceof IContainerDMContext) {
- // We don't deal with processes
- } else if (context instanceof IMIExecutionDMContext) {
- // New thread added
- final IMIExecutionDMContext execDmc = (IMIExecutionDMContext)context;
- final IMIProcessDMContext processContext =
- DMContexts.getAncestorOfType(execDmc, IMIProcessDMContext.class);
- IThreadDMContext threadContext =
- DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class);
-
- DsfServicesTracker tracker =
- new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
- sessionId);
+ // We don't deal with processes
+ } else if (context instanceof IMIExecutionDMContext) {
+ // New thread added
+ final IMIExecutionDMContext execDmc = (IMIExecutionDMContext) context;
+ final IMIProcessDMContext processContext = DMContexts.getAncestorOfType(execDmc, IMIProcessDMContext.class);
+ IThreadDMContext threadContext = DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class);
+
+ DsfServicesTracker tracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
+ sessionId);
IProcesses procService = tracker.getService(IProcesses.class);
tracker.dispose();
-
- procService.getExecutionData(threadContext,
- new ImmediateDataRequestMonitor<IThreadDMData>() {
- @Override
- protected void handleSuccess() {
- IThreadDMData data = getData();
-
- // Check whether we know about cores
- if (data instanceof IGdbThreadDMData) {
- String[] cores = ((IGdbThreadDMData)data).getCores();
- if (cores != null) {
- assert cores.length == 1; // A thread belongs to a single core
- int coreId = Integer.parseInt(cores[0]);
- VisualizerCore vCore = model.getCore(coreId);
- // There is a race condition that sometimes happens here. We can reach
- // here because we were notified that a thread is started, but the model
- // is not yet completely constructed. If the model doesn't yet contain the
- // core the thread runs-on, the getCore() call above will return null. This
- // will later cause a problem when we try to draw this thread, if we allow
- // this to pass. See Bug 396269/
- if (vCore == null)
- return;
-
- int pid = Integer.parseInt(processContext.getProcId());
- int tid;
- try {
- tid = Integer.parseInt(execDmc.getThreadId());
- } catch (NumberFormatException e) {
- // Unable to resolve thread information
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
- return;
- }
-
- int osTid = 0;
- try {
- osTid = Integer.parseInt(data.getId());
- } catch (NumberFormatException e) {
- // I've seen a case at startup where GDB is not ready to
- // return the osTID so we get null.
- // That is ok, we'll be refreshing right away at startup
- }
- // add thread if not already there - there is a potential race condition where a
- // thread can be added twice to the model: once at model creation and once more
- // through the listener. Checking at both places to prevent this.
- if (model.getThread(tid) == null ) {
- model.addThread(new VisualizerThread(vCore, pid, osTid, tid, VisualizerExecutionState.RUNNING));
- fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
- }
+ procService.getExecutionData(threadContext, new ImmediateDataRequestMonitor<IThreadDMData>() {
+ @Override
+ protected void handleSuccess() {
+ IThreadDMData data = getData();
+
+ // Check whether we know about cores
+ if (data instanceof IGdbThreadDMData) {
+ String[] cores = ((IGdbThreadDMData) data).getCores();
+ if (cores != null) {
+ assert cores.length == 1; // A thread belongs to a single core
+ int coreId = Integer.parseInt(cores[0]);
+ VisualizerCore vCore = model.getCore(coreId);
+ // There is a race condition that sometimes happens here. We can reach
+ // here because we were notified that a thread is started, but the model
+ // is not yet completely constructed. If the model doesn't yet contain the
+ // core the thread runs-on, the getCore() call above will return null. This
+ // will later cause a problem when we try to draw this thread, if we allow
+ // this to pass. See Bug 396269/
+ if (vCore == null)
+ return;
+
+ int pid = Integer.parseInt(processContext.getProcId());
+ int tid;
+ try {
+ tid = Integer.parseInt(execDmc.getThreadId());
+ } catch (NumberFormatException e) {
+ // Unable to resolve thread information
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execDmc.getThreadId();
+ return;
+ }
+
+ int osTid = 0;
+ try {
+ osTid = Integer.parseInt(data.getId());
+ } catch (NumberFormatException e) {
+ // I've seen a case at startup where GDB is not ready to
+ // return the osTID so we get null.
+ // That is ok, we'll be refreshing right away at startup
+ }
+
+ // add thread if not already there - there is a potential race condition where a
+ // thread can be added twice to the model: once at model creation and once more
+ // through the listener. Checking at both places to prevent this.
+ if (model.getThread(tid) == null) {
+ model.addThread(
+ new VisualizerThread(vCore, pid, osTid, tid, VisualizerExecutionState.RUNNING));
+ fVisualizer.getMulticoreVisualizerCanvas().requestUpdate();
}
}
}
}
- );
- }
+ });
+ }
}
-
+
/** Invoked when a thread or process exits. */
@DsfServiceEventHandler
public void handleEvent(IExitedDMEvent event) {
@@ -393,94 +384,90 @@ public class MulticoreVisualizerEventListener {
IDMContext context = event.getDMContext();
final MulticoreVisualizerCanvas canvas = fVisualizer.getMulticoreVisualizerCanvas();
-
+
if (context instanceof IContainerDMContext) {
- // process exited
-
- // Note: this is required because we noticed that in GDB 7.6 and older,
- // the "thread exited" signal is not sent for the local detach case.
+ // process exited
+
+ // Note: this is required because we noticed that in GDB 7.6 and older,
+ // the "thread exited" signal is not sent for the local detach case.
// see bug 409512
- DsfServicesTracker tracker =
- new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
- context.getSessionId());
+ DsfServicesTracker tracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
+ context.getSessionId());
IProcesses procService = tracker.getService(IProcesses.class);
tracker.dispose();
-
+
// get all threads associated to this process and
// mark them as exited in the model.
- procService.getProcessesBeingDebugged(context,
- new ImmediateDataRequestMonitor<IDMContext[]>() {
- @Override
- protected void handleSuccess() {
- assert getData() != null;
-
- IDMContext[] contexts = getData();
- for (IDMContext c : contexts) {
- if (c instanceof IMIExecutionDMContext) {
- int tid;
- String strThreadId = ((IMIExecutionDMContext) c).getThreadId();
- try {
- tid = Integer.parseInt(strThreadId);
- } catch (NumberFormatException e) {
- // unable to resolve the thread id
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
- continue;
- }
-
- model.markThreadExited(tid);
- }
- }
-
- if (canvas != null) {
- canvas.requestUpdate();
+ procService.getProcessesBeingDebugged(context, new ImmediateDataRequestMonitor<IDMContext[]>() {
+ @Override
+ protected void handleSuccess() {
+ assert getData() != null;
+
+ IDMContext[] contexts = getData();
+ for (IDMContext c : contexts) {
+ if (c instanceof IMIExecutionDMContext) {
+ int tid;
+ String strThreadId = ((IMIExecutionDMContext) c).getThreadId();
+ try {
+ tid = Integer.parseInt(strThreadId);
+ } catch (NumberFormatException e) {
+ // unable to resolve the thread id
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
+ continue;
}
+
+ model.markThreadExited(tid);
}
- @Override
- protected void handleFailure() {
- // we are overriding handleFailure() to avoid an error message
- // in the log, in the all-stop mode.
- }
+ }
+
+ if (canvas != null) {
+ canvas.requestUpdate();
+ }
+ }
+
+ @Override
+ protected void handleFailure() {
+ // we are overriding handleFailure() to avoid an error message
+ // in the log, in the all-stop mode.
+ }
});
-
-
- } else if (context instanceof IMIExecutionDMContext) {
- // Thread exited
- int tid;
- String strThreadId = ((IMIExecutionDMContext) context).getThreadId();
- try {
- tid = Integer.parseInt(strThreadId);
- model.markThreadExited(tid);
- } catch (NumberFormatException e) {
- assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
- }
+
+ } else if (context instanceof IMIExecutionDMContext) {
+ // Thread exited
+ int tid;
+ String strThreadId = ((IMIExecutionDMContext) context).getThreadId();
+ try {
+ tid = Integer.parseInt(strThreadId);
+ model.markThreadExited(tid);
+ } catch (NumberFormatException e) {
+ assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + strThreadId;
+ }
if (canvas != null) {
canvas.requestUpdate();
}
- }
+ }
}
-
/** Invoked when the debug data model is ready */
@DsfServiceEventHandler
public void handleEvent(DataModelInitializedEvent event) {
// re-create the visualizer model now that CPU and core info is available
fVisualizer.update();
}
-
-
+
// helper functions
/** Returns whether the session is the "all-stop" kind */
private boolean isSessionAllStop(String sessionId) {
- DsfServicesTracker servicesTracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(), sessionId);
+ DsfServicesTracker servicesTracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(),
+ sessionId);
IMIRunControl runCtrlService = servicesTracker.getService(IMIRunControl.class);
servicesTracker.dispose();
-
- if (runCtrlService != null && runCtrlService.getRunMode() == MIRunMode.ALL_STOP ) {
+
+ if (runCtrlService != null && runCtrlService.getRunMode() == MIRunMode.ALL_STOP) {
return true;
}
return false;
}
}
-
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerGraphicObject.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerGraphicObject.java
index 7cc9d8c0a3..31f7d2ce5f 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerGraphicObject.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerGraphicObject.java
@@ -20,25 +20,23 @@ import org.eclipse.swt.graphics.GC;
/**
* Graphic object for MulticoreVisualizer.
*/
-public class MulticoreVisualizerGraphicObject extends GraphicObject
-{
+public class MulticoreVisualizerGraphicObject extends GraphicObject {
// --- members ---
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerGraphicObject() {
}
-
+
/** Dispose method */
@Override
public void dispose() {
super.dispose();
}
-
// --- methods ---
-
+
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
public void paintContent(GC gc) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerLoadMeter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerLoadMeter.java
index 1b4597d56f..9ffc37ff79 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerLoadMeter.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerLoadMeter.java
@@ -27,39 +27,38 @@ import org.eclipse.swt.graphics.Rectangle;
public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObject {
// --- members ---
-
+
/** Is this load meter enabled? */
protected boolean m_enabled = false;
-
+
/** The current CPU/core load */
protected Integer m_currentLoad = null;
-
+
/** the high load water-mark */
protected Integer m_highLoadWatermark = null;
-
+
/** second rectangle, that will be displayed to show the load */
protected Rectangle m_loadRect = null;
-
+
/** to display the high load water-mark */
protected Rectangle m_highWatermarkRect = null;
-
+
/** Switch that permits to hide the load meter when not in overload */
protected Boolean m_showOnlyIfOverload = false;
-
+
/** Default overload threshold */
protected int m_overloadThreshold = 75;
-
+
/** Permits to have the load meter use the same BG color as its parent */
protected Color m_parentBgColor = null;
-
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerLoadMeter(Integer load) {
m_currentLoad = load;
}
-
+
/** Constructor witch includes the high load water-mark */
public MulticoreVisualizerLoadMeter(Integer load, Integer highWatermark) {
this(load);
@@ -72,85 +71,83 @@ public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObje
super.dispose();
}
-
// --- accessors ---
-
+
/** Sets whether the load meter is enabled */
public void setEnabled(boolean enabled) {
m_enabled = enabled;
}
-
+
/** Gets whether the load meter is enabled */
public boolean getEnabled() {
return m_enabled;
}
-
+
/** Sets the load associated to this load meter */
public void setLoad(Integer load) {
m_currentLoad = load;
}
-
+
/**
* @return the load value. If the value is undefined (null), zero is
- * returned. Method isLoadDefined() can be used to determine is the load
+ * returned. Method isLoadDefined() can be used to determine is the load
* value is defined, in the cases where the difference is important
* if needed.
*/
public int getLoad() {
return (m_currentLoad != null) ? m_currentLoad : 0;
}
-
+
/**
* @return true if load is a non-null value, otherwise false.
*/
public boolean isLoadDefined() {
return (m_currentLoad != null);
}
-
+
public void setHighLoadWatermark(Integer wm) {
m_highLoadWatermark = wm;
}
-
+
/** Sets the load value over which the load is considered overload */
- public void setOverloadThreshold (int t) {
+ public void setOverloadThreshold(int t) {
m_overloadThreshold = t;
}
-
- public void setShowyOnlyIfOverload (Boolean o) {
+
+ public void setShowyOnlyIfOverload(Boolean o) {
m_showOnlyIfOverload = o;
}
-
+
public void setParentBgColor(Color c) {
m_parentBgColor = c;
}
// --- paint methods ---
-
+
/** get a color that corresponds to the current load */
private Color getLoadColor() {
if (getLoad() < m_overloadThreshold) {
return IMulticoreVisualizerConstants.COLOR_LOAD_LOADBAR_NORMAL;
- }
- else {
+ } else {
return IMulticoreVisualizerConstants.COLOR_LOAD_LOADBAR_OVERLOAD;
}
}
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
- public void paintContent(GC gc) {
+ public void paintContent(GC gc) {
if (!m_enabled) {
return;
}
-
- if (getLoad() < m_overloadThreshold && m_showOnlyIfOverload)
+
+ if (getLoad() < m_overloadThreshold && m_showOnlyIfOverload)
return;
-
+
// Show meter only if there is enough space
if (m_bounds.height < 30) {
return;
}
-
+
if (m_parentBgColor == null) {
// use default bg color
m_parentBgColor = IMulticoreVisualizerConstants.COLOR_LOAD_UNDERBAR_BG_DEFAULT;
@@ -163,11 +160,11 @@ public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObje
gc.drawRectangle(m_bounds);
// Create/display shorter bar over to show current load
- int x,y,w,h;
+ int x, y, w, h;
x = m_bounds.x;
y = (int) (m_bounds.y + m_bounds.height * ((100.0f - getLoad()) / 100.0f));
w = m_bounds.width;
- h = (int) (m_bounds.height - m_bounds.height * ((100.0f - getLoad()) / 100.0f));
+ h = (int) (m_bounds.height - m_bounds.height * ((100.0f - getLoad()) / 100.0f));
m_loadRect = new Rectangle(x, y, w, h);
gc.setBackground(getLoadColor());
@@ -175,7 +172,7 @@ public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObje
gc.drawRectangle(m_loadRect);
// Display high water-mark, if defined
- if ( m_highLoadWatermark != null) {
+ if (m_highLoadWatermark != null) {
x = m_bounds.x - 5;
y = (int) (m_bounds.y + m_bounds.height * ((100.0f - m_highLoadWatermark) / 100.0f));
w = m_bounds.width + 7;
@@ -200,15 +197,15 @@ public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObje
@Override
public void paintDecorations(GC gc) {
String load;
-
+
// display nothing if load meter is not enabled
- if (!m_enabled)
+ if (!m_enabled)
return;
- // "display only if overload" mode applicable?
- if (getLoad() < m_overloadThreshold && m_showOnlyIfOverload)
+ // "display only if overload" mode applicable?
+ if (getLoad() < m_overloadThreshold && m_showOnlyIfOverload)
return;
-
- // is there an actual value to display yet?
+
+ // is there an actual value to display yet?
if (isLoadDefined()) {
load = Integer.toString(getLoad());
}
@@ -216,7 +213,7 @@ public class MulticoreVisualizerLoadMeter extends MulticoreVisualizerGraphicObje
else {
load = "n/a"; //$NON-NLS-1$
}
-
+
// Show load text only if there is enough space
if (m_bounds.height > 50) {
// Display load in text above the load monitor bar
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerMarquee.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerMarquee.java
index 11e6a6b6d4..cddf1b6b4a 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerMarquee.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerMarquee.java
@@ -21,10 +21,8 @@ import org.eclipse.swt.graphics.GC;
/**
* MulticoreVisualizer "marquee" (selection box) object.
*/
-public class MulticoreVisualizerMarquee extends MulticoreVisualizerGraphicObject
-{
+public class MulticoreVisualizerMarquee extends MulticoreVisualizerGraphicObject {
// --- members ---
-
// --- constructors/destructors ---
@@ -32,32 +30,29 @@ public class MulticoreVisualizerMarquee extends MulticoreVisualizerGraphicObject
public MulticoreVisualizerMarquee() {
setVisible(false);
}
-
+
/** Dispose method */
@Override
public void dispose() {
super.dispose();
}
-
-
+
// --- Object methods ---
-
+
/** Returns string representation of element */
@Override
public String toString() {
- return "MarqueeGraphicObject[" + //$NON-NLS-1$
- m_bounds.x + "," + //$NON-NLS-1$
- m_bounds.y + "," + //$NON-NLS-1$
- m_bounds.width + "," + //$NON-NLS-1$
- m_bounds.height + "]"; //$NON-NLS-1$
+ return "MarqueeGraphicObject[" + //$NON-NLS-1$
+ m_bounds.x + "," + //$NON-NLS-1$
+ m_bounds.y + "," + //$NON-NLS-1$
+ m_bounds.width + "," + //$NON-NLS-1$
+ m_bounds.height + "]"; //$NON-NLS-1$
}
-
-
+
// --- accessors ---
-
-
+
// --- methods ---
-
+
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
public void paintContent(GC gc) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerSelectionFinder.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerSelectionFinder.java
index ad9b191188..591fda6cb2 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerSelectionFinder.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerSelectionFinder.java
@@ -32,15 +32,12 @@ import org.eclipse.cdt.visualizer.ui.util.SelectionUtils;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TreePath;
-
-/**
+/**
* Debug view tree walker that finds elements to select
* based on selection obtained from the multicore visualizer.
*/
@SuppressWarnings("restriction") // allow access to internal interfaces
-public class MulticoreVisualizerSelectionFinder
- extends DebugViewTreeWalker
-{
+public class MulticoreVisualizerSelectionFinder extends DebugViewTreeWalker {
// --- members ---
/** Selection item(s) we're currently looking for. */
@@ -49,12 +46,10 @@ public class MulticoreVisualizerSelectionFinder
/** Result we've found, if any. */
protected Set<Object> m_result = null;
-
// --- constructors/destructors ---
/** Constructor */
- public MulticoreVisualizerSelectionFinder()
- {
+ public MulticoreVisualizerSelectionFinder() {
}
/** Dispose method */
@@ -70,8 +65,7 @@ public class MulticoreVisualizerSelectionFinder
* (E.g. the IDMVMContext for a VisualizerThread.
* Returns null if no match is found.
*/
- public ISelection findSelection(ISelection selection)
- {
+ public ISelection findSelection(ISelection selection) {
m_selection = SelectionUtils.getSelectedObjects(selection);
m_result = new HashSet<Object>();
@@ -85,8 +79,7 @@ public class MulticoreVisualizerSelectionFinder
* and false if they can be skipped.
*/
@Override
- public boolean processElement(TreePath path)
- {
+ public boolean processElement(TreePath path) {
boolean result = true;
Object element = getElement(path);
@@ -96,28 +89,22 @@ public class MulticoreVisualizerSelectionFinder
int pid = getPID(context);
int tid = getTID(context);
- if (isThreadContext(context))
- {
+ if (isThreadContext(context)) {
for (Object o : m_selection) {
if (o instanceof VisualizerThread) {
VisualizerThread thread = (VisualizerThread) o;
// The Debug view model uses the GDB thread, to we need to use that one from the Visualizer model
- if (thread.getPID() == pid && thread.getGDBTID() == tid)
- {
+ if (thread.getPID() == pid && thread.getGDBTID() == tid) {
m_result.add(element);
}
}
}
- }
- else if (context instanceof IFrameDMContext)
- {
+ } else if (context instanceof IFrameDMContext) {
// FIXME: if we have frame[0] under a selected thread,
// select that stack frame instead of the thread
- if (isThreadFrameZero(context))
- {
+ if (isThreadFrameZero(context)) {
IDMVMContext threadContext = (IDMVMContext) path.getParentPath().getLastSegment();
- if (m_result.contains(threadContext))
- {
+ if (m_result.contains(threadContext)) {
m_result.remove(threadContext);
m_result.add(element);
}
@@ -127,49 +114,40 @@ public class MulticoreVisualizerSelectionFinder
return result;
}
-
+
/** Returns PID for specified debug context. */
- public static int getPID(IDMContext context)
- {
- IMIProcessDMContext processContext =
- DMContexts.getAncestorOfType(context, IMIProcessDMContext.class);
- int pid = (processContext == null) ? 0 :
- Integer.parseInt(processContext.getProcId());
+ public static int getPID(IDMContext context) {
+ IMIProcessDMContext processContext = DMContexts.getAncestorOfType(context, IMIProcessDMContext.class);
+ int pid = (processContext == null) ? 0 : Integer.parseInt(processContext.getProcId());
return pid;
}
/** Returns TID for specified debug context. */
- public static int getTID(IDMContext context)
- {
- IMIExecutionDMContext execContext =
- DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
- int tid = 0;
- if (execContext != null) {
- try {
- tid = Integer.parseInt(execContext.getThreadId());
- } catch (NumberFormatException e) {
- // Unable to resolve thread id
- assert false : "The thread id does not convert to an integer: " + execContext.getThreadId(); //$NON-NLS-1$
- }
- }
+ public static int getTID(IDMContext context) {
+ IMIExecutionDMContext execContext = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
+ int tid = 0;
+ if (execContext != null) {
+ try {
+ tid = Integer.parseInt(execContext.getThreadId());
+ } catch (NumberFormatException e) {
+ // Unable to resolve thread id
+ assert false : "The thread id does not convert to an integer: " + execContext.getThreadId(); //$NON-NLS-1$
+ }
+ }
return tid;
}
/** Returns true if specified context represents a thread. */
- public static boolean isThreadContext(IDMContext context)
- {
+ public static boolean isThreadContext(IDMContext context) {
// TODO: is there a more elegant way to express this?
- return
- context instanceof IMIExecutionDMContext &&
- context.getParents().length >= 2 &&
- (context.getParents()[0] instanceof IThreadDMContext ||
- context.getParents()[1] instanceof IThreadDMContext);
+ return context instanceof IMIExecutionDMContext && context.getParents().length >= 2
+ && (context.getParents()[0] instanceof IThreadDMContext
+ || context.getParents()[1] instanceof IThreadDMContext);
}
-
+
/** Returns true if context represents the topmost (0th) frame under a thread. */
- public static boolean isThreadFrameZero(IDMContext context)
- {
+ public static boolean isThreadFrameZero(IDMContext context) {
// TODO: is there a more elegant way to express this?
String value = context.toString();
return (value != null && value.endsWith(".frame[0]")); //$NON-NLS-1$
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerStatusBar.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerStatusBar.java
index 9c7147a107..7a8ef5ef95 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerStatusBar.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerStatusBar.java
@@ -21,16 +21,15 @@ import org.eclipse.swt.graphics.GC;
public class MulticoreVisualizerStatusBar extends MulticoreVisualizerGraphicObject {
// --- members ---
-
+
/** message to display in status bar */
- protected String m_statusMessage = null;
-
+ protected String m_statusMessage = null;
+
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerStatusBar() {
}
-
/** Dispose method */
@Override
@@ -39,22 +38,21 @@ public class MulticoreVisualizerStatusBar extends MulticoreVisualizerGraphicObje
m_statusMessage = null;
}
-
// --- accessors ---
-
- public void setMessage (String message) {
+
+ public void setMessage(String message) {
m_statusMessage = message;
}
// --- paint methods ---
-
+
/** Invoked to allow element to paint itself on the viewer canvas */
@Override
public void paintContent(GC gc) {
-
+
if (m_statusMessage == null)
return;
-
+
// Display message text
gc.setForeground(IMulticoreVisualizerConstants.COLOR_STATUS_BAR_TEXT);
int tx = m_bounds.x;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerThread.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerThread.java
index edea6a01cc..30321422a6 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerThread.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerThread.java
@@ -25,60 +25,55 @@ import org.eclipse.swt.graphics.GC;
/**
* MulticoreVisualizer Thread object.
*/
-public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
-{
+public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject {
// --- constants ---
-
+
/** Thread "pixie" spot width/height */
public static final int THREAD_SPOT_SIZE = 18;
-
+
/** Minimum containing object size to allow thread to draw itself. */
public static final int MIN_PARENT_WIDTH = THREAD_SPOT_SIZE + 4;
-
// --- members ---
-
+
/** Parent CPU. */
protected MulticoreVisualizerCore m_core;
-
+
/** Visualizer model thread. */
protected VisualizerThread m_thread;
-
+
/** Whether this thread is part of a currently selected process. */
protected boolean m_processSelected = true;
-
// --- constructors/destructors ---
-
+
/** Constructor */
public MulticoreVisualizerThread(MulticoreVisualizerCore core, VisualizerThread thread) {
m_core = core;
m_thread = thread;
}
-
+
/** Dispose method */
@Override
public void dispose() {
super.dispose();
m_thread = null;
}
-
-
+
// --- accessors ---
-
+
/** Gets parent Core. */
public MulticoreVisualizerCore getCore() {
return m_core;
}
-
+
/** Sets parent Core. */
public void setCore(MulticoreVisualizerCore core) {
m_core = core;
}
-
+
/** Gets thread model object. */
- public VisualizerThread getThread()
- {
+ public VisualizerThread getThread() {
return m_thread;
}
@@ -91,27 +86,24 @@ public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
public int getTID() {
return m_thread.getTID();
}
-
+
/** Gets thread state. */
public VisualizerExecutionState getState() {
return m_thread.getState();
}
/** Sets whether thread's process is selected. */
- public void setProcessSelected(boolean processSelected)
- {
+ public void setProcessSelected(boolean processSelected) {
m_processSelected = processSelected;
}
-
+
/** Gets whether thread's process is selected. */
- public boolean getProcessSelected()
- {
+ public boolean getProcessSelected() {
return m_processSelected;
}
-
-
+
// --- methods ---
-
+
/** Gets thread color based on current state. */
protected Color getThreadStateColor() {
switch (m_thread.getState()) {
@@ -124,11 +116,11 @@ public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
case EXITED:
return IMulticoreVisualizerConstants.COLOR_EXITED_THREAD;
}
-
+
assert false;
return Colors.BLACK;
}
-
+
// --- paint methods ---
/** Invoked to allow element to paint itself on the viewer canvas */
@@ -136,19 +128,19 @@ public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
public void paintContent(GC gc) {
if (m_core.getWidth() >= MIN_PARENT_WIDTH) {
gc.setBackground(getThreadStateColor());
-
+
int x = m_bounds.x;
int y = m_bounds.y;
int w = THREAD_SPOT_SIZE;
int h = THREAD_SPOT_SIZE;
-
+
// draw an alpha-shaded "pixie" light for each thread
int step1 = 3;
int step2 = 6;
int alpha1 = 128;
int alpha2 = 196;
int alpha3 = 255;
- if (! m_processSelected) {
+ if (!m_processSelected) {
alpha1 -= 64;
alpha2 -= 64;
alpha3 -= 64;
@@ -156,9 +148,9 @@ public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
gc.setAlpha(alpha1);
gc.fillOval(x, y, w, h);
gc.setAlpha(alpha2);
- gc.fillOval(x+step1, y+step1, w-step1*2, h-step1*2);
+ gc.fillOval(x + step1, y + step1, w - step1 * 2, h - step1 * 2);
gc.setAlpha(alpha3);
- gc.fillOval(x+step2, y+step2, w-step2*2, h-step2*2);
+ gc.fillOval(x + step2, y + step2, w - step2 * 2, h - step2 * 2);
gc.setAlpha(255);
// special case: for the "process" thread, draw an enclosing circle
@@ -167,27 +159,26 @@ public class MulticoreVisualizerThread extends MulticoreVisualizerGraphicObject
// in the case of drawOval because that method
// adds a pixel to each value for some reason
gc.setForeground(IMulticoreVisualizerConstants.COLOR_PROCESS_THREAD);
- gc.drawOval(x,y,w-1,h-1);
+ gc.drawOval(x, y, w - 1, h - 1);
}
// draw text annotations
gc.setBackground(IMulticoreVisualizerConstants.COLOR_THREAD_TEXT_BG);
gc.setForeground(IMulticoreVisualizerConstants.COLOR_THREAD_TEXT_FG);
-
+
// if it has an associated debugger, add a marker
// (for now, every thread is debugged.)
-// GUIUtils.drawText(gc, "D", x+w, y-8); //$NON-NLS-1$
-
+ // GUIUtils.drawText(gc, "D", x+w, y-8); //$NON-NLS-1$
+
// draw TID, in format "<gdb tid> - ( <os tid> )
String displayTID = m_thread.getGDBTID() + " - ( " + m_thread.getTID() + " )"; //$NON-NLS-1$ //$NON-NLS-2$
GUIUtils.drawText(gc, displayTID, x + w + 4, y + 2);
-
+
// draw selection marker, if any
- if (m_selected)
- {
+ if (m_selected) {
gc.setForeground(IMulticoreVisualizerConstants.COLOR_SELECTED);
- gc.drawOval(x-2,y-2,w+3,h+3);
- gc.drawOval(x-3,y-3,w+5,h+5);
+ gc.drawOval(x - 2, y - 2, w + 3, h + 3);
+ gc.drawOval(x - 3, y - 3, w + 5, h + 5);
}
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFDebugModel.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFDebugModel.java
index 7a385d4b3c..d9a9ee571e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFDebugModel.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFDebugModel.java
@@ -49,14 +49,13 @@ import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.ILoadInfo;
import org.eclipse.cdt.dsf.gdb.service.IGDBProcesses.IGdbThreadDMData;
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
-
/** Debugger state information accessors.</br>
- *
+ *
* NOTE: The methods on this class perform asynchronous operations
* and the result is reported back via the received request monitor
*/
public class DSFDebugModel implements IDSFTargetDataProxy {
-
+
// --- static methods ---
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
@@ -68,7 +67,8 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
return;
}
- IHardwareTargetDMContext contextToUse = DMContexts.getAncestorOfType(controlService.getContext(), IHardwareTargetDMContext.class);
+ IHardwareTargetDMContext contextToUse = DMContexts.getAncestorOfType(controlService.getContext(),
+ IHardwareTargetDMContext.class);
hwService.getCPUs(contextToUse, new ImmediateDataRequestMonitor<ICPUDMContext[]>(rm) {
@Override
protected void handleCompleted() {
@@ -82,21 +82,19 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
rm.done(cpuContexts);
}
});
- }
+ }
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getLoad(DSFSessionState sessionState,
- final IDMContext context,
- final DataRequestMonitor<ILoadInfo> rm)
- {
+ public void getLoad(DSFSessionState sessionState, final IDMContext context,
+ final DataRequestMonitor<ILoadInfo> rm) {
IGDBHardwareAndOS2 hwService = sessionState.getService(IGDBHardwareAndOS2.class);
if (hwService == null) {
rm.setData(null);
rm.done();
return;
}
-
+
hwService.getLoadInfo(context, rm);
}
@@ -108,10 +106,8 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getCores(DSFSessionState sessionState,
- final ICPUDMContext cpuContext,
- final DataRequestMonitor<ICoreDMContext[]> rm)
- {
+ public void getCores(DSFSessionState sessionState, final ICPUDMContext cpuContext,
+ final DataRequestMonitor<ICoreDMContext[]> rm) {
IGDBHardwareAndOS hwService = sessionState.getService(IGDBHardwareAndOS.class);
if (hwService == null) {
rm.done(new ICoreDMContext[0]);
@@ -124,132 +120,123 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
// use the hardware context (so we get all available cores)
ICommandControlService controlService = sessionState.getService(ICommandControlService.class);
targetContextToUse = DMContexts.getAncestorOfType(controlService.getContext(),
- IHardwareTargetDMContext.class);
+ IHardwareTargetDMContext.class);
}
-
- hwService.getCores(targetContextToUse,
- new ImmediateDataRequestMonitor<ICoreDMContext[]>() {
- @Override
- protected void handleCompleted() {
- ICoreDMContext[] coreContexts = getData();
- if (!isSuccess() || coreContexts == null || coreContexts.length < 1) {
- // Unable to get any core data
- rm.done(new ICoreDMContext[0]);
- } else {
- rm.done(coreContexts);
- }
+ hwService.getCores(targetContextToUse, new ImmediateDataRequestMonitor<ICoreDMContext[]>() {
+ @Override
+ protected void handleCompleted() {
+ ICoreDMContext[] coreContexts = getData();
+
+ if (!isSuccess() || coreContexts == null || coreContexts.length < 1) {
+ // Unable to get any core data
+ rm.done(new ICoreDMContext[0]);
+ } else {
+ rm.done(coreContexts);
}
}
- );
+ });
}
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getThreads(DSFSessionState sessionState,
- final ICPUDMContext cpuContext,
- final ICoreDMContext coreContext,
- final DataRequestMonitor<IDMContext[]> rm)
- {
+ public void getThreads(DSFSessionState sessionState, final ICPUDMContext cpuContext,
+ final ICoreDMContext coreContext, final DataRequestMonitor<IDMContext[]> rm) {
// Get control DM context associated with the core
// Process/Thread Info service (GDBProcesses_X_Y_Z)
final IProcesses procService = sessionState.getService(IProcesses.class);
// Debugger control context (GDBControlDMContext)
- ICommandControlDMContext controlContext =
- DMContexts.getAncestorOfType(coreContext, ICommandControlDMContext.class);
+ ICommandControlDMContext controlContext = DMContexts.getAncestorOfType(coreContext,
+ ICommandControlDMContext.class);
if (procService == null || controlContext == null) {
rm.done(new IDMContext[0]);
return;
}
-
+
// Get debugged processes
- procService.getProcessesBeingDebugged(controlContext,
- new ImmediateDataRequestMonitor<IDMContext[]>() {
-
- @Override
- protected void handleCompleted() {
- IDMContext[] processContexts = getData();
-
- if (!isSuccess() || processContexts == null || processContexts.length < 1) {
- // Unable to get any process data for this core
- // Is this an issue? A core may have no processes/threads, right?
- rm.done(new IDMContext[0]);
- return;
- }
-
- final ArrayList<IDMContext> threadContextsList = new ArrayList<>();
-
- final ImmediateCountingRequestMonitor crm1 = new ImmediateCountingRequestMonitor(
+ procService.getProcessesBeingDebugged(controlContext, new ImmediateDataRequestMonitor<IDMContext[]>() {
+
+ @Override
+ protected void handleCompleted() {
+ IDMContext[] processContexts = getData();
+
+ if (!isSuccess() || processContexts == null || processContexts.length < 1) {
+ // Unable to get any process data for this core
+ // Is this an issue? A core may have no processes/threads, right?
+ rm.done(new IDMContext[0]);
+ return;
+ }
+
+ final ArrayList<IDMContext> threadContextsList = new ArrayList<>();
+
+ final ImmediateCountingRequestMonitor crm1 = new ImmediateCountingRequestMonitor(
new ImmediateRequestMonitor() {
@Override
protected void handleCompleted() {
- IDMContext[] threadContexts = threadContextsList.toArray(new IDMContext[threadContextsList.size()]);
+ IDMContext[] threadContexts = threadContextsList
+ .toArray(new IDMContext[threadContextsList.size()]);
rm.done(threadContexts);
}
});
- crm1.setDoneCount(processContexts.length);
-
- for (IDMContext processContext : processContexts) {
- IContainerDMContext containerContext =
- DMContexts.getAncestorOfType(processContext, IContainerDMContext.class);
-
- procService.getProcessesBeingDebugged(containerContext,
+ crm1.setDoneCount(processContexts.length);
+
+ for (IDMContext processContext : processContexts) {
+ IContainerDMContext containerContext = DMContexts.getAncestorOfType(processContext,
+ IContainerDMContext.class);
+
+ procService.getProcessesBeingDebugged(containerContext,
new ImmediateDataRequestMonitor<IDMContext[]>(crm1) {
@Override
protected void handleCompleted() {
IDMContext[] threadContexts = getData();
-
+
if (!isSuccess() || threadContexts == null || threadContexts.length < 1) {
crm1.done();
return;
}
-
- final ImmediateCountingRequestMonitor crm2 = new ImmediateCountingRequestMonitor(crm1);
+
+ final ImmediateCountingRequestMonitor crm2 = new ImmediateCountingRequestMonitor(
+ crm1);
crm2.setDoneCount(threadContexts.length);
-
+
for (final IDMContext threadContext : threadContexts) {
- IThreadDMContext threadContext2 =
- DMContexts.getAncestorOfType(threadContext, IThreadDMContext.class);
-
- procService.getExecutionData(threadContext2,
- new ImmediateDataRequestMonitor<IThreadDMData>(crm2) {
-
- @Override
- protected void handleCompleted() {
- IThreadDMData data = getData();
-
- // Check whether we know about cores
- if (data != null && data instanceof IGdbThreadDMData) {
- String[] cores = ((IGdbThreadDMData)data).getCores();
- if (cores != null && cores.length == 1) {
- if (coreContext.getId().equals(cores[0])) {
- // This thread belongs to the proper core
- threadContextsList.add(threadContext);
+ IThreadDMContext threadContext2 = DMContexts.getAncestorOfType(threadContext,
+ IThreadDMContext.class);
+
+ procService.getExecutionData(threadContext2,
+ new ImmediateDataRequestMonitor<IThreadDMData>(crm2) {
+
+ @Override
+ protected void handleCompleted() {
+ IThreadDMData data = getData();
+
+ // Check whether we know about cores
+ if (data != null && data instanceof IGdbThreadDMData) {
+ String[] cores = ((IGdbThreadDMData) data).getCores();
+ if (cores != null && cores.length == 1) {
+ if (coreContext.getId().equals(cores[0])) {
+ // This thread belongs to the proper core
+ threadContextsList.add(threadContext);
+ }
}
}
+ crm2.done();
}
- crm2.done();
- }
- }
- );
+ });
}
}
- }
- );
- }
+ });
}
}
- );
+ });
}
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getThreadData(DSFSessionState sessionState,
- final ICPUDMContext cpuContext,
- final ICoreDMContext coreContext,
- final IMIExecutionDMContext execContext, final DataRequestMonitor<IThreadDMData> rm)
- {
+ public void getThreadData(DSFSessionState sessionState, final ICPUDMContext cpuContext,
+ final ICoreDMContext coreContext, final IMIExecutionDMContext execContext,
+ final DataRequestMonitor<IThreadDMData> rm) {
IProcesses procService = sessionState.getService(IProcesses.class);
if (procService == null) {
@@ -264,7 +251,8 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getTopFrameData(final DSFSessionState sessionState, final IMIExecutionDMContext execContext, final DataRequestMonitor<IFrameDMData> rm) {
+ public void getTopFrameData(final DSFSessionState sessionState, final IMIExecutionDMContext execContext,
+ final DataRequestMonitor<IFrameDMData> rm) {
final IFrameDMData nullFrameData = null;
// For a suspended thread, retrieve the current stack
final IStack stackService = sessionState.getService(IStack.class);
@@ -274,13 +262,14 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
protected void handleCompleted() {
IFrameDMContext targetFrameContext = isSuccess() ? getData() : null;
if (targetFrameContext != null) {
- stackService.getFrameData(targetFrameContext, new ImmediateDataRequestMonitor<IFrameDMData>(null) {
- @Override
- protected void handleCompleted() {
- IFrameDMData frameData = isSuccess() ? getData() : null;
- rm.done(frameData);
- }
- });
+ stackService.getFrameData(targetFrameContext,
+ new ImmediateDataRequestMonitor<IFrameDMData>(null) {
+ @Override
+ protected void handleCompleted() {
+ IFrameDMData frameData = isSuccess() ? getData() : null;
+ rm.done(frameData);
+ }
+ });
} else {
rm.done(nullFrameData);
}
@@ -293,8 +282,9 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
@Override
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
- public void getThreadExecutionState(final DSFSessionState sessionState, final ICPUDMContext cpuContext, final ICoreDMContext coreContext,
- final IMIExecutionDMContext execContext, final IThreadDMData threadData, final DataRequestMonitor<VisualizerExecutionState> rm) {
+ public void getThreadExecutionState(final DSFSessionState sessionState, final ICPUDMContext cpuContext,
+ final ICoreDMContext coreContext, final IMIExecutionDMContext execContext, final IThreadDMData threadData,
+ final DataRequestMonitor<VisualizerExecutionState> rm) {
IRunControl runControl = sessionState.getService(IRunControl.class);
if (runControl == null) {
@@ -311,7 +301,7 @@ public class DSFDebugModel implements IDSFTargetDataProxy {
}
}
- /** For a suspended thread, let's see why it is suspended,
+ /** For a suspended thread, let's see why it is suspended,
* to find out if the thread is crashed */
@ConfinedToDsfExecutor("sessionState.getDsfSession().getExecutor()")
private static void getThreadSuspendReason(DSFSessionState sessionState, IMIExecutionDMContext execContext,
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFSessionState.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFSessionState.java
index 7709ed671e..cff6e9ddfb 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFSessionState.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DSFSessionState.java
@@ -26,11 +26,10 @@ import org.eclipse.cdt.dsf.service.DsfSession;
/**
* DSF session state object.
- *
+ *
* Encapsulates and manages DsfSession we're currently tracking.
*/
-public class DSFSessionState
-{
+public class DSFSessionState {
// --- members ---
/** Current session ID. */
@@ -38,48 +37,43 @@ public class DSFSessionState
/** Current set of session event listeners. */
protected List<Object> m_sessionListeners;
-
+
/** Services tracker, used to access services. */
protected DsfServicesTracker m_servicesTracker;
// --- constructors/destructors ---
-
+
public DSFSessionState(String sessionId) {
m_sessionId = sessionId;
m_sessionListeners = new ArrayList<Object>();
m_servicesTracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(), m_sessionId);
}
-
+
/** Dispose method. */
- public void dispose()
- {
+ public void dispose() {
if (m_sessionId != null) {
removeAllServiceEventListeners();
m_sessionId = null;
m_sessionListeners = null;
}
-
+
if (m_servicesTracker != null) {
- m_servicesTracker.dispose();
+ m_servicesTracker.dispose();
m_servicesTracker = null;
}
}
-
-
+
// --- accessors ---
-
+
/** Returns session ID. */
- public String getSessionID()
- {
+ public String getSessionID() {
return m_sessionId;
}
-
-
+
// --- listener management ---
/** Adds a service event listener. */
- public void addServiceEventListener(Object listener)
- {
+ public void addServiceEventListener(Object listener) {
final Object listener_f = listener;
final DsfSession session_f = getDsfSession();
if (session_f != null) {
@@ -91,15 +85,14 @@ public class DSFSessionState
m_sessionListeners.add(listener_f);
}
});
- } catch (RejectedExecutionException e) {
- // Session is shut down.
- }
+ } catch (RejectedExecutionException e) {
+ // Session is shut down.
+ }
}
}
-
+
/** Removes a service event listener. */
- public void removeServiceEventListener(Object listener)
- {
+ public void removeServiceEventListener(Object listener) {
final Object listener_f = listener;
final DsfSession session_f = getDsfSession();
if (session_f != null) {
@@ -113,15 +106,14 @@ public class DSFSessionState
}
}
});
- } catch (RejectedExecutionException e) {
- // Session is shut down.
- }
+ } catch (RejectedExecutionException e) {
+ // Session is shut down.
+ }
}
}
-
+
/** Removes all service event listeners. */
- public void removeAllServiceEventListeners()
- {
+ public void removeAllServiceEventListeners() {
final DsfSession session_f = getDsfSession();
if (session_f != null) {
try {
@@ -136,38 +128,34 @@ public class DSFSessionState
}
}
});
- } catch (RejectedExecutionException e) {
- // Session is shut down.
- }
+ } catch (RejectedExecutionException e) {
+ // Session is shut down.
+ }
}
}
-
-
+
// --- methods ---
-
+
/** Gets current DsfSession, if it's still active. */
protected DsfSession getDsfSession() {
return DsfSession.getSession(m_sessionId);
}
-
+
/** Executes DsfRunnable. */
- public void execute(DsfRunnable runnable)
- {
+ public void execute(DsfRunnable runnable) {
try {
DsfSession session = getDsfSession();
if (session == null) {
// TODO: log this?
- }
- else {
+ } else {
session.getExecutor().execute(runnable);
}
- }
- catch (RejectedExecutionException e) {
+ } catch (RejectedExecutionException e) {
// TODO: log or handle this properly.
System.err.println("DSFSessionState.execute(): session rejected execution request."); //$NON-NLS-1$
}
}
-
+
/** Gets service of the specified type. */
@ConfinedToDsfExecutor("getDsfSession().getExecutor()")
public <V> V getService(Class<V> serviceClass) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewTreeWalker.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewTreeWalker.java
index 40545a00a8..2e298f5e97 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewTreeWalker.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewTreeWalker.java
@@ -25,49 +25,43 @@ import org.eclipse.swt.widgets.TreeItem;
/**
* Base class that walks Debug View tree elements.
- *
+ *
* Intended to be subclassed by code that needs to walk the content
* of the Debug View (e.g. to find elements or construct model deltas).
- *
+ *
* In the simplest case, a derived class should only need to
* implement processElement(), and one should then only need
* to call walk() to walk the tree and get an appropriate delta.
*/
@SuppressWarnings("restriction") // allow access to internal classes
-public class DebugViewTreeWalker
-{
+public class DebugViewTreeWalker {
// --- members ---
/** Debug View tree viewer */
TreeModelViewer m_viewer = null;
-
// --- constructors/destructors ---
/** Constructor */
- public DebugViewTreeWalker()
- {
+ public DebugViewTreeWalker() {
m_viewer = DebugViewUtils.getDebugViewer();
}
-
+
/** Dispose method */
- public void dispose()
- {
+ public void dispose() {
m_viewer = null;
}
-
// --- methods ---
-
+
/** Walks the Debug View's tree,
* calling processElement for each element.
*/
- public void walk()
- {
+ public void walk() {
TreePath roots[] = getRootPaths();
- for(TreePath path : roots) {
- walk(path);
- }
+ for (TreePath path : roots) {
+ walk(path);
+ }
}
/**
@@ -75,25 +69,25 @@ public class DebugViewTreeWalker
* This method should invoke processElement on the element
* itself, and walkChildren() to process the children of the element.
*/
- public void walk(TreePath path)
- {
- if (path == null) return;
+ public void walk(TreePath path) {
+ if (path == null)
+ return;
boolean processChildren = processElement(path);
if (processChildren) {
walkChildren(path);
}
}
-
+
/** Walks children of the specified element.
* This method should invoke walk() to process
* each child element.
*/
- public void walkChildren(TreePath path)
- {
- if (path == null) return;
+ public void walkChildren(TreePath path) {
+ if (path == null)
+ return;
int children = m_viewer.getChildCount(path);
if (children > 0) {
- for (int i=0; i<children; ++i) {
+ for (int i = 0; i < children; ++i) {
Object child = m_viewer.getChildElement(path, i);
if (child != null) {
TreePath childPath = path.createChildPath(child);
@@ -102,35 +96,32 @@ public class DebugViewTreeWalker
}
}
}
-
+
/** Processes an element of the tree view.
* Returns true if children of this element should be processed,
* and false if they can be skipped.
*/
- public boolean processElement(TreePath path)
- {
+ public boolean processElement(TreePath path) {
return true;
}
-
// --- tree path utilities ---
- /**
- * Gets tree path of root element(s).
- * Note: each returned path is the root of a distinct debug session
+ /**
+ * Gets tree path of root element(s).
+ * Note: each returned path is the root of a distinct debug session
*/
- public TreePath[] getRootPaths()
- {
+ public TreePath[] getRootPaths() {
List<TreePath> paths = new ArrayList<TreePath>();
-
+
if (m_viewer != null) {
Tree tree = (Tree) m_viewer.getControl();
TreeItem[] items = tree.getItems();
-
+
for (TreeItem item : items) {
Object root = (item == null) ? null : item.getData();
if (root != null) {
- paths.add(new TreePath(new Object[] {root}));
+ paths.add(new TreePath(new Object[] { root }));
}
}
}
@@ -138,14 +129,12 @@ public class DebugViewTreeWalker
}
/** Gets tree path for child element. */
- public static TreePath getChildPath(TreePath path, Object childElement)
- {
+ public static TreePath getChildPath(TreePath path, Object childElement) {
return path.createChildPath(childElement);
}
-
+
/** Gets element from path. */
- public static Object getElement(TreePath path)
- {
+ public static Object getElement(TreePath path) {
return (path == null) ? null : path.getLastSegment();
}
} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewUtils.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewUtils.java
index 29f4685350..100ea8841e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewUtils.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/DebugViewUtils.java
@@ -25,68 +25,66 @@ import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
-
/** Assorted utilities for interacting with the Debug View (aka LaunchView). */
@SuppressWarnings("restriction") // allow access to internal classes
-public class DebugViewUtils
-{
+public class DebugViewUtils {
// --- static utility methods ---
-
- /**
- * Returns Debug View (a.k.a. LaunchView).
- */
- public static LaunchView getDebugView() {
+
+ /**
+ * Returns Debug View (a.k.a. LaunchView).
+ */
+ public static LaunchView getDebugView() {
return (LaunchView) getViewWithID(IDebugUIConstants.ID_DEBUG_VIEW);
- }
+ }
+
+ /**
+ * Returns tree model viewer for Debug View (a.k.a. LaunchView).
+ */
+ public static TreeModelViewer getDebugViewer() {
+ LaunchView debugView = getDebugView();
+ TreeModelViewer viewer = (debugView == null) ? null : (TreeModelViewer) debugView.getViewer();
+ return viewer;
+ }
- /**
- * Returns tree model viewer for Debug View (a.k.a. LaunchView).
- */
- public static TreeModelViewer getDebugViewer() {
- LaunchView debugView = getDebugView();
- TreeModelViewer viewer = (debugView == null) ? null : (TreeModelViewer) debugView.getViewer();
- return viewer;
- }
+ /** Gets workbench view (if any) with specified ID. */
+ public static IViewPart getViewWithID(String viewID) {
+ final String viewID_f = viewID;
+ RunnableWithResult<IViewPart> runnable = new RunnableWithResult<IViewPart>() {
+ @Override
+ public IViewPart call() {
+ IViewPart view = null;
+ IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ if (activePage != null) {
+ view = (viewID_f == null) ? null : activePage.findView(viewID_f);
+ }
+ return view;
+ }
+ };
+ // run on UI thread, wait for result
+ GUIUtils.execAndWait(runnable);
+ IViewPart result = runnable.getResult();
+ return result;
+ }
- /** Gets workbench view (if any) with specified ID. */
- public static IViewPart getViewWithID(String viewID) {
- final String viewID_f = viewID;
- RunnableWithResult<IViewPart> runnable =
- new RunnableWithResult<IViewPart>() {
- @Override
- public IViewPart call() {
- IViewPart view = null;
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- view = (viewID_f == null) ? null : activePage.findView(viewID_f);
- }
- return view;
- }
- };
- // run on UI thread, wait for result
- GUIUtils.execAndWait(runnable);
- IViewPart result = runnable.getResult();
- return result;
- }
-
- /**
- * Sets debug view selection.
- * Specified selection is an IStructuredSelection containing a flat list
- * of the model objects (that is, _not_ the tree view nodes) to be selected.
- */
- public static boolean setDebugViewSelection(ISelection selection)
- {
+ /**
+ * Sets debug view selection.
+ * Specified selection is an IStructuredSelection containing a flat list
+ * of the model objects (that is, _not_ the tree view nodes) to be selected.
+ */
+ public static boolean setDebugViewSelection(ISelection selection) {
TreeModelViewer viewer = DebugViewUtils.getDebugViewer();
- if (viewer == null || selection == null) return false;
+ if (viewer == null || selection == null)
+ return false;
return viewer.trySelection(selection, true, true);
- }
-
- /**
- * Returns the debug view selection.
- */
- public static ISelection getDebugViewSelection() {
- TreeModelViewer viewer = DebugViewUtils.getDebugViewer();
- if (viewer == null) return null;
- return viewer.getSelection();
- }
+ }
+
+ /**
+ * Returns the debug view selection.
+ */
+ public static ISelection getDebugViewSelection() {
+ TreeModelViewer viewer = DebugViewUtils.getDebugViewer();
+ if (viewer == null)
+ return null;
+ return viewer.getSelection();
+ }
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/IDSFTargetDataProxy.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/IDSFTargetDataProxy.java
index e8c6e2d949..2e2df13cd6 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/IDSFTargetDataProxy.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/IDSFTargetDataProxy.java
@@ -36,21 +36,25 @@ public interface IDSFTargetDataProxy {
public void getCores(DSFSessionState sessionState, DataRequestMonitor<ICoreDMContext[]> rm);
/** Requests list of Cores */
- public void getCores(DSFSessionState sessionState, ICPUDMContext cpuContext, DataRequestMonitor<ICoreDMContext[]> rm);
+ public void getCores(DSFSessionState sessionState, ICPUDMContext cpuContext,
+ DataRequestMonitor<ICoreDMContext[]> rm);
/** Requests list of Threads Related to the specified CPU and Core */
- public void getThreads(DSFSessionState sessionState, ICPUDMContext cpuContext, ICoreDMContext coreContext, DataRequestMonitor<IDMContext[]> rm);
+ public void getThreads(DSFSessionState sessionState, ICPUDMContext cpuContext, ICoreDMContext coreContext,
+ DataRequestMonitor<IDMContext[]> rm);
/** Requests data for the thread associated to the give execution context */
- public void getThreadData(DSFSessionState sessionState, ICPUDMContext cpuContext, ICoreDMContext coreContext, IMIExecutionDMContext execContext,
- DataRequestMonitor<IThreadDMData> rm);
+ public void getThreadData(DSFSessionState sessionState, ICPUDMContext cpuContext, ICoreDMContext coreContext,
+ IMIExecutionDMContext execContext, DataRequestMonitor<IThreadDMData> rm);
/** Requests frame data for a given thread */
- public void getTopFrameData(DSFSessionState sessionState, IMIExecutionDMContext execContext, DataRequestMonitor<IFrameDMData> rm);
+ public void getTopFrameData(DSFSessionState sessionState, IMIExecutionDMContext execContext,
+ DataRequestMonitor<IFrameDMData> rm);
/** Requests execution state of a thread. */
- public void getThreadExecutionState(DSFSessionState sessionState, ICPUDMContext cpuContext, ICoreDMContext coreContext,
- IMIExecutionDMContext execContext, IThreadDMData threadData, DataRequestMonitor<VisualizerExecutionState> rm);
+ public void getThreadExecutionState(DSFSessionState sessionState, ICPUDMContext cpuContext,
+ ICoreDMContext coreContext, IMIExecutionDMContext execContext, IThreadDMData threadData,
+ DataRequestMonitor<VisualizerExecutionState> rm);
/** Request load information for a single CPU or core */
public void getLoad(DSFSessionState sessionState, IDMContext context, DataRequestMonitor<ILoadInfo> rm);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/MementoUtils.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/MementoUtils.java
index d1e2977672..927ed963c9 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/MementoUtils.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/MementoUtils.java
@@ -44,7 +44,6 @@ public class MementoUtils {
protected static final String ELEMENT_TAGNAME = "elem"; //$NON-NLS-1$
protected static final String ATTRIBUTE_KEY = "key"; //$NON-NLS-1$
protected static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
-
/** Returns a XML memento, that encodes a single String parameter */
public static String encodeStringIntoMemento(String str) {
@@ -57,7 +56,7 @@ public class MementoUtils {
public static String decodeStringFromMemento(String memento) {
return decodeListFromMemento(memento).get(0);
}
-
+
/** Returns a XML memento, that encodes a Map of Strings */
public static String encodeMapIntoMemento(Map<String, String> keyPairValues) {
String returnValue = null;
@@ -96,8 +95,7 @@ public class MementoUtils {
}
return returnValue;
}
-
-
+
/** Returns a Map of Strings, decoded from a XML memento */
public static Map<String, String> decodeMapFromMemento(String memento) {
Map<String, String> keyPairValues = new HashMap<>();
@@ -116,22 +114,20 @@ public class MementoUtils {
NamedNodeMap nodeMap = elem.getAttributes();
String key = null;
String value = null;
- for(int idx = 0; idx < nodeMap.getLength(); idx++) {
+ for (int idx = 0; idx < nodeMap.getLength(); idx++) {
Node attrNode = nodeMap.item(idx);
if (attrNode.getNodeType() == Node.ATTRIBUTE_NODE) {
Attr attr = (Attr) attrNode;
if (attr.getName().equals(ATTRIBUTE_KEY)) {
key = attr.getValue();
- }
- else if (attr.getName().equals(ATTRIBUTE_VALUE)) {
+ } else if (attr.getName().equals(ATTRIBUTE_VALUE)) {
value = attr.getValue();
}
}
}
if (key != null && value != null) {
keyPairValues.put(key, value);
- }
- else {
+ } else {
throw new Exception();
}
}
@@ -142,7 +138,6 @@ public class MementoUtils {
return keyPairValues;
}
-
/** Returns a XML memento, that encodes a List of Strings */
public static String encodeListIntoMemento(List<String> labels) {
String returnValue = null;
@@ -198,8 +193,7 @@ public class MementoUtils {
String value = elem.getAttribute(ATTRIBUTE_VALUE);
if (value != null) {
list.add(value);
- }
- else {
+ } else {
throw new Exception();
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
index 813450241f..878dfc4046 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
@@ -15,7 +15,6 @@
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.utils;
-
import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -26,46 +25,45 @@ import org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.MulticoreVisualiz
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * This class manages one or more PersistentParameter, PersistentListParameter,
- * PersistentMapParameter objects, using a common name-space and optionally an
- * instance id so that multiple instances can each have their own version of
- * the parameter persisted
+/**
+ * This class manages one or more PersistentParameter, PersistentListParameter,
+ * PersistentMapParameter objects, using a common name-space and optionally an
+ * instance id so that multiple instances can each have their own version of
+ * the parameter persisted
*/
public class PersistentSettingsManager {
-
+
/** Base class for a persistent parameter */
private abstract class AbstractPersistentParameter<T> {
- protected final Class<T> myClazz;
+ protected final Class<T> myClazz;
protected final boolean m_perInstance;
protected final String m_storeKey;
-
+
/** Constructor */
public AbstractPersistentParameter(Class<T> clazz, boolean perInstance, String storeKey) {
myClazz = clazz;
m_perInstance = perInstance;
m_storeKey = storeKey;
}
-
+
// accessors
-
+
/** Returns whether this parameter is persisted independently for each client instance */
public boolean isPerInstance() {
return m_perInstance;
}
-
+
/** Returns the class of the parameter */
public Class<T> getClazz() {
return myClazz;
}
-
+
protected String getStoreKey() {
return m_storeKey;
}
-
+
// misc
-
+
@SuppressWarnings("unchecked")
/** Converts a value from a String to its expected generic type. This is a base
* implementation that converts some base types - Use/Override as needed for more complex
@@ -74,61 +72,57 @@ public class PersistentSettingsManager {
// TODO: Add other types? Float, etc
if (String.class.isAssignableFrom(getClazz())) {
return (T) val;
- }
- else if (Integer.class.isAssignableFrom(getClazz())) {
+ } else if (Integer.class.isAssignableFrom(getClazz())) {
return (T) Integer.valueOf(val);
- }
- else if (Boolean.class.isAssignableFrom(getClazz())) {
+ } else if (Boolean.class.isAssignableFrom(getClazz())) {
return (T) Boolean.valueOf(val);
}
return null;
}
-
+
/** Returns whether the wanted Class type is supported, to use as a persistent parameter */
protected boolean isTypeSupported(Class<T> clazz) {
// TODO: Add other types? Float, etc
- if (String.class.isAssignableFrom(clazz) ||
- Integer.class.isAssignableFrom(clazz) ||
- Boolean.class.isAssignableFrom(clazz))
- {
+ if (String.class.isAssignableFrom(clazz) || Integer.class.isAssignableFrom(clazz)
+ || Boolean.class.isAssignableFrom(clazz)) {
return true;
}
return false;
}
-
+
// TODO: add a way to notify clients that the value of a global (shared) parameter
// has been updated, and that they should re-read it.
}
-
+
/** Class for a persistent parameter */
public class PersistentParameter<T> extends AbstractPersistentParameter<T> {
private T m_value;
private T m_defaultValue;
-
+
/**
* Constructor
* @param name: unique (for the namespace) label that identifies this parameter
- * @param perInstance: whether the parameter's value is persisted per client instance or
- * globally (one common shared stored value for all instances)
+ * @param perInstance: whether the parameter's value is persisted per client instance or
+ * globally (one common shared stored value for all instances)
* @param storeKey : The key used to store the parameter in the store
*/
public PersistentParameter(Class<T> clazz, boolean perInstance, String storeKey) {
super(clazz, perInstance, storeKey);
}
-
- /** Sets the default value to use if no persistent
+
+ /** Sets the default value to use if no persistent
* value is found for this parameter */
public void setDefault(T defaultValue) {
m_defaultValue = defaultValue;
}
-
+
/** Sets the value to persist */
public void set(T value) {
m_value = value;
// save value in preference store
persistParameter(value);
}
-
+
/** Returns the persistent value, if found, else the default value */
public T value() {
if (m_value == null) {
@@ -136,17 +130,17 @@ public class PersistentSettingsManager {
m_value = restoreParameter();
}
// parameter has one value for any/all instances
- else if(!isPerInstance()) {
- // do not rely on cached value, since another instance might have
+ else if (!isPerInstance()) {
+ // do not rely on cached value, since another instance might have
// changed it - reread from data store
m_value = restoreParameter();
}
- return (m_value == null)? m_defaultValue : m_value;
+ return (m_value == null) ? m_defaultValue : m_value;
}
-
- /**
- * Gets the persistent value, optionally forcing re-reading stored value
- * @param forceRefresh whether to force to re-read memento in case value changed
+
+ /**
+ * Gets the persistent value, optionally forcing re-reading stored value
+ * @param forceRefresh whether to force to re-read memento in case value changed
*/
public T value(boolean forceRefresh) {
if (forceRefresh) {
@@ -154,23 +148,24 @@ public class PersistentSettingsManager {
}
return value();
}
-
+
/** Attempts to find the parameter in the preference store. Returns null if not found */
private T restoreParameter() {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
String memento = store.get(getStoreKey(), null);
- if (memento == null) return null;
-
- String val = MementoUtils.decodeStringFromMemento(memento);
- T convertedVal = convertToT(val);
+ if (memento == null)
+ return null;
+
+ String val = MementoUtils.decodeStringFromMemento(memento);
+ T convertedVal = convertToT(val);
return convertedVal;
}
-
+
/** Saves parameter's value in preference store */
private void persistParameter(T value) {
// create memento
String memento = MementoUtils.encodeStringIntoMemento(value.toString());
-
+
// save memento in store
if (memento != null) {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
@@ -183,29 +178,29 @@ public class PersistentSettingsManager {
}
}
}
-
+
/** Class for a persistent {@literal List<T>} parameter */
public class PersistentListParameter<T> extends AbstractPersistentParameter<T> {
private List<T> m_value;
private List<T> m_defaultValue;
-
+
public PersistentListParameter(Class<T> clazz, boolean perInstance, String storeKey) {
super(clazz, perInstance, storeKey);
}
-
- /** Sets the default value to use if no persistent
+
+ /** Sets the default value to use if no persistent
* value is found for this parameter */
public void setDefault(List<T> defaultValues) {
m_defaultValue = defaultValues;
}
-
+
/** Sets the value to persist */
public void set(List<T> values) {
m_value = values;
// save value in preference store
persistParameter(values);
}
-
+
/** Returns the persistent value, if found, else the default value */
public List<T> value() {
if (m_value == null) {
@@ -213,17 +208,17 @@ public class PersistentSettingsManager {
m_value = restoreParameter();
}
// parameter has one value for any/all instances
- else if(!isPerInstance()) {
- // do not rely on cached value, since another instance might have
+ else if (!isPerInstance()) {
+ // do not rely on cached value, since another instance might have
// changed it - reread from data store
m_value = restoreParameter();
}
- return (m_value == null)? m_defaultValue : m_value ;
+ return (m_value == null) ? m_defaultValue : m_value;
}
-
- /**
- * Gets the persistent value, optionally forcing re-reading stored value
- * @param forceRefresh whether to force to re-read memento in case value changed
+
+ /**
+ * Gets the persistent value, optionally forcing re-reading stored value
+ * @param forceRefresh whether to force to re-read memento in case value changed
*/
public List<T> value(boolean forceRefresh) {
if (forceRefresh) {
@@ -231,26 +226,27 @@ public class PersistentSettingsManager {
}
return value();
}
-
+
/** Attempts to find the parameter in the preference store. Returns null if not found */
private List<T> restoreParameter() {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
String memento = store.get(getStoreKey(), null);
- if (memento == null) return null;
-
- List<String> vals = MementoUtils.decodeListFromMemento(memento);
+ if (memento == null)
+ return null;
+
+ List<String> vals = MementoUtils.decodeListFromMemento(memento);
// convert from List<String> to List<T>
- List<T> convertedVal = convertToT(vals);
+ List<T> convertedVal = convertToT(vals);
return convertedVal;
}
-
+
/** Saves parameter's value in preference store */
private void persistParameter(List<T> values) {
// Convert List<T> to List<String>
List<String> strList = convertTListToStringList(values);
// create memento from List<String>
String memento = MementoUtils.encodeListIntoMemento(strList);
-
+
// save memento in store
if (memento != null) {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
@@ -262,97 +258,97 @@ public class PersistentSettingsManager {
}
}
}
-
- /** For list parameters, converts the restored values from String
+
+ /** For list parameters, converts the restored values from String
* to its expected generic type */
private List<T> convertToT(List<String> vals) {
List<T> convertedList = new ArrayList<>();
-
- for(String val : vals) {
+
+ for (String val : vals) {
convertedList.add(convertToT(val));
}
return convertedList;
}
-
+
/** Converts a list of generic type to a list of String */
private List<String> convertTListToStringList(List<T> tList) {
List<String> strList = new ArrayList<>();
// convert list to list of String
- for(T elem : tList) {
+ for (T elem : tList) {
strList.add(elem.toString());
}
return strList;
}
}
-
-
+
/** Class for a persistent {@literal Map<String,T>} parameter */
public class PersistentMapParameter<T> extends AbstractPersistentParameter<T> {
- private Map<String,T> m_value;
- private Map<String,T> m_defaultValue;
-
+ private Map<String, T> m_value;
+ private Map<String, T> m_defaultValue;
+
public PersistentMapParameter(Class<T> clazz, boolean perInstance, String storeKey) {
super(clazz, perInstance, storeKey);
}
-
- /** Sets the default value to use if no persistent
+
+ /** Sets the default value to use if no persistent
* value is found for this parameter */
- public void setDefault(Map<String,T> defaultValues) {
+ public void setDefault(Map<String, T> defaultValues) {
m_defaultValue = defaultValues;
}
-
+
/** Sets the value to persist */
- public void set(Map<String,T> values) {
+ public void set(Map<String, T> values) {
m_value = values;
// save value in preference store
persistParameter(values);
}
-
+
/** Returns the persistent value, if found, else the default value */
- public Map<String,T> value() {
+ public Map<String, T> value() {
if (m_value == null) {
// attempt to get the value from the preference store
m_value = restoreParameter();
}
// parameter has one value for any/all instances
- else if(!isPerInstance()) {
- // do not rely on cached value, since another instance might have
+ else if (!isPerInstance()) {
+ // do not rely on cached value, since another instance might have
// changed it - reread from data store
m_value = restoreParameter();
}
- return (m_value == null)? m_defaultValue : m_value ;
+ return (m_value == null) ? m_defaultValue : m_value;
}
-
- /**
- * Gets the persistent value, optionally forcing re-reading stored value
- * @param forceRefresh whether to force to re-read memento in case value changed
+
+ /**
+ * Gets the persistent value, optionally forcing re-reading stored value
+ * @param forceRefresh whether to force to re-read memento in case value changed
*/
- public Map<String,T> value(boolean forceRefresh) {
+ public Map<String, T> value(boolean forceRefresh) {
if (forceRefresh) {
m_value = null;
}
return value();
}
-
+
/** Attempts to find the parameter in the preference store. Returns null if not found */
- private Map<String,T> restoreParameter() {
+ private Map<String, T> restoreParameter() {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
String memento = store.get(getStoreKey(), null);
- if (memento == null) return null;
-
- Map<String,String> vals = MementoUtils.decodeMapFromMemento(memento);
+ if (memento == null)
+ return null;
+
+ Map<String, String> vals = MementoUtils.decodeMapFromMemento(memento);
// convert from Map<String,String> to Map<String,T>
- Map<String,T> convertedVal = convertToT(vals);
+ Map<String, T> convertedVal = convertToT(vals);
return convertedVal;
}
-
+
/** Saves parameter's value in preference store */
- private void persistParameter(Map<String,T> values) {
+ private void persistParameter(Map<String, T> values) {
// Convert Map<String,T> to Map<String,String>
- Map<String,String> strMap = convertTMapToStringMap(values);
+ Map<String, String> strMap = convertTMapToStringMap(values);
// create memento from Map
String memento = MementoUtils.encodeMapIntoMemento(strMap);
-
+
// save memento in store
if (memento != null) {
IEclipsePreferences store = MulticoreVisualizerUIPlugin.getEclipsePreferenceStore();
@@ -364,74 +360,75 @@ public class PersistentSettingsManager {
}
}
}
-
- /** For Map parameters, converts the restored values from {@literal Map<String,String>}
+
+ /** For Map parameters, converts the restored values from {@literal Map<String,String>}
* to {@literal Map<String, T>} */
- private Map<String,T> convertToT(Map<String,String> vals) {
- Map<String,T> convertedMap = new HashMap<>();
-
- for(String key : vals.keySet()) {
+ private Map<String, T> convertToT(Map<String, String> vals) {
+ Map<String, T> convertedMap = new HashMap<>();
+
+ for (String key : vals.keySet()) {
convertedMap.put(key, convertToT(vals.get(key)));
}
return convertedMap;
}
-
+
/** Converts a {@literal Map<String,T>} to a {@literal Map<String,String>} */
- private Map<String,String> convertTMapToStringMap(Map<String,T> map) {
- Map<String,String> strMap = new HashMap<>();
+ private Map<String, String> convertTMapToStringMap(Map<String, T> map) {
+ Map<String, String> strMap = new HashMap<>();
// convert each entry
- for(String key : map.keySet()) {
+ for (String key : map.keySet()) {
strMap.put(key, map.get(key).toString());
}
return strMap;
}
}
-
+
/** String that is used to insulate the namespace for the parameters
* saved by a specific instance of the class */
private final String m_category;
-
- /** an identifier that differentiates different client instances. For example, to save the
+
+ /** an identifier that differentiates different client instances. For example, to save the
* value of a parameter that is applicable per-view, the view secondary id could be used so
* that each view has its own stored value */
private final String m_instance;
-
+
/**
* Constructor
* @param category : an optional id that is used to insulate the namespace for the parameters
- * saved by this instance of the class. Using different category values permits to distinguish
- * two or more parameters with the same label. Example: class name where the parameter is used.
+ * saved by this instance of the class. Using different category values permits to distinguish
+ * two or more parameters with the same label. Example: class name where the parameter is used.
* This can be set to null if unused.
- * @param instance : a unique id that identifies the client's instance. Used when
- * a parameter is defined as per-instance
+ * @param instance : a unique id that identifies the client's instance. Used when
+ * a parameter is defined as per-instance
*/
public PersistentSettingsManager(String category, String instance) {
m_category = category != null ? category : ""; //$NON-NLS-1$
m_instance = instance != null ? instance : ""; //$NON-NLS-1$
}
-
- /** Constructor
- * @param instance: a unique id that identifies the client's instance. Used when
+
+ /** Constructor
+ * @param instance: a unique id that identifies the client's instance. Used when
* a parameter is not global (i.e. meant to be persisted per instance).
*/
public PersistentSettingsManager(String instance) {
this(null, instance);
}
-
+
/** Constructor */
public PersistentSettingsManager() {
this(null, null);
}
-
+
/**
* Creates a new persistent parameter, using the namespace and instance id of this manager.
* @param clazz: the class of the persistent parameter. Supported types: String, Integer, Boolean
- * @param label: unique label that identifies this parameter.
- * @param perInstance: whether the parameter's value should be persisted per client instance or
+ * @param label: unique label that identifies this parameter.
+ * @param perInstance: whether the parameter's value should be persisted per client instance or
* globally (one common shared stored value for all instances)
* @param defaultValue: default value to use (mandatory)
*/
- public <T> PersistentParameter<T> getNewParameter(Class<T> clazz, String label, boolean perInstance, T defaultValue) {
+ public <T> PersistentParameter<T> getNewParameter(Class<T> clazz, String label, boolean perInstance,
+ T defaultValue) {
PersistentParameter<T> setting;
// build the final store key with category, parameter label and specific instance, if applicable
setting = new PersistentParameter<T>(clazz, perInstance, getStorageKey(perInstance) + "." + label); //$NON-NLS-1$
@@ -439,21 +436,21 @@ public class PersistentSettingsManager {
if (setting.isTypeSupported(clazz)) {
setting.setDefault(defaultValue);
return setting;
- }
- else {
+ } else {
throw new InvalidParameterException("Unsupported class type: " + clazz.toString()); //$NON-NLS-1$
}
}
-
+
/**
* Creates a new persistent {@literal List<T>} parameter, using the namespace and instance id of this manager.
* @param clazz: the class of the persistent parameter List (e.g. List of that type). Supported types: String, Integer, Boolean
- * @param label: unique label that identifies this parameter.
- * @param perInstance: whether the parameter's value should be persisted per client instance or
+ * @param label: unique label that identifies this parameter.
+ * @param perInstance: whether the parameter's value should be persisted per client instance or
* globally (one common shared stored value for all instances)
- * @param defaultValue: default value to use (mandatory).
+ * @param defaultValue: default value to use (mandatory).
*/
- public <T> PersistentListParameter<T> getNewListParameter(Class<T> clazz, String label, boolean perInstance, List<T> defaultValue) {
+ public <T> PersistentListParameter<T> getNewListParameter(Class<T> clazz, String label, boolean perInstance,
+ List<T> defaultValue) {
PersistentListParameter<T> setting;
// build the final store key with category, parameter label and specific instance, if applicable
setting = new PersistentListParameter<T>(clazz, perInstance, getStorageKey(perInstance) + "." + label); //$NON-NLS-1$
@@ -461,21 +458,21 @@ public class PersistentSettingsManager {
if (setting.isTypeSupported(clazz)) {
setting.setDefault(defaultValue);
return setting;
- }
- else {
+ } else {
throw new InvalidParameterException("Unsupported class type: " + clazz.toString()); //$NON-NLS-1$
}
}
-
+
/**
* Creates a new persistent {@literal Map<String,T>} parameter, using the namespace and instance id of this manager.
* @param clazz: the class of the persistent parameter List (e.g. List of that type). Supported types: String, Integer, Boolean
- * @param label: unique label that identifies this parameter.
- * @param perInstance: whether the parameter's value should be persisted per client instance or
+ * @param label: unique label that identifies this parameter.
+ * @param perInstance: whether the parameter's value should be persisted per client instance or
* globally (one common shared stored value for all instances)
- * @param defaultValue: default value to use (mandatory).
+ * @param defaultValue: default value to use (mandatory).
*/
- public <T> PersistentMapParameter<T> getNewMapParameter(Class<T> clazz, String label, boolean perInstance, Map<String,T> defaultValue) {
+ public <T> PersistentMapParameter<T> getNewMapParameter(Class<T> clazz, String label, boolean perInstance,
+ Map<String, T> defaultValue) {
PersistentMapParameter<T> setting;
// build the final store key with category, parameter label and specific instance, if applicable
setting = new PersistentMapParameter<T>(clazz, perInstance, getStorageKey(perInstance) + "." + label); //$NON-NLS-1$
@@ -483,17 +480,16 @@ public class PersistentSettingsManager {
if (setting.isTypeSupported(clazz)) {
setting.setDefault(defaultValue);
return setting;
- }
- else {
+ } else {
throw new InvalidParameterException("Unsupported class type: " + clazz.toString()); //$NON-NLS-1$
}
}
-
+
// ---- misc ----
-
- /** Returns the key to be used to save parameter, taking into account the
+
+ /** Returns the key to be used to save parameter, taking into account the
* instance id, if applicable */
private String getStorageKey(boolean perInstance) {
- return (perInstance ? m_instance : "") + (!m_category.isEmpty() ? "." + m_category : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return (perInstance ? m_instance : "") + (!m_category.isEmpty() ? "." + m_category : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java
index 036c39408d..3508f95dea 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java
@@ -37,51 +37,51 @@ import org.junit.BeforeClass;
* Helper base class for running DSF related tests
*/
public class CommonDsfTest extends CommonTest {
-
+
protected static DsfSession fSession = null;
-
+
/**
- * Setup the test.
+ * Setup the test.
* The session is typically configured once per class load, but we allow subclasses to override this,
- * and sometimes re-setup during a test (or interactive debugging).
- * Therefore {@link Before} is used, not {@link BeforeClass}.
+ * and sometimes re-setup during a test (or interactive debugging).
+ * Therefore {@link Before} is used, not {@link BeforeClass}.
*/
@Before
public void setup() {
- if(fSession != null) {
+ if (fSession != null) {
return; // Already set-up
}
-
+
doSetupSession();
}
-
+
protected void doSetupSession() {
fSession = DsfSession.startSession(new DefaultDsfExecutor(GdbPlugin.PLUGIN_ID), GdbPlugin.PLUGIN_ID);
-
+
registerLaunch();
}
@AfterClass
public static void tearDown() {
- if(fSession != null) {
+ if (fSession != null) {
DsfSession.endSession(fSession);
fSession = null;
}
}
-
+
protected ILaunchConfigurationType getCLaunchConfigType() {
return getLaunchManager().getLaunchConfigurationType(ICDTLaunchConfigurationConstants.ID_LAUNCH_C_APP);
}
-
+
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
-
+
protected void registerLaunch() {
ILaunchConfigurationWorkingCopy lc;
try {
lc = getCLaunchConfigType().newInstance(null, "TestLaunch");
- } catch(CoreException e) {
+ } catch (CoreException e) {
fail(e.getMessage());
return;
}
@@ -89,11 +89,11 @@ public class CommonDsfTest extends CommonTest {
DsfLaunch dsfLaunch = new DsfLaunch(lc, ILaunchManager.DEBUG_MODE, sourceLocator);
fSession.registerModelAdapter(ILaunch.class, dsfLaunch);
}
-
+
protected RequestMonitor newRequestMonitor() {
return new RequestMonitor(fSession.getExecutor(), null);
}
-
+
protected <T> DataRequestMonitor<T> newDataRequestMonitor() {
return new DataRequestMonitor<>(fSession.getExecutor(), null);
}
@@ -103,10 +103,10 @@ public class CommonDsfTest extends CommonTest {
* Misc test utilities.
*/
class CommonTest {
- /* ----------------- ----------------- */
+ /* ----------------- ----------------- */
- @SafeVarargs
- public static <T> T[] array(T... elems) {
- return elems;
- }
+ @SafeVarargs
+ public static <T> T[] array(T... elems) {
+ return elems;
+ }
} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisterTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisterTest.java
index 8c668e1204..4b7a9dfe4f 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisterTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisterTest.java
@@ -29,23 +29,22 @@ import org.eclipse.cdt.dsf.mi.service.command.MIControlDMContext;
import org.eclipse.core.runtime.Assert;
import org.junit.Test;
-
public class GDBRegisterTest extends CommonDsfTest {
-
+
public static final String PROCESS_A = "processA";
public static final String PROCESS_B = "processB";
-
+
protected MIProcesses miProcesses;
protected GDBRegisters gdbRegisters;
@Override
protected void doSetupSession() {
super.doSetupSession();
-
+
miProcesses = new MIProcesses(fSession);
gdbRegisters = createGdbRegisters();
}
-
+
protected GDBRegisters createGdbRegisters() {
return new GDBRegisters(fSession) {
@Override
@@ -54,56 +53,57 @@ public class GDBRegisterTest extends CommonDsfTest {
}
};
}
-
+
@Test
- public void testRegisterPersistence() throws Exception { testRegisterPersistence$(); }
+ public void testRegisterPersistence() throws Exception {
+ testRegisterPersistence$();
+ }
+
public void testRegisterPersistence$() throws Exception {
-
+
MIControlDMContext controlDmc = new MIControlDMContext(fSession.getId(), "TestControl");
IProcessDMContext processDmcA = miProcesses.createProcessContext(controlDmc, PROCESS_A);
IProcessDMContext processDmcB = miProcesses.createProcessContext(controlDmc, PROCESS_B);
IMIContainerDMContext containerA = miProcesses.createContainerContext(processDmcA, "containerA");
IMIContainerDMContext containerB = miProcesses.createContainerContext(processDmcB, "containerB");
-
-
+
MIRegisterGroupDMC[] initialRegisterGroups = gdbRegisters.readGroupsFromMemento(containerA);
Assert.isTrue(initialRegisterGroups.length == 0);
-
+
MIRegisterGroupDMC registerGroupA = addRegisterGroup(containerA, "RegGroupA", "register_foo");
// check build descriptors
IRegisterGroupDescriptor[] buildDescriptors = gdbRegisters.buildDescriptors();
- org.junit.Assert.assertEquals(buildDescriptors[0].getContainerId(), gdbRegisters.getPersistenceIdForRegisterGroupContainer(containerA));
-
+ org.junit.Assert.assertEquals(buildDescriptors[0].getContainerId(),
+ gdbRegisters.getPersistenceIdForRegisterGroupContainer(containerA));
+
// Save then check persistence
gdbRegisters.save();
checkAfterAdding_GroupA(containerA, containerB, registerGroupA);
-
+
// Now add a second register group to a different process context
MIRegisterGroupDMC registerGroupB = addRegisterGroup(containerB, "RegGroupB", "register_bar");
gdbRegisters.save();
checkAfterAdding_GroupB(containerA, containerB, registerGroupA, registerGroupB);
}
- protected void checkAfterAdding_GroupA(
- IMIContainerDMContext containerA, IMIContainerDMContext containerB, MIRegisterGroupDMC registerGroupA
- ) {
+ protected void checkAfterAdding_GroupA(IMIContainerDMContext containerA, IMIContainerDMContext containerB,
+ MIRegisterGroupDMC registerGroupA) {
checkRegisterGroupMemento(containerA, registerGroupA);
checkRegisterGroupsMemento(containerB, array());
}
-
- protected void checkAfterAdding_GroupB(
- IMIContainerDMContext containerA, IMIContainerDMContext containerB,
- MIRegisterGroupDMC registerGroupA, MIRegisterGroupDMC registerGroupB
- ) {
+
+ protected void checkAfterAdding_GroupB(IMIContainerDMContext containerA, IMIContainerDMContext containerB,
+ MIRegisterGroupDMC registerGroupA, MIRegisterGroupDMC registerGroupB) {
checkRegisterGroupMemento(containerA, registerGroupA);
checkRegisterGroupMemento(containerB, registerGroupB);
}
- protected MIRegisterGroupDMC addRegisterGroup(IMIContainerDMContext container, String groupName, String registerName) {
+ protected MIRegisterGroupDMC addRegisterGroup(IMIContainerDMContext container, String groupName,
+ String registerName) {
MIRegisterGroupDMC registerGroup = new MIRegisterGroupDMC(gdbRegisters, container, 1, groupName);
MIRegisterDMC rgFoo = new MIRegisterDMC(gdbRegisters, registerGroup, 1, registerName);
-
+
gdbRegisters.addRegisterGroup(container, registerGroup.getName(), array(rgFoo), newRequestMonitor());
return registerGroup;
}
@@ -111,33 +111,34 @@ public class GDBRegisterTest extends CommonDsfTest {
protected void checkRegisterGroupMemento(IMIContainerDMContext container, MIRegisterGroupDMC registerGroup) {
checkRegisterGroupsMemento(container, array(registerGroup));
}
-
- protected void checkRegisterGroupsMemento(IMIContainerDMContext container, MIRegisterGroupDMC[] expectedRegisterGroups) {
+
+ protected void checkRegisterGroupsMemento(IMIContainerDMContext container,
+ MIRegisterGroupDMC[] expectedRegisterGroups) {
MIRegisterGroupDMC[] savedRegisterGroups = gdbRegisters.readGroupsFromMemento(container);
- if(expectedRegisterGroups == null) {
+ if (expectedRegisterGroups == null) {
assertTrue(savedRegisterGroups == null);
return;
}
-
+
assertTrue(expectedRegisterGroups.length == savedRegisterGroups.length);
-
+
for (int ix = 0; ix < expectedRegisterGroups.length; ix++) {
MIRegisterGroupDMC expectedRG = expectedRegisterGroups[ix];
int groupNo = savedRegisterGroups[ix].getGroupNo(); // Don't check group number, so set expected to obtained value
expectedRegisterGroups[ix] = new MIRegisterGroupDMC(gdbRegisters, container, groupNo, expectedRG.getName());
}
-
+
assertTrue(Arrays.equals(expectedRegisterGroups, savedRegisterGroups));
}
-
+
/* ----------------- ----------------- */
-
+
/**
* Variant of {@link GDBRegisterTest} where register groups are saved without a container id.
* This is the default behavior for register group persistence.
*/
public static class GDBRegisterTest_NoContainerTest extends GDBRegisterTest {
-
+
@Override
protected GDBRegisters createGdbRegisters() {
return new GDBRegisters(fSession) {
@@ -147,27 +148,24 @@ public class GDBRegisterTest extends CommonDsfTest {
}
};
}
-
+
@Override
- protected void checkAfterAdding_GroupA(
- IMIContainerDMContext containerA, IMIContainerDMContext containerB, MIRegisterGroupDMC registerGroupA
- ) {
+ protected void checkAfterAdding_GroupA(IMIContainerDMContext containerA, IMIContainerDMContext containerB,
+ MIRegisterGroupDMC registerGroupA) {
checkRegisterGroupMemento(containerA, registerGroupA);
checkRegisterGroupMemento(containerB, registerGroupA);
}
-
+
@Override
- protected void checkAfterAdding_GroupB(
- IMIContainerDMContext containerA, IMIContainerDMContext containerB,
- MIRegisterGroupDMC registerGroupA, MIRegisterGroupDMC registerGroupB
- ) {
+ protected void checkAfterAdding_GroupB(IMIContainerDMContext containerA, IMIContainerDMContext containerB,
+ MIRegisterGroupDMC registerGroupA, MIRegisterGroupDMC registerGroupB) {
checkRegisterGroupsMemento(containerA, array(registerGroupA, registerGroupB));
checkRegisterGroupsMemento(containerB, array(registerGroupA, registerGroupB));
}
}
-
+
public static class GDBRegisterTest_WithAlternativeProcessIdTest extends GDBRegisterTest {
-
+
@Override
protected GDBRegisters createGdbRegisters() {
return new GDBRegisters(fSession) {
@@ -175,28 +173,29 @@ public class GDBRegisterTest extends CommonDsfTest {
protected boolean useProcessIdAsRegisterGroupPersistanceId() {
return true;
}
+
@Override
protected String getPersistenceIdForRegisterGroupContainer(IContainerDMContext contDmc) {
return super.getPersistenceIdForRegisterGroupContainer(contDmc) + "XXX";
}
};
}
-
+
}
-
-
+
public static class GDBRegisterTest_WithContainerDMContextTest extends GDBRegisterTest {
-
+
@Override
protected GDBRegisters createGdbRegisters() {
return new GDBRegisters(fSession) {
@Override
protected String getPersistenceIdForRegisterGroupContainer(IContainerDMContext contDmc) {
- IMIContainerDMContext contextDmc = DMContexts.getAncestorOfType(contDmc, IMIContainerDMContext.class);
+ IMIContainerDMContext contextDmc = DMContexts.getAncestorOfType(contDmc,
+ IMIContainerDMContext.class);
return contextDmc.getGroupId();
}
};
}
-
+
}
} \ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/AutomatedIntegrationSuite.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/AutomatedIntegrationSuite.java
index 7fbaea5215..9bdce96b08 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/AutomatedIntegrationSuite.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/AutomatedIntegrationSuite.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Alvaro Sanchez-Leon (Ericsson) - Initial Implementation
*******************************************************************************/
@@ -29,19 +29,10 @@ import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
// Add additional test case classes below
-@SuiteClasses({MIThreadTests.class,
- TestMIBreakInsertCommand.class,
- TestMICommandConstructCommand.class,
- TestMIGDBSetSysroot.class,
- LaunchUtilsTest.class,
- MIStringHandlerTests.class,
- ProcStatParserTest.class,
- FilePartsTest.class,
- GDBRegisterTest.class,
- GDBRegisterTest_NoContainerTest.class,
- GDBRegisterTest_WithAlternativeProcessIdTest.class,
- GDBRegisterTest_WithContainerDMContextTest.class,
-})
+@SuiteClasses({ MIThreadTests.class, TestMIBreakInsertCommand.class, TestMICommandConstructCommand.class,
+ TestMIGDBSetSysroot.class, LaunchUtilsTest.class, MIStringHandlerTests.class, ProcStatParserTest.class,
+ FilePartsTest.class, GDBRegisterTest.class, GDBRegisterTest_NoContainerTest.class,
+ GDBRegisterTest_WithAlternativeProcessIdTest.class, GDBRegisterTest_WithContainerDMContextTest.class, })
public class AutomatedIntegrationSuite {
// Often overriding BeforeClass method here
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/FilePartsTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/FilePartsTest.java
index bb4a35cade..e46bddcc59 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/FilePartsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/FilePartsTest.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Jonah Graham (Kichwa Coders) - Initial Implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.junit.Test;
/**
* TODO: Move this test closer to the code it is testing.
- *
+ *
* At the time I wrote this test, there was no obvious place to put it, a test
* suite for org.eclipse.cdt.debug.core is needed.
*
@@ -31,59 +31,60 @@ public class FilePartsTest {
assertEquals("", CDebugUtils.getFileParts("").getFolder());
assertEquals("", CDebugUtils.getFileParts("").getFileName());
assertEquals("", CDebugUtils.getFileParts("").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts(".").getFolder());
assertEquals(".", CDebugUtils.getFileParts(".").getFileName());
assertEquals("", CDebugUtils.getFileParts(".").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts(".d").getFolder());
assertEquals(".d", CDebugUtils.getFileParts(".d").getFileName());
assertEquals("d", CDebugUtils.getFileParts(".d").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts(".dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts(".dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts(".dot").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts("file").getFolder());
assertEquals("file", CDebugUtils.getFileParts("file").getFileName());
assertEquals("", CDebugUtils.getFileParts("file").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts("file.").getFolder());
assertEquals("file.", CDebugUtils.getFileParts("file.").getFileName());
assertEquals("", CDebugUtils.getFileParts("file.").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts("file.d").getFolder());
assertEquals("file.d", CDebugUtils.getFileParts("file.d").getFileName());
assertEquals("d", CDebugUtils.getFileParts("file.d").getExtension());
-
+
assertEquals("", CDebugUtils.getFileParts("file.dot").getFolder());
assertEquals("file.dot", CDebugUtils.getFileParts("file.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("file.dot").getExtension());
-
+
assertEquals("/folder/", CDebugUtils.getFileParts("/folder/file.dot").getFolder());
assertEquals("file.dot", CDebugUtils.getFileParts("/folder/file.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("/folder/file.dot").getExtension());
-
- assertEquals("/folder1/folder2/folder3/", CDebugUtils.getFileParts("/folder1/folder2/folder3/file.dot").getFolder());
+
+ assertEquals("/folder1/folder2/folder3/",
+ CDebugUtils.getFileParts("/folder1/folder2/folder3/file.dot").getFolder());
assertEquals("file.dot", CDebugUtils.getFileParts("/folder/file.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("/folder/file.dot").getExtension());
-
+
assertEquals("/folder/", CDebugUtils.getFileParts("/folder/.dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts("/folder/.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("/folder/.dot").getExtension());
-
+
assertEquals("/folder/../other/", CDebugUtils.getFileParts("/folder/../other/.dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts("/folder/../other/.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("/folder/../other/.dot").getExtension());
-
+
assertEquals("/folder//", CDebugUtils.getFileParts("/folder//.dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts("/folder//.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("/folder//.dot").getExtension());
-
+
assertEquals("C:\\folder\\", CDebugUtils.getFileParts("C:\\folder\\.dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts("C:\\folder\\.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("C:\\folder\\.dot").getExtension());
-
+
assertEquals("C:\\\\folder\\", CDebugUtils.getFileParts("C:\\\\folder\\.dot").getFolder());
assertEquals(".dot", CDebugUtils.getFileParts("C:\\\\folder\\.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("C:\\\\folder\\.dot").getExtension());
@@ -99,6 +100,6 @@ public class FilePartsTest {
assertEquals("\\\\unc\\path\\", CDebugUtils.getFileParts("\\\\unc\\path\\file.dot").getFolder());
assertEquals("file.dot", CDebugUtils.getFileParts("\\\\unc\\path\\file.dot").getFileName());
assertEquals("dot", CDebugUtils.getFileParts("\\\\unc\\path\\file.dot").getExtension());
-
+
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/LaunchUtilsTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/LaunchUtilsTest.java
index 2ad8336f1f..15366f2421 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/LaunchUtilsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/LaunchUtilsTest.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc-Andre Laperle - Added test for the gdb version string converter
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
@@ -27,12 +27,12 @@ import org.junit.Before;
import org.junit.Test;
public class LaunchUtilsTest {
-
+
private class Versions {
private String version1;
private String version2;
private int expectedResult;
-
+
public Versions(String v1, String v2, int result) {
version1 = v1;
version2 = v2;
@@ -40,144 +40,142 @@ public class LaunchUtilsTest {
}
}
- @Before
- public void init() {
- }
+ @Before
+ public void init() {
+ }
- @After
- public void shutdown() {
- }
-
- @Test
+ @After
+ public void shutdown() {
+ }
+
+ @Test
public void testGDBVersionFromText() {
- Map<String, String> versions = new HashMap<>(10);
-
- versions.put("GNU gdb 6.8.50.20080730", "6.8.50.20080730");
- versions.put("GNU gdb (GDB) 6.8.50.20080730-cvs", "6.8.50.20080730");
- versions.put("GNU gdb (Ericsson GDB 1.0-10) 6.8.50.20080730-cvs", "6.8.50.20080730");
- versions.put("GNU gdb (GDB) Fedora (7.0-3.fc12)", "7.0");
- versions.put("GNU gdb 6.8.0.20080328-cvs (cygwin-special)", "6.8"); // Special for cygwin
- versions.put("GNU gdb 7.0", "7.0");
- versions.put("GNU gdb Fedora (6.8-27.el5)", "6.8");
- versions.put("GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh)", "6.3.0.0");
- versions.put("GNU gdb (GDB) STMicroelectronics/Linux Base 7.4-71 [build Mar 1 2013]", "7.4");
-
- for (String key : versions.keySet()) {
- assertEquals("From \"" + key + "\"", versions.get(key), LaunchUtils.getGDBVersionFromText(key));
- }
- }
-
- /**
- * Verify that GDB version comparison is done properly.
- */
- @Test
- public void testGDBVersionComparison() {
- List<Versions> versions = new ArrayList<>(100);
-
- versions.add(new Versions("7", "6", 1));
- versions.add(new Versions("7", "6.1", 1));
- versions.add(new Versions("7", "6.1.1", 1));
- versions.add(new Versions("7", "7", 0));
- versions.add(new Versions("7", "7.0", 0));
- versions.add(new Versions("7", "7.0.0", 0));
- versions.add(new Versions("7", "7.1", -1));
- versions.add(new Versions("7", "7.1.1", -1));
- versions.add(new Versions("7", "8", -1));
- versions.add(new Versions("7", "8.0", -1));
- versions.add(new Versions("7", "8.1", -1));
- versions.add(new Versions("7", "8.1.1", -1));
- versions.add(new Versions("7", "10", -1));
- versions.add(new Versions("7", "10.0", -1));
- versions.add(new Versions("7", "10.1", -1));
- versions.add(new Versions("7", "10.1.1", -1));
- versions.add(new Versions("7", "70", -1));
- versions.add(new Versions("7", "70.1", -1));
- versions.add(new Versions("7", "70.1.1", -1));
- versions.add(new Versions("7", "72", -1));
- versions.add(new Versions("7", "72.1", -1));
- versions.add(new Versions("7", "72.1.1", -1));
-
- versions.add(new Versions("7.3", "6", 1));
- versions.add(new Versions("7.3", "6.4", 1));
- versions.add(new Versions("7.3", "6.4.4", 1));
- versions.add(new Versions("7.3", "7", 1));
- versions.add(new Versions("7.3", "7.0", 1));
- versions.add(new Versions("7.3", "7.3", 0));
- versions.add(new Versions("7.3", "7.3.0", 0));
- versions.add(new Versions("7.0", "7.0", 0));
- versions.add(new Versions("7.3", "7.3.3", -1));
- versions.add(new Versions("7.3", "7.30", -1));
- versions.add(new Versions("7.3", "7.30.3", -1));
- versions.add(new Versions("7.3", "8", -1));
- versions.add(new Versions("7.3", "8.0", -1));
- versions.add(new Versions("7.3", "8.1", -1));
- versions.add(new Versions("7.3", "8.1.1", -1));
- versions.add(new Versions("7.3", "8.4", -1));
- versions.add(new Versions("7.3", "8.4.4", -1));
- versions.add(new Versions("7.3", "10", -1));
- versions.add(new Versions("7.3", "10.0", -1));
- versions.add(new Versions("7.3", "10.1", -1));
- versions.add(new Versions("7.3", "10.1.1", -1));
- versions.add(new Versions("7.3", "10.4", -1));
- versions.add(new Versions("7.3", "10.4.4", -1));
- versions.add(new Versions("7.3", "70", -1));
- versions.add(new Versions("7.3", "70.1", -1));
- versions.add(new Versions("7.3", "70.1.1", -1));
- versions.add(new Versions("7.3", "72", -1));
- versions.add(new Versions("7.3", "72.1", -1));
- versions.add(new Versions("7.3", "72.1.1", -1));
-
- versions.add(new Versions("7.5.4", "6", 1));
- versions.add(new Versions("7.5.4", "6.4", 1));
- versions.add(new Versions("7.5.4", "6.4.4", 1));
- versions.add(new Versions("7.5.4", "6.5", 1));
- versions.add(new Versions("7.5.4", "6.5.4", 1));
- versions.add(new Versions("7.5.4", "7", 1));
- versions.add(new Versions("7.5.4", "7.0", 1));
- versions.add(new Versions("7.5.4", "7.3", 1));
- versions.add(new Versions("7.5.4", "7.3.0", 1));
- versions.add(new Versions("7.5.4", "7.5", 1));
- versions.add(new Versions("7.5.4", "7.5.3", 1));
- versions.add(new Versions("7.5.4", "7.5.4", 0));
- versions.add(new Versions("7.0.0", "7.0.0", 0));
- versions.add(new Versions("7.5.4", "7.7", -1));
- versions.add(new Versions("7.5.4", "7.7.6", -1));
- versions.add(new Versions("7.5.4", "7.50", -1));
- versions.add(new Versions("7.5.4", "7.50.3", -1));
- versions.add(new Versions("7.5.4", "7.50.4", -1));
- versions.add(new Versions("7.5.4", "8", -1));
- versions.add(new Versions("7.5.4", "8.0", -1));
- versions.add(new Versions("7.5.4", "8.1", -1));
- versions.add(new Versions("7.5.4", "8.1.1", -1));
- versions.add(new Versions("7.5.4", "8.5", -1));
- versions.add(new Versions("7.5.4", "8.5.4", -1));
- versions.add(new Versions("7.5.4", "10", -1));
- versions.add(new Versions("7.5.4", "10.0", -1));
- versions.add(new Versions("7.5.4", "10.1", -1));
- versions.add(new Versions("7.5.4", "10.1.1", -1));
- versions.add(new Versions("7.5.4", "10.5", -1));
- versions.add(new Versions("7.5.4", "10.5.4", -1));
- versions.add(new Versions("7.5.4", "10.7.4", -1));
- versions.add(new Versions("7.5.4", "7.10", -1));
- versions.add(new Versions("7.5.4", "7.10.1", -1));
- versions.add(new Versions("7.5.4", "7.10.5", -1));
- versions.add(new Versions("7.5.4", "72", -1));
- versions.add(new Versions("7.5.4", "72.1", -1));
- versions.add(new Versions("7.5.4", "72.1.1", -1));
-
- versions.add(new Versions("6.8.51", "6.8.50.20080730", 1));
- versions.add(new Versions("6.9.4", "6.8.50.20080730", 1));
- versions.add(new Versions("6.8.50.20080730", "6.8.50.20080730", 0));
- versions.add(new Versions("6.5.4", "6.8.50.20080730", -1));
- versions.add(new Versions("6.8.50", "6.8.50.20080730", -1));
-
- for (Versions v : versions) {
- assertEquals("Comparing " + v.version1 + " and " + v.version2,
- v.expectedResult,
- LaunchUtils.compareVersions(v.version1, v.version2));
- assertEquals("Comparing " + v.version2 + " and " + v.version1,
- -v.expectedResult,
- LaunchUtils.compareVersions(v.version2, v.version1));
- }
- }
+ Map<String, String> versions = new HashMap<>(10);
+
+ versions.put("GNU gdb 6.8.50.20080730", "6.8.50.20080730");
+ versions.put("GNU gdb (GDB) 6.8.50.20080730-cvs", "6.8.50.20080730");
+ versions.put("GNU gdb (Ericsson GDB 1.0-10) 6.8.50.20080730-cvs", "6.8.50.20080730");
+ versions.put("GNU gdb (GDB) Fedora (7.0-3.fc12)", "7.0");
+ versions.put("GNU gdb 6.8.0.20080328-cvs (cygwin-special)", "6.8"); // Special for cygwin
+ versions.put("GNU gdb 7.0", "7.0");
+ versions.put("GNU gdb Fedora (6.8-27.el5)", "6.8");
+ versions.put("GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh)", "6.3.0.0");
+ versions.put("GNU gdb (GDB) STMicroelectronics/Linux Base 7.4-71 [build Mar 1 2013]", "7.4");
+
+ for (String key : versions.keySet()) {
+ assertEquals("From \"" + key + "\"", versions.get(key), LaunchUtils.getGDBVersionFromText(key));
+ }
+ }
+
+ /**
+ * Verify that GDB version comparison is done properly.
+ */
+ @Test
+ public void testGDBVersionComparison() {
+ List<Versions> versions = new ArrayList<>(100);
+
+ versions.add(new Versions("7", "6", 1));
+ versions.add(new Versions("7", "6.1", 1));
+ versions.add(new Versions("7", "6.1.1", 1));
+ versions.add(new Versions("7", "7", 0));
+ versions.add(new Versions("7", "7.0", 0));
+ versions.add(new Versions("7", "7.0.0", 0));
+ versions.add(new Versions("7", "7.1", -1));
+ versions.add(new Versions("7", "7.1.1", -1));
+ versions.add(new Versions("7", "8", -1));
+ versions.add(new Versions("7", "8.0", -1));
+ versions.add(new Versions("7", "8.1", -1));
+ versions.add(new Versions("7", "8.1.1", -1));
+ versions.add(new Versions("7", "10", -1));
+ versions.add(new Versions("7", "10.0", -1));
+ versions.add(new Versions("7", "10.1", -1));
+ versions.add(new Versions("7", "10.1.1", -1));
+ versions.add(new Versions("7", "70", -1));
+ versions.add(new Versions("7", "70.1", -1));
+ versions.add(new Versions("7", "70.1.1", -1));
+ versions.add(new Versions("7", "72", -1));
+ versions.add(new Versions("7", "72.1", -1));
+ versions.add(new Versions("7", "72.1.1", -1));
+
+ versions.add(new Versions("7.3", "6", 1));
+ versions.add(new Versions("7.3", "6.4", 1));
+ versions.add(new Versions("7.3", "6.4.4", 1));
+ versions.add(new Versions("7.3", "7", 1));
+ versions.add(new Versions("7.3", "7.0", 1));
+ versions.add(new Versions("7.3", "7.3", 0));
+ versions.add(new Versions("7.3", "7.3.0", 0));
+ versions.add(new Versions("7.0", "7.0", 0));
+ versions.add(new Versions("7.3", "7.3.3", -1));
+ versions.add(new Versions("7.3", "7.30", -1));
+ versions.add(new Versions("7.3", "7.30.3", -1));
+ versions.add(new Versions("7.3", "8", -1));
+ versions.add(new Versions("7.3", "8.0", -1));
+ versions.add(new Versions("7.3", "8.1", -1));
+ versions.add(new Versions("7.3", "8.1.1", -1));
+ versions.add(new Versions("7.3", "8.4", -1));
+ versions.add(new Versions("7.3", "8.4.4", -1));
+ versions.add(new Versions("7.3", "10", -1));
+ versions.add(new Versions("7.3", "10.0", -1));
+ versions.add(new Versions("7.3", "10.1", -1));
+ versions.add(new Versions("7.3", "10.1.1", -1));
+ versions.add(new Versions("7.3", "10.4", -1));
+ versions.add(new Versions("7.3", "10.4.4", -1));
+ versions.add(new Versions("7.3", "70", -1));
+ versions.add(new Versions("7.3", "70.1", -1));
+ versions.add(new Versions("7.3", "70.1.1", -1));
+ versions.add(new Versions("7.3", "72", -1));
+ versions.add(new Versions("7.3", "72.1", -1));
+ versions.add(new Versions("7.3", "72.1.1", -1));
+
+ versions.add(new Versions("7.5.4", "6", 1));
+ versions.add(new Versions("7.5.4", "6.4", 1));
+ versions.add(new Versions("7.5.4", "6.4.4", 1));
+ versions.add(new Versions("7.5.4", "6.5", 1));
+ versions.add(new Versions("7.5.4", "6.5.4", 1));
+ versions.add(new Versions("7.5.4", "7", 1));
+ versions.add(new Versions("7.5.4", "7.0", 1));
+ versions.add(new Versions("7.5.4", "7.3", 1));
+ versions.add(new Versions("7.5.4", "7.3.0", 1));
+ versions.add(new Versions("7.5.4", "7.5", 1));
+ versions.add(new Versions("7.5.4", "7.5.3", 1));
+ versions.add(new Versions("7.5.4", "7.5.4", 0));
+ versions.add(new Versions("7.0.0", "7.0.0", 0));
+ versions.add(new Versions("7.5.4", "7.7", -1));
+ versions.add(new Versions("7.5.4", "7.7.6", -1));
+ versions.add(new Versions("7.5.4", "7.50", -1));
+ versions.add(new Versions("7.5.4", "7.50.3", -1));
+ versions.add(new Versions("7.5.4", "7.50.4", -1));
+ versions.add(new Versions("7.5.4", "8", -1));
+ versions.add(new Versions("7.5.4", "8.0", -1));
+ versions.add(new Versions("7.5.4", "8.1", -1));
+ versions.add(new Versions("7.5.4", "8.1.1", -1));
+ versions.add(new Versions("7.5.4", "8.5", -1));
+ versions.add(new Versions("7.5.4", "8.5.4", -1));
+ versions.add(new Versions("7.5.4", "10", -1));
+ versions.add(new Versions("7.5.4", "10.0", -1));
+ versions.add(new Versions("7.5.4", "10.1", -1));
+ versions.add(new Versions("7.5.4", "10.1.1", -1));
+ versions.add(new Versions("7.5.4", "10.5", -1));
+ versions.add(new Versions("7.5.4", "10.5.4", -1));
+ versions.add(new Versions("7.5.4", "10.7.4", -1));
+ versions.add(new Versions("7.5.4", "7.10", -1));
+ versions.add(new Versions("7.5.4", "7.10.1", -1));
+ versions.add(new Versions("7.5.4", "7.10.5", -1));
+ versions.add(new Versions("7.5.4", "72", -1));
+ versions.add(new Versions("7.5.4", "72.1", -1));
+ versions.add(new Versions("7.5.4", "72.1.1", -1));
+
+ versions.add(new Versions("6.8.51", "6.8.50.20080730", 1));
+ versions.add(new Versions("6.9.4", "6.8.50.20080730", 1));
+ versions.add(new Versions("6.8.50.20080730", "6.8.50.20080730", 0));
+ versions.add(new Versions("6.5.4", "6.8.50.20080730", -1));
+ versions.add(new Versions("6.8.50", "6.8.50.20080730", -1));
+
+ for (Versions v : versions) {
+ assertEquals("Comparing " + v.version1 + " and " + v.version2, v.expectedResult,
+ LaunchUtils.compareVersions(v.version1, v.version2));
+ assertEquals("Comparing " + v.version2 + " and " + v.version1, -v.expectedResult,
+ LaunchUtils.compareVersions(v.version2, v.version1));
+ }
+ }
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/ProcStatParserTest.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/ProcStatParserTest.java
index 075854f6ca..e84026d4cc 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/ProcStatParserTest.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/tests/ProcStatParserTest.java
@@ -29,64 +29,51 @@ import org.junit.Test;
public class ProcStatParserTest {
- final static String stat_t0 = "cpu 27599070 16857 1627173 178832624 958471 10 21253 0 0 0\n" +
- "cpu0 7076626 3073 420740 44122942 620655 7 19123 0 0 0\n" +
- "cpu1 6839475 2644 480003 44885633 53738 2 1200 0 0 0\n" +
- "cpu2 6861775 9347 337505 44860715 195008 0 573 0 0 0\n" +
- "cpu3 6821192 1792 388924 44963332 89067 0 355 0 0 0\n" +
- "intr 255054962 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861780 5056689 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138534 3946219 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" +
- "ctxt 406954066\n" +
- "btime 1357642511\n" +
- "processes 187587\n" +
- "procs_running 2\n" +
- "procs_blocked 0\n" +
- "softirq 187777133 0 82842161 104536 3977894 3827626 0 3881246 12353598 94844 80695228";
+ final static String stat_t0 = "cpu 27599070 16857 1627173 178832624 958471 10 21253 0 0 0\n"
+ + "cpu0 7076626 3073 420740 44122942 620655 7 19123 0 0 0\n"
+ + "cpu1 6839475 2644 480003 44885633 53738 2 1200 0 0 0\n"
+ + "cpu2 6861775 9347 337505 44860715 195008 0 573 0 0 0\n"
+ + "cpu3 6821192 1792 388924 44963332 89067 0 355 0 0 0\n"
+ + "intr 255054962 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861780 5056689 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138534 3946219 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
+ + "ctxt 406954066\n" + "btime 1357642511\n" + "processes 187587\n" + "procs_running 2\n"
+ + "procs_blocked 0\n"
+ + "softirq 187777133 0 82842161 104536 3977894 3827626 0 3881246 12353598 94844 80695228";
final static String stat_t0_file = "/tmp/stat_t0";
- final static String stat_t1 = "cpu 27599216 16857 1627190 178835528 958483 10 21255 0 0 0\n" +
- "cpu0 7076664 3073 420751 44123650 620668 7 19125 0 0 0\n" +
- "cpu1 6839509 2644 480004 44886368 53738 2 1200 0 0 0\n" +
- "cpu2 6861813 9347 337507 44861445 195008 0 573 0 0 0\n" +
- "cpu3 6821229 1792 388926 44964063 89067 0 355 0 0 0\n" +
- "intr 255057230 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861874 5056997 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138618 3946264 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" +
- "ctxt 406958462\n" +
- "btime 1357642511\n" +
- "processes 187593\n" +
- "procs_running 5\n" +
- "procs_blocked 0\n" +
- "softirq 187779126 0 82842674 104538 3977978 3827690 0 3881346 12353760 94845 80696295";
+ final static String stat_t1 = "cpu 27599216 16857 1627190 178835528 958483 10 21255 0 0 0\n"
+ + "cpu0 7076664 3073 420751 44123650 620668 7 19125 0 0 0\n"
+ + "cpu1 6839509 2644 480004 44886368 53738 2 1200 0 0 0\n"
+ + "cpu2 6861813 9347 337507 44861445 195008 0 573 0 0 0\n"
+ + "cpu3 6821229 1792 388926 44964063 89067 0 355 0 0 0\n"
+ + "intr 255057230 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861874 5056997 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138618 3946264 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
+ + "ctxt 406958462\n" + "btime 1357642511\n" + "processes 187593\n" + "procs_running 5\n"
+ + "procs_blocked 0\n"
+ + "softirq 187779126 0 82842674 104538 3977978 3827690 0 3881346 12353760 94845 80696295";
final static String stat_t1_file = "/tmp/stat_t1";
- final static String stat_t2 = "cpu 27602962 16857 1627282 178835528 958483 10 21256 0 0 0\n" +
- "cpu0 7077593 3073 420781 44123650 620668 7 19126 0 0 0\n" +
- "cpu1 6840413 2644 480060 44886368 53738 2 1200 0 0 0\n" +
- "cpu2 6862773 9347 337507 44861445 195008 0 573 0 0 0\n" +
- "cpu3 6822181 1792 388933 44964063 89067 0 355 0 0 0\n" +
- "intr 255070028 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861998 5057533 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138674 3946472 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" +
- "ctxt 407001757\n" +
- "btime 1357642511\n" +
- "processes 187607\n" +
- "procs_running 5\n" +
- "procs_blocked 0\n" +
- "softirq 187794229 0 82852274 104540 3978034 3827918 0 3881474 12354181 94845 80700963";
+ final static String stat_t2 = "cpu 27602962 16857 1627282 178835528 958483 10 21256 0 0 0\n"
+ + "cpu0 7077593 3073 420781 44123650 620668 7 19126 0 0 0\n"
+ + "cpu1 6840413 2644 480060 44886368 53738 2 1200 0 0 0\n"
+ + "cpu2 6862773 9347 337507 44861445 195008 0 573 0 0 0\n"
+ + "cpu3 6822181 1792 388933 44964063 89067 0 355 0 0 0\n"
+ + "intr 255070028 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861998 5057533 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138674 3946472 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
+ + "ctxt 407001757\n" + "btime 1357642511\n" + "processes 187607\n" + "procs_running 5\n"
+ + "procs_blocked 0\n"
+ + "softirq 187794229 0 82852274 104540 3978034 3827918 0 3881474 12354181 94845 80700963";
final static String stat_t2_file = "/tmp/stat_t2";
-
+
// to trigger exception upon parsing
- final static String stat_wrong_content = "cpu 27602962 16857 1627282 178835528 958483 10 21256 0 0 0\n" +
- "cpu0 AAAAAAA 3073 420781 44123650 620668 7 19126 0 0 0\n" +
- "cpu1 AAAAAAA 2644 480060 44886368 53738 2 1200 0 0 0\n" +
- "cpu2 AAAAAAA 9347 337507 44861445 195008 0 573 0 0 0\n" +
- "cpu3 AAAAAAA 1792 388933 44964063 89067 0 355 0 0 0\n" +
- "intr 255070028 1785 9 0 0 0 0 0 0 1 393 0 0 125 0 0 0 1861998 5057533 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3138674 3946472 2295808 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0