| Summary: | [breakpoints] Thread filter effectively disables a breakpoint at the next session | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc Khouzam <marc.khouzam> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, john, nobody, pawel.1.piech | ||||||
| Version: | 7.0.1 | Flags: | marc.khouzam:
review?
(nobody) |
||||||
| Target Milestone: | 8.0.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marc Khouzam
Probably related to Bug 355828 From bug 349736 comment 16 Mikhail wrote: > > Opening and closing the filter dialog seems to mark the breakpoint as deleted. > > It is still active in the current session but will not be set if the session is > > terminated and restarted. In the dialog it is shown as disabled for the entire > > target. > > This is happening for a program with one thread only. Seems to work fine for > multiple threads. I'm seeing the problem all the time, single-threaded, multi-threaded, even compiling without pthreads. Created attachment 202687 [details]
Cleanup of thread filtering (master branch)
Originally in DSF-GDB, the IBreakpointsTargetDMContext was the gdb node itself. This didn't match the code of CBreakpointGdbThreadsFilterExtension which expected a container (this class was more future proof). Therefore, some hacking had been done to figure out which container matched the IBreakpointsTargetDMContext.
With multi-process, IBreakpointsTargetDMContext is now the IContainerDMContext. Therefore, we can now handle the thread filtering cleanly and mimic the solution done in CDI.
The attached patch cleans up the logic for thread filtering. The main points are:
1- up the dsf.gdb.ui version from 2.2 to 2.3
2- Use IDsfBreakpointExtension instead of the specialized CBreakpointGdbThreadsFilterExtension. This simply makes searching for usage of the methods easier.
3- In MIBreakpointsManager we update the targetFilter list as follows:
a) when creating a new breakpoint: add the container to the target filter
b) when starting a new session, for each existing breakpoint, we add the container to the target filter
c) when shutting down a debug session, remove the container from the target filter
d) when deleting a breakpoint: remove the container from the target filter
e) fetch the filter for the container matching the IBreakpointsTargetDMContext to know if thread filters are active.
4- add some javadoc
I will commit to master.
I will make a different patch to avoid API changes for cdt_8_0
Created attachment 202690 [details]
Cleanup of thread filtering (8_0 branch)
Same patch for 8_0 except:
1- the version of dsf.gdb.ui goes from 2.2.0 to 2.2.1.
2- I forgot to update the pom.xml file (which I will also do for master)
3- No replacing CBreakpointGdbThreadsFilterExtension with IDsfBreakpointExtension to avoid changing APIs.
I'll commit this to cdt_8_0
Fixed. Mikhail, can you review? BTW, thread filtering still does not work with GDB 7.0 and 7.1. See Bug 356488 *** cdt git genie on behalf of Marc Khouzam ***
Bug 355833: Thread filter effectively disables a breakpoint at the next session
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=59d5eafbf610a5afab095923dcd02cbefffe1d02
*** cdt git genie on behalf of Marc Khouzam ***
Bug 355833: Thread filter effectively disables a breakpoint at the next session
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=82dfb619edb5e7c17d8c71872ddcb84d530eaa7f
|