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

Bug 326970

Summary: [processes] Missing changes for GDB 7.2 (which can prevent cores to not be shown in the process label)
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: nobody, pawel.1.piech
Version: 8.0Flags: nobody: review+
Target Milestone: 7.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 317500    
Attachments:
Description Flags
Un-reviewed fix for HEAD
marc.khouzam: iplog-
Fix for HEAD
marc.khouzam: iplog-
Fix for 7_0 marc.khouzam: iplog-

Description Marc Khouzam CLA 2010-10-04 16:10:36 EDT
I guess I missed something when I fixed bug 317500.
For some reason, the new core label on the process entry is not show.  What should happen can be seen in:
http://wiki.eclipse.org/CDT/User/NewIn80#Showing_cores_in_Debug_view_labels

This works with GDB 7.1 and works for Threads for GDB 7.2 also, but not for processes for GDB 7.2
Comment 1 Marc Khouzam CLA 2010-10-04 21:25:40 EDT
I found some things that I had missed.

1- In GDBProcesses_7_1#getExecutionData(), I use the procId as a groupId in the IMIProcessDMContext case.  This is wrong for GDB 7.2
2- In GDBProcesses_7_0#getDebuggingContext(), I use the procId as a groupId when creating the container in both cases.  This is wrong for GDB 7.2
3- In GDBProcesses_7_0#attachDebuggerToProcess(), I use the procId as a groupId when I call createContainerContext()
4- In MIProcesses#getDebuggingContext(), I use the procId as a groupId when creating the container in both cases.  This code does not run for GDB 7.2, but should be fixed for consistency
5- In MIProcesses#attachDebuggerToProcess(), I use the procId as a groupId when I call createContainerContext().  This code does not run for GDB 7.2, but should be fixed for consistency
Comment 2 Marc Khouzam CLA 2010-10-05 14:12:24 EDT
Created attachment 180270 [details]
Un-reviewed fix for HEAD

I wanted to have this fixed so here is a patch that works.  I haven't properly reviewed it to make sure it is sane, but at least it is available.  I will have to be (easily) adapted for the 7_0 branch.

(In reply to comment #1)
> 4- In MIProcesses#getDebuggingContext()
> 5- In MIProcesses#attachDebuggerToProcess()

I was wrong about those two cases, they are code properly since the groupId is the same as the pId for those versions of GDB.
Comment 3 Marc Khouzam CLA 2010-10-05 14:16:00 EDT
I don't expect to complete this bug for the next four weeks, so if someone wants to take it, its fine with me.
Comment 4 Marc Khouzam CLA 2010-11-22 10:45:17 EST
Created attachment 183573 [details]
Fix for HEAD

Here is the fix for HEAD.  Same solution as before, but I made the class easier to override.  Committed to HEAD.
Comment 5 Marc Khouzam CLA 2010-11-22 11:17:29 EST
Created attachment 183574 [details]
Fix for 7_0

And here is the fix for 7_0.  Note that it is not a fix for showing the cores with 7.2, since this feature is new for CDT 8.0.  However, the couple of fixes I had missed in GDBProcesses_7_0 do belong in 7_0.

Committed to 7_0
Comment 6 Marc Khouzam CLA 2010-11-22 11:18:19 EST
Mikhail, you can let me know if you see any issues with this.
Comment 8 CDT Genie CLA 2010-11-22 11:23:08 EST
*** cdt cvs genie on behalf of mkhouzam ***
Bug 326970: [processes] Missing fixes to handle GDB 7.2 where groupId is no longer the pId

[*] GDBProcesses_7_0.java 1.21.2.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java?root=Tools_Project&r1=1.21.2.4&r2=1.21.2.5
Comment 9 Nobody - feel free to take it CLA 2010-12-03 14:28:10 EST
Looks good to me. Not sure that I have good understanding of the related MI protocol though.