Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Breakpoints inserted using DSF not reflected in IDE.

Hi,
 
Thank you guys for getting back.
 
@Ling
 
 
If you just insert a breakpoint programmatically in DSF layer, it will not show up in IDE UI.  To add a breakpoint in UI programmatically, I think (I may be wrong) you will need to call platform API (the IDE layer above DSF/CDT) to do that.
 
I looked through the source code for some platform API to insert breakpoints. However those methods require IBreakpoint as an argument. I cannot create an IBreakpoint as that interface and all the implementing classes are in internal packages. Hence I cannot access them.
 
 
However, I don't think it a good idea to add a breakpoint in the UI without the debugger user's "permisssion" as breakpoints in UI are supposed to be solely controled by user.  Of course debugger can insert breakpoints internally to perform some tasks (e.g. temporary breakpoints for stepping), but those breakpoints are internal and should not be visible to user.
 
 
I dont want to add a breakpoint only in the UI. I want to add a breakpoint such that it is reflected in the IDE and target.
 
Regards.
 
- Ling
 
 
@Marc
 
Hi,
 
DSF-GDB does not currently use BreakpointMediator but it will in the near future (that's the plan anyway)
219604: [breakpoints] Modify MIBreakpointsManager to extend BreakpointMediator
https://bugs.eclipse.org/bugs/show_bug.cgi?id=219604
You can immitate either MIBreakpointsManager  or BreakpointMediator (BreakpointMediator 2?) for your own stuff.
In CDI, ICDITarget.setLineBreakpoint was enough to create a breakpoint on IDE and target. Is there something similar in DSF. I know IBreakpoints is used for breakpoints, but that is only on the target side not the IDE side.
The current MIBreakpointsManager works for GDB and MinGW. Since I am using MinGW, I want to know if there is a way to use existing MIBreakpointsManager or any other class which will insert breakpoints on target and IDE, instead of extending or immitating MIBreakpointsManager.
 
 

As for deletion, you can look at how MIBreakpointsManager#uninstallBreakpoint does it, which is to store the contexts that correspond
to the platform breakpoint.  The map you mentions seems to be the right thing.
 
Marc
 
I did look at the method you mentioned. That method uses an ICBreakpoint. I only have access to IBreakpointDMContext and IBreakpointDMData.
However my question was how I can use the Maps (they are all private). Or I have to define my own Maps ?
 
 
Thank you,
Rohit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ext Rohit Girme
Sent: Thursday, July 15, 2010 10:23 AM

To: CDT General developers list.
Subject: [cdt-dev] Breakpoints inserted using DSF not reflected in IDE.

Hi,
 
Let me start by explaining what I want to do.
I want to programmatically insert breakpoints using DSF. I am using Eclipse 3.5.2 along MinGW toolchain in Windows.
 
I am able to insert breakpoints using the IBreakpoints service provided by DSF. Specifically the IBreakpoints.insertBreakpoint() method. However these breakpoints are inserted on the target but cannot be seen in the Eclipse IDE. There is a similar post which talks about breakpoints using DSF. However the discussion says nothing about IDE breakpoints.
I went through the PDA example provided with the DSF plugins, but could not find anything that will help me.
The PDA example talks about the Breakpoints Mediator, but I dont think it is being used in the DSF - GDB plugin. Instead MIBreakpointManager is used.
Can someone help me out or guide me in some way ?
 
The second issue is deleting breakpoints. I am able to delete breakpoints successfully using DSF. However when it comes to deleting individual breakpoints, I am stuck. I know I have to use IBreakpoints.removeBreakpoint(). But how do I get the specific IBreakpointDMContext ? Is there any way I can acquire IBreakpointDMContext for a particular breakpoint using the breakpoint attributes e.g. IBreakpointDMContext corresponding to a breakpoint at line number 34 ?
After going through the source code I realized, DSF uses a Map of some kind. Can I use that or some other way ?
 
Thanks for your help guys.
 
-- 
Regards,
Rohit Girme


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




--
Thanks & Regards,
Rohit Girme


Back to the top