a flexible debug platform | © 2005 by ibm; made available under the epl v1.0 1 progress report -...

14
1 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 Progress Report - Debug Platform (3.2 M4) State of 3.2 M4 Some Demos Next Steps

Upload: braydon-steggall

Post on 01-Apr-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

1 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Progress Report - Debug Platform (3.2 M4)

State of 3.2 M4 Some Demos Next Steps

Page 2: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

2 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Progress Summary

The goal: The debug platform should support arbitrary debug architectures and

implementations of debuggers. The good news:

The 3.2 M4 debug platform has the ground work in place to support arbitrary debug implementations

Disclaimer: Of course, there’s still more to do…

Page 3: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

3 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

What We Have

Support arbitrary debug models Flexible hierarchy

all views support arbitrary content (except breakpoints view) Asynchronous content and labels

Hierarchy of asynchronous viewers (tree & table) Adapters provide content and labels Cancelable Customizable per view

Model drives the view

Model proxy interfaces model with viewer, firing deltas to describe what has changed in the model

Platform provides model proxies for standard models

Page 4: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

4 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

View Content

Viewer

Model

Content Adapter

Request Monitor

retrieveChildren()

Model Specific API

add(…)

done()

setChildren()

Page 5: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

5 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

View Update

Viewer

ElementModel Proxy

Model

refresh()

update()

select()

expand()

Model Specific API

installs

Update Policy

model deltas

Page 6: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

6 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Model Proxy (what) and Update Policy (when)

What to update A model proxy reports deltas in a model

When an element is added to a viewer, its associated model proxy (if any), is installed in the viewer. When the element is removed from the viewer, its model proxy is removed (disposed).

Model drives the view update Factory is used to generate model proxy per element, per view

When to update Update policy listens to deltas and updates viewer

Created by viewer Platform provides generally useful policies (i.e. update

immediately, delayed update, update on demand)

Page 7: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

7 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Model Proxy

The interfaces: IModelProxyFactory

createModelProxy(Object, IPresentationContext) IModelProxy

init(IPresentationContext) Installed() dispose() add/removeModelChangedListener(IModelChangedListener)

An model proxy updates a single instance of a model in a viewer A model proxy is installed on a specific context/viewer

Fires element deltas for an instance of a model

Page 8: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

8 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Model Proxy cont’d

An model proxy is usually contributed only for the root element in a model (per view)

E.g., the model proxy for a standard debug model is contributed for IDebugTarget. The proxy listens to events in that target only, and fires corresponding deltas

An implementer could choose to contribute proxies for each of its elements

The debug platform contributes Debug view model proxies for: ILaunchManager – fires deltas as launches are added/removed

ILaunch – fires deltas process and debug targets are added/terminated

IProcess – fires delta when terminate event is fired

Page 9: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

9 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Model Deltas

Deltas describe changes in a model and actions to take Tree structure similar to resource deltas

Each node describes an element in the view and its changes (if any)

Change types: ADDED, REMOVED, CHANGED, NOCHANGE Change details: CONTENT, STATE Actions: EXPAND, SELECT

Eg. LaunchManager (NOCHANGE) Launch (NOCHANGE)

DebugTarget (NOCHANGE) Thread (CHANGE, CONTENT+STATE, EXPAND)

Frame (SELECT)

Page 10: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

10 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

But Wait - There’s More

Debug Context Manager Retargettable actions

Step, terminate, etc., work on active context Debug view is default context provider,

Flexible view wiring

Variables view gets input from active context Expression view updates based on active context

Pluggable source lookup

based on active context

Page 11: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

11 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

User Interaction

Debug

View

Selection

Actions

(getAdapter IStep, etc)

Source Lookup

(getAdapter ISourceDisplay)

Debug Context

Manager

Provides context

Context activated

Context activated

Page 12: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

12 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Demos

Java Debugger Locks & monitors

Thread groups Asynchronous Table

Ticker table

Page 13: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

13 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Thread Groups

1. Added thread groups to our model (IJavaThreadGroup)2. Implemented & registered adapters:

Tree content adapter

Label adapter

3. Implemented & registered model proxy Java debug target model proxy replaces the standard debug target

model proxy, and generates paths to threads considering thread groups

Subclass of standard debug target proxy and standard thread event handler. Overrides one method that generates path to a thread.

Page 14: A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0 1 Progress Report - Debug Platform (3.2 M4)  State of 3.2 M4  Some Demos

14 A Flexible Debug Platform | © 2005 by IBM; made available under the EPL v1.0

Next Steps

High Priority Viewer enhancements (intended for 3.2) Support for SWT virtual tree

Incremental content retrieval

Tree table (columns in existing views)

Pluggable cell editors

Improved Java doc Other considerations (likely post 3.2)

Multiple contexts and view sets

Drag & drop (maybe 3.2)

Consider use of table and tree models

Re-useable model proxy hierarchy

Re-useable update policies