Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336872 - [tracepoints] "Toggle Method Breakpoint" is not working as expected for tracepoints
Summary: [tracepoints] "Toggle Method Breakpoint" is not working as expected for trace...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 15:53 EST by Nobody - feel free to take it CLA
Modified: 2020-09-04 15:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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