This extension contributes a set of widgets for viewing memory in different ways.
This extension must be used in conjunction with a Debug Adapter that implements a ReadMemoryRequest handler or alternative custom request that returns memory data. It has been tested against the CDT-GDB Adapter used as the backend for the CDT-GDB VSCode plugin.
The primary entry point for the backend functionality of the plugin is the the MemoryProvider
class. That class
has two primary functions: it handles requests that are specified by the Debug Adapter Protocol,
and it instantiates custom handlers that can provide additional functionality depending on the capabilities of a given debug adapter. In order to
register custom capabilities, the AdapterRegistry
matches debug types to objects implementing
the AdapterCapabilities
interface.
The basic MemoryWidget
class is a wrapper around two functional widgets, a MemoryOptionsWidget
and
aMemoryTableWidget
. The MemoryOptionsWidget
is responsible for configuring the display
and fetching memory, and the MemoryTableWidget
renders the memory according to the options
specified by the user in the MemoryOptionsWidget
. The basic combination of these three classes offers variable highlighting, ascii display, and
dynamic updating in response to events from the debug session, as well as the option to lock the view to ignore changes from the session.