Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
PinAndClone
Contents
Pin & Clone Feature
Bugzilla entries
Support for debug view pin & clone - 145635
Allow multiple debug views and multiple debug context providers - 327263
Key Worlds and Phrases
Launch View: Known as Debug view, where stack frames, threads, processes, and others are display.
Debug Views: Views that reacts to debug context event, such as Expressions, Variables, Registers, Memory, Disassembly, Modules, and others.
Problem Definition
Debug views are used to monitor data for the selected debug context. In a multi-cores/threads/sessions environment, it is desirable to be able to compare data between debug contexts. Right now, the only way to be able to achieve the comparison is to open another workbench window, this also have its limitation. With two workbench windows open, real estate is an issue, and as well as debug context change can cause the debug views to change.
To achieve data comparison, it is necessary to be able to open multiple instances of a debug view in the same workbench window and be able to pin the view to a debug context.
Requirements
General
- Debug views shall have a toggle toolbar button for enable/disable pinning operation.
- When the view is pinned, there shall be an indication of which debug context the view is attached.
- The Launch view can use color (not recommanded) to correlate the pinned debug context with the debug view, or overlay the debug context icon with a number that can be correlate with the debug view.
- When the view is pinned and the pinned debug context is removed from the Launch view, the view shall blank out, but the button shall state pinned.
- When the view is pinned and the pinned debug context is added to the Launch view, the view shall update itself with the lastest data from the model.
- When the view is pinned, there shall be an indication of which debug context the view is attached.
- Debug views shall have a toolbar button to enable clone operation, pressing the clone button will open a new view of the same type.
- The title of the view shall have an index to differentiate itself from other view of the same type i.e Expressions.
- It shall be possible scope multiple debug contexts for a view, context change within the scope shall cause the view to update.
- A static label under the toolbar shall be visible when the view is pinned to a debug context, and hidden when it is unpin.
- There needs to be a way to translate selections in the Launch view to a set of debug context for the pin operation.
- i.e Translate multiple stackframes selection into a thread for the pinned debug context.
Use Cases
Compare expressions/variables between two cores
Goal: User launches a debug session with a multi-cores system and would like to monitor an array in share memory
Usage Flow:
- Launch a debug session
- Selects the thread/stackframe element of Core 1 in the Launch view
- Open the Expressions view and add an array variable to watch
- Click on the pin toolbar button in the Expressions view
- Selects the thread element of Core 2 in the Launch view
- Open a second Expression view and add an array variable to watch
- Click on the pin toolbar button in the second Expressions view
- Compares the array between two cores
Post Conditions:
- The views do not react to debug context change
- The views will continue to update whenever the array’s value changed
- The views shall indicates the thread/stackframe name for the pinned debug element
Compare memory between two processes
Goals: User launches a debug session and would like pin the Memory view to a process and compare the memory with another process
Usage Flow:
- Launch two debug sessions
- Selects a process/thread/stackframe in the Launch view
- Open a Memory view and set the start address
- Click on the pin toolbar button in the Memory view
- Selects another process/thread/stackframe in the Launch view
- Open a second Memory view and set the start address
Post Conditions:
- The first Memory view does not reacts to debug context change
- The views will continue to update whenever memory has changed
- The views shall indicates the process name for the pinned debug element
Pin Disassembly view to a process
Goals: User should be able to pin the Disassembly view to a process
Usage Flow:
- Launch a debug session
- Selects a process/thread/stackframe in the Launch view
- Open the Disassembly view
- Click on the pin toolbar button in the Disassembly view
- Selects a different process/thread/stackframe and perform step operations
Post Conditions:
- The Disassembly view shall not follows the debug context and remains on the pinned process
- The Disassembly view shall indicated the process name for the pinned debug element
Pinned context gets out of scope
Goals: Expressions view should remember pinned context when context gets out of scope
Pre Conditions:
- There is already a debug session
- The Expressions view is pinned to a stackframe
Usage Flow:
- Steps out of the stackframe that is pinned to the Expressions view
- Terminate the debug session
- Restart the debug session
Post Conditions:
- The Expressions view should blank out when the stackframe is out of scope (or session terminated), however the view should not unpin itself
- The Expressions view should reattach itself to stackframe context when it is valid
UI Presentation
These are ideas in past discussions on how the UI should look like.
- Have a pin toolbar button in the view, when pressed, the view will detach itself from debug context change event (I like this the most, it is simple and clean). Debug context can be provided from the debug view or create a drop down list with all pinnable debug contexts.
- The view tab and the text in the Launch view would change to a matching color ??? (Might not be able to implement due to platform and SWT changes)
- Use different icon in the view toolbar
- Have a tooltip show the pinned context or display the pinned context in a label above the tree view
- Embed breadcrumb into the view and have it as the context provider (I think this is a bit over kill, but it is the best to be able to switch context without using the Launch view).
- Have the Variables view to compare values for different threads, value columns for each thread. (This is only good for thread, doesn’t solve multi-processes/sessions case and only applicable to the Variable view)