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

Bug 347196

Summary: [tracepoints][multi-process] A tracepoint is not being set on the right process when using multi-process
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0Flags: pawel.1.piech: review+
Target Milestone: 8.1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix to use -break-insert -a for tracepoints
marc.khouzam: iplog-
Git patch for fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-05-25 13:12:41 EDT
We currently set tracepoints using the 'trace' CLI command.  CLI commands do not support the --thread-group flag.  Therefore, when we run multi-process and set a tracepoint, it does not get set for each process, but gets set multiple times for the current process in focus.

We can fix this by using the the MI command -break-insert -a for tracepoints which was introduced in GDB 7.1.

We can also fix this more generally by fixing bug 265673
Comment 1 Marc Khouzam CLA 2011-05-27 16:23:25 EDT
Created attachment 196807 [details]
Fix to use -break-insert -a for tracepoints

-break-insert -a was actually introduce in GDB 7.2

This patch makes use of it.
Comment 2 Marc Khouzam CLA 2011-06-27 15:17:39 EDT
Created attachment 198677 [details]
Git patch for fix

This is the patch I committed to master.  It uses MI to set tracepoints, starting with GDB 7.2, which is where the MI command (-break-insert -a) become available.
Comment 3 Marc Khouzam CLA 2011-06-27 15:19:01 EDT
Pawel, can your review?

Note that I didn't commit to the 8_0 branch because I added a new class, which I don't believed I'm allowed to add to a maintenance branch.
Comment 4 Marc Khouzam CLA 2011-06-27 16:03:46 EDT
> Note that I didn't commit to the 8_0 branch because I added a new class, which
> I don't believed I'm allowed to add to a maintenance branch.

What if I create the new class in an internal package for the 8_0 branch?  This is really a bug fix and not a feature, so it should be in the 8_0 branch.
Comment 5 Pawel Piech CLA 2011-06-28 17:47:55 EDT
I'm not too familiar with gdb tracepoints but the patch looks kosher to me.  

(In reply to comment #4)
> What if I create the new class in an internal package for the 8_0 branch?  This
> is really a bug fix and not a feature, so it should be in the 8_0 branch.
Sure, I think it's a reasonable workaround for the API tooling.