Bug 376116 - [tracepoints] Cannot use new "Add breakpoint..." with tracepoints
Summary: [tracepoints] Cannot use new "Add breakpoint..." with tracepoints
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.2   Edit
Assignee: Marc Khouzam CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 15:46 EDT by Marc Khouzam CLA
Modified: 2013-03-14 06:51 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 Marc Khouzam CLA 2012-04-04 15:46:00 EDT
When I try to use the new "Add breakpoint..." menu in the editor margin, with the breakpoint type set to "C/C++ Tracepoints" I get the following dialog:

"No property pages for C/C++ Line Breakpoints"

Same problem if I use the key binding "Ctrl+Double click"
Comment 1 Pawel Piech CLA 2012-04-04 16:32:47 EDT
Each individual property page contributed for various CDT breakpoints needs to be updated to support editing breakpoint prior to creation.  The process involves changing the pages so they don't read/write directly to the breakpoint (because its marker doesn't exist), but rather to the preference store.  This can be simple, but may get involved depending on how the page is written.

I've done this conversion for the common page but I did not follow through with all the other contributed pages because of time.  I actually didn't realize that tracepoints use a separate property page.  I could disable the "Add Breakpoint..." action for tracepoints for now, but I'll try to get to the tracepoints page sometime soon.
Comment 2 Marc Khouzam CLA 2012-04-09 09:15:23 EDT
(In reply to comment #1)
> I could disable the "Add Breakpoint..." action for tracepoints for now,
>  but I'll try to get to the tracepoints page sometime soon.

Although disabling this for Tracepoint could make sense, since Tracepoints don't take effect when created, but only when tracing is started, I think that keeping the same feature as for breakpoints will be more friendly to users.
Comment 3 Marc Khouzam CLA 2013-03-10 22:45:15 EDT
I've pushed a fix to gerrit:
https://git.eclipse.org/r/11033

I still want to run more tests before asking Pawel for a review, if he has the time.
Comment 4 Marc Khouzam CLA 2013-03-13 06:59:52 EDT
I've pushed a slightly update version to gerrit that's ready for review.

The patch does the following:
- Enable the tracepoint property page to be displayed using "Add breakpoint..." in plugin.xml
- Update GDBTracepointPropertyPage to use the preference store properly since the marker may not exist
- Have the tp property page use CBreakpointPreferenceStore instead of TracepointPreferenceStore (which is removed completely), because CBreakpointContext uses that type of preference store
- Update CBreakpointPreferenceStore to handle the Tracepoint PASS_COUNT message (although this change is not strictly necessary, I felt it was more future-proof)
- Enable interactive tp creation in DisassemblyToggleTracepointsTarget

Pawel, can you review to see if I covered the different necessary points?  Thanks.
Comment 5 Marc Khouzam CLA 2013-03-14 06:49:19 EDT
Pawel wrote in Gerrit:

> The tracepoint support changes look fine to me. I see that 
> GDBTracepointPropertyPage doesn't support contributed field editors 
> in the same way that CBreakpointPropertyPage does, but IMO that's just
> fine. 3rd parties are better off contributing additional breakpoint
> attributes using separate pages.

Thanks for the review.

You're right that I never added contributed field editors for Tracepoint.  They are not as popular as breakpoints and no one has ever asked for anything like that.  So I agree with you that it is not a necessary support (at least for now).

I've committed to fix to master.