Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336872

Summary: [tracepoints] "Toggle Method Breakpoint" is not working as expected for tracepoints
Product: [Tools] CDT Reporter: Nobody - feel free to take it <nobody>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, marc.khouzam, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Nobody - feel free to take it CLA 2011-02-10 15:53:38 EST
"Toggle Method Breakpoint" action from the global "Run" menu and "Toggle Breakpoint" action from the Outline view's context menu don't delete an existing method tracepoint. Instead a new tracepoint is created.
The reason is that CDIDebugModel.functionBreakpointExists() checks whether the tracepoint's marker type is equal to CFunctionBreakpoint.getMarkerType(). Because a method tracepoint has a different marker type this condition always fails.
I don't remember why this condition was added originally, but the similar condition was removed for line breakpoints to fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=72555.
Comment 1 Marc Khouzam CLA 2011-02-10 17:03:16 EST
Did you also notice that for DSF-GDB, method breakpoints/tracepoints are not being set on the method, but are being set in GDB as line bp/tp?

I just noticed this.  For some reason, both the line and the method name are set as attributes which makes the bp service use the line number before it checks for a method name.

Should I open a separate bug?
Comment 2 Nobody - feel free to take it CLA 2011-02-10 17:51:52 EST
(In reply to comment #1)
> Did you also notice that for DSF-GDB, method breakpoints/tracepoints are not
> being set on the method, but are being set in GDB as line bp/tp?
> 
> I just noticed this.  For some reason, both the line and the method name are
> set as attributes which makes the bp service use the line number before it
> checks for a method name.
> 

As far as I know the line attribute is set to show the breakpoint in the editor. Can you check the breakpoint type before setting it?

> Should I open a separate bug?

I think it's better to open a separate bug.
Comment 3 Marc Khouzam CLA 2011-02-18 06:41:11 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Did you also notice that for DSF-GDB, method breakpoints/tracepoints are not
> > being set on the method, but are being set in GDB as line bp/tp?
> > 
> > I just noticed this.  For some reason, both the line and the method name are
> > set as attributes which makes the bp service use the line number before it
> > checks for a method name.
> > 
> 
> As far as I know the line attribute is set to show the breakpoint in the
> editor. Can you check the breakpoint type before setting it?
> 
> > Should I open a separate bug?
> 
> I think it's better to open a separate bug.

I opened Bug 336888