Disassembly window management

Revision as of 08:54, 13 December 2007 by Mikhail.Khodjaiants.arm.com(Talk | contribs)(New page: ==Proposals for Disassembly Window Management== This document describes the proposals for the disassembly window manager. The disassembly window manager is a singleton associated with CDe...)

Proposals for 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.

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.