Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339047 - [non-stop][multi-process] No need to interrupt the inferior in non-stop mode
Summary: [non-stop][multi-process] No need to interrupt the inferior in non-stop mode
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.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 23:08 EST by Marc Khouzam CLA
Modified: 2011-03-08 01:17 EST (History)
3 users (show)

See Also:
marc.khouzam: review? (ling.5.wang)


Attachments
Fix (9.59 KB, patch)
2011-03-06 23:08 EST, 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-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.