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

Bug 339047

Summary: [non-stop][multi-process] No need to interrupt the inferior in non-stop mode
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, ling.5.wang, pawel.1.piech
Version: 8.0Flags: marc.khouzam: review? (ling.5.wang)
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-03-06 23:08:21 EST
Created attachment 190510 [details]
Fix

When we want to terminate the inferior or GDB, we send 'kill' or '-gdb-exit' respectively.  However, we first check if MIInferiorProcess is RUNNING and if it is, we interrupt it so that GDB will accept commands.

This behavior is specific to all-stop mode, where GDB does not accept commands when the inferior is running.  In non-stop mode, GDB always accepts commands so we don't need to interrupt the inferior.  Although this is not a big deal, it is valuable to handle MIInferiorProcess better for multi-process.

This patch creates IMIRunControl#isTargetAcceptingCommands() instead of relying on MIInferiorProcess.
Comment 1 Marc Khouzam CLA 2011-03-06 23:11:26 EST
Committed to HEAD.
Comment 2 Marc Khouzam CLA 2011-03-06 23:17:24 EST
Ling, can you review, it is related to your fix of bug Bug 234467
Comment 3 CDT Genie CLA 2011-03-06 23:23:20 EST
*** cdt cvs genie on behalf of mkhouzam ***
Bug 339047: No need to interrupt the inferior in non-stop mode

[*] GDBControl_7_0.java 1.28 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java?root=Tools_Project&r1=1.27&r2=1.28
[*] GDBControl.java 1.24 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java?root=Tools_Project&r1=1.23&r2=1.24

[*] MIRunControl.java 1.32 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java?root=Tools_Project&r1=1.31&r2=1.32
[*] IMIRunControl.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java?root=Tools_Project&r1=1.7&r2=1.8

[*] GDBRunControl_7_0_NS.java 1.28 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java?root=Tools_Project&r1=1.27&r2=1.28
[*] GDBProcesses.java 1.17 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.java?root=Tools_Project&r1=1.16&r2=1.17
[*] GDBProcesses_7_0.java 1.40 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.39&r2=1.40
Comment 4 Ling Wang CLA 2011-03-08 01:17:28 EST
(In reply to comment #2)
> Ling, can you review, it is related to your fix of bug Bug 234467

Looks good to me, though my gdb knowledge is rusty now.