Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Platform debug model

The platform debug model defines generic debug interfaces that are intended to be implemented and extended in concrete, language-specific implementations.

Artifacts

The model includes classes that represent different artifacts in a program under debug.  All of the artifacts implement IDebugElement in addition to their own interfaces.  The model includes definitions for the following artifacts:

  • Debug targets ( IDebugTarget) - a debuggable execution context, such as a process or virtual machine
  • Expressions ( IExpression) - a snippet of code that can be evaluated to produce a value
  • Memory blocks ( IMemoryBlock) - a contiguous segment of memory in an execution context
  • Registers ( IRegister) - a named variable in a register group
  • Register groups ( IRegisterGroup) - a group of registers assigned to a stack frame
  • Stack frames ( IStackFrame) - an execution context in a suspended thread containing local variables and arguments
  • Threads ( IThread) - a sequential flow of execution in a debug target containing stack frames
  • Values ( IValue) - the value of a variable
  • Variables ( IVariable) - a visible data structure in a stack frame or value
  • Watch expressions ( IWatchExpression) - an expression that updates its value when provided with a particular context

Plug-ins that implement language-specific debuggers typically extend these interfaces to include language-specific behavior.  All debug elements can return the id of the plug-in that originated them.  This is important for registering other classes that are associated with a debug model, such as UI classes.

Actions

The model also includes interfaces that define a set of debug actions that are common behaviors among debug artifacts.  These interfaces are implemented by debug elements where appropriate.  They include the following actions:

  • Disconnect ( IDisconnect) - the ability to end a debug session with a target program and allow the target to continue running
  • Step ( IStep) - the ability to step into, over, and return from the current execution point
  • Step filters ( IStepFilters) - the ability to enable or disable filtering of step operations so that a debug target can apply filters to steps when appropriate
  • Suspend and resume ( ISuspendResume) - the ability to suspend and resume execution
  • Terminate ( ITerminate) - the ability to terminate an execution context
  • Modify a value ( IValueModification) - the ability to modify the value of a variable

If you look at the definitions for the platform debug elements, you will see that different elements implement different debug actions.  Standard interfaces for the elements and their behaviors allow the platform to provide abstract implementations of utility classes and UI support that can be extended for concrete implementations of debuggers.

Events

Debug events ( DebugEvent) are used to describe events that occur as a program is being debugged.  Debug events include the debug element that is associated with the event.  Each kind of debug element has a specific set of events that it supports as documented in DebugEvent. Debugger implementations can add application specific debug events using a designation of DebugEvent.MODEL_SPECIFIC as the kind of event. A client data field can be used in this case to add model-specific information about the event.

Debugger UI classes typically listen to specific events for elements in order display information about changes that occur in the elements.  Debug events arrive in groups called debug event sets.  Events that occur at the same point of execution in a program arrive in the same set.  Clients should implement an IDebugEventSetListener and register the listener with the org.eclipse.debug.core plug-in in order to receive debug events.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire