| Summary: | [memory][non-stop] Memory not shown in some cases for non-stop multi-threaded programs | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 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, pawel.1.piech | ||||||
| Version: | 8.0 | Flags: | marc.khouzam:
review?
(pawel.1.piech) |
||||||
| Target Milestone: | 8.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marc Khouzam
Created attachment 189214 [details] Proposed fix The reason GDBMemory_7_0#readMemoryBlock() chooses a thread before fetching memory is because before GDB 7.2, there was no way to specify which process we want to point to in an MI command (see Bug 241317 comment #1). To work around that, we need to specify a particular thread for that process. The current bug is that we don't take into account that GDB cannot read memory when pointing to a thread that is running. For non-stop mode we can have some threads running with others stopped, so we need to choose a thread that is actually stopped to be able to read any memory for that process. The attached patch chooses the first thread that is stopped. If all threads are running, then the MI command will fail with a target unavailable, as was correctly done before. Created attachment 189221 [details]
Fixed including writing case
I forgot to fix the same issue for the writing of memory.
*** cdt cvs genie on behalf of mkhouzam *** Bug 337460: Memory not shown in some cases for non-stop multi-threaded programs [*] GDBMemory_7_0.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory_7_0.java?root=Tools_Project&r1=1.3&r2=1.4 Committed to HEAD and 7_0. I realize I missed CDT 7.0.2 but I still want the fix the branch for my own use. Pawel can you review this small fix? *** cdt cvs genie on behalf of mkhouzam *** Bug 337460: Memory not shown in some cases for non-stop multi-threaded programs. [*] GDBMemory_7_0.java 1.3.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory_7_0.java?root=Tools_Project&r1=1.3&r2=1.3.2.1 |