Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] DSF: 3rd Party Plugin Breakpoint Support?

Pawel,

 

Here is an example of my client that can read memory from a dsf-gdb debugger and a dsf-custom debugger, without any knowledge of the debugger’s implementation, except dsf-framework and platform.

 

// get the debug context from platform

      IDMVMContext dvmContext = (IDMVMContext) DebugUITools.getDebugContext();

      IDMContext dmContext = dvmContext.getDMContext();

 

      // get the dsf service tracker

      DsfServicesTracker fServicesTracker = new DsfServicesTracker(ExamplePlugin.getBundleContext(), dmContext.getSessionId());

           

      // get the dsf memory service

      IMemory memoryService = fServicesTracker.getService(IMemory.class);

      IMemoryDMContext memoryContext = DMContexts.getAncestorOfType(dmContext, IMemoryDMContext.class);

 

      // request memory read

      requestMemory(memoryService, memoryContext);

 

 

For the breakpoint case, it is somewhat different; the client code has to know about CBreakpoint factory and custom breakpoint factory.

 

Patrick

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech
Sent: Monday, May 04, 2009 1:17 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] DSF: 3rd Party Plugin Breakpoint Support?

 

I'm sorry Patrick, but I'm still unclear on what you're trying to do, but I'll try to interpret your request:

Chuong, Patrick wrote:

Let’s say I have a plugin that want to support DSF w/GDB and DSF w/Custom Debugger.

The term plugin is confusing here.  Typically if you are integrating a custom debugger into Eclipse you will create more than one plugin.  Given that, I'd interpret your description that your customers need to use two debuggers: DSF-GDB as it is part of CDT (i.e. you're not customizing it), and your own debugger engine. 

Is there anyway to create a plugin that can insert a line breakpoint without the knowledge of the CDIDebuggerModel and the custom breakpoint factory?

"line breakpoint" is a very generic concept.  Java debugger uses line breakpoints as well as many other custom debuggers do. 

CDIDebuggerModel is a class with a collection of static convenience methods.  It does not hold any state data, so I don't understand how it would have "knowledge".  What is the custom breakpoint factory that you refer to.


Is this something that I have to provide as a DSF service i.e breakpoint factory service? Or there is a standard practice for plugin to follow inorder to support more than one debugger?

Eclipse framework in general supports many debuggers.  CDI is one such debugger, while DSF is more like a collection of utilities from which you can pick and choose.  I.e. DSF will not restrict what kind of breakpoints you can use.

The various Eclipse debugger APIs are vast and complicated.  So it can be very confusing to try to make sense of them just by studying a full implementation such as CDI or DSF-GDB.  I think you might find it helpful to complete some basic tutorials on Eclipse debug framework.  There is an original article "how to create your own debugger" written by Darin and it's from a few years ago.  There is also a tutorial on DSF which I presented at EclipseCon '08. 

Hope this helps,
Pawel

 

Thanks,

Patrick

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech
Sent: Friday, May 01, 2009 5:56 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] DSF: 3rd Party Plugin Breakpoint Support?

 

I don't completely understand the question.  A DSF breakpoint service is a consumer of breakpoints, it does not create them.  So you can use whatever factory you need (implemented in whatever plugin) to create the breakpoints,

Chuong, Patrick wrote:

Hi,

 

Can a 3rd party DSF plugin be written generically to support both ICBreakpoint and custom breakpoint without having to consider supporting different breakpoint factories?

 

From my understanding, CDIDebugModel is the factory for creating ICBreakpoint. A 3rd party DSF plugin can use the factory methods to create ICBreakpoint. However, the same plugin will need to depend on another plugin to create custom breakpoint. Is there anything that a 3rd party DSF plugin can do without having to depend on CDIDebugModel and custom breakpoint factory? Does a breakpoint factory interface at the DSF framework can help me to overcome this issue?

 

Thanks,

Patrick

 
 
 



 
 
 
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
  

 

 



 
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
  

 


Back to the top