Skip to main content

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.

Jump to: navigation, search

Disassembly window management

This document describes the proposals for the disassembly window manager. The disassembly window manager is a singleton associated with CDebugUIPlugin that maps a disassembly context exposed by a debug session into a disassembly window. When the session unregisters its disassembly context the manager is responsible to close the corresponding window.

Note: I am using “Disassembly Window” instead of “Disassembly Editor” only to stress that it is not editable. In fact, the implementation extends EditorPart and is located in the editor area of the Eclipse workbench.

Question: Do we need to support as an option a single reusable disassembly window?


Requirements

1. Any debug session can operate with one or more disassembly windows. In most cases it is one window per session, but there are use cases when multiple windows are required, for example, when two or more cores are being debugged synchronously.

2. Debug session is responsible to notify the disassembly window manager that it is no more interested in displaying the disassembly for the given context.

3. Users can open a disassembly window for the current debug context using the “Open Disassembly” action.

4. Special preferences (global or session specific?), such as “Display disassembly when no source information is available”, control the automatic opening of the disassembly window.


Interfaces

IDisassemblyContextService

Description:
Interface for registering disassembly context objects. Clients interested in the context change notifications may register a listener.

This interface is not intended to be implemented by clients. It can be accessed from CDebugCorePlugin.


Methods:
register
unregister
addDisassemblyContextListener
removeDisassemblyContextListener


IDisassemblyContextListener

Description:
The instances of this interface are notified when a disassembly context is registered or unregistered with IDisassemblyContextService.

Clients may implement this interface.

Methods:
contextAdded
contextRemoved


IDisassemblyContextProvider

Description:
This adapter interface provides disassembly context for debug context objects.

Methods:
getDisassemblyContext


DisassemblyWindowManager

Description:
Manages all disassembly windows opened for registered disassembly contexts. The “openEditor” method should be used in ISourceDisplay adapters.

Methods:
openEditor


Steps required to integrate a debug model in Disassembly Window Manager:

1. Implement an IDisassemblyContextProvider object and register it as a runtime adapter with the corresponding elements of the debug model. The disassembly context exposed by a debug model element must remain the same during the time when the session is active. Different model elements may expose different contexts. For instance, IDiassembly object can be used as a disassembly context for ICStackFrame elements.

2. When a debug session is started it is required to register with the disassembly context service any disassembly context created by this session.

3. When a debug session is terminated it must unregister all disassembly context objects it has registered.

4. In any implementation of ISourceDisplay the “openEditor” method of DisassemblyWindowManager should be used to open a disassembly window for a given debug context. An abstract ISourceDisplay class can be supplied to wrap this functionality.

Back to the top