Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347196 - [tracepoints][multi-process] A tracepoint is not being set on the right process when using multi-process
Summary: [tracepoints][multi-process] A tracepoint is not being set on the right proce...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.1.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 13:12 EDT by Marc Khouzam CLA
Modified: 2012-02-23 11:33 EST (History)
2 users (show)

See Also:
pawel.1.piech: review+


Attachments
Fix to use -break-insert -a for tracepoints (8.71 KB, patch)
2011-05-27 16:23 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Git patch for fix (8.65 KB, patch)
2011-06-27 15:17 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

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