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

Bug 341735

Summary: [multi-process][all-stop] Terminating or detaching from a process may leave a running target suspended
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Project Inbox <cdt-debug-dsf-gdb-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Khouzam CLA 2011-04-03 21:53:29 EDT
When we terminate or detach from a process in all-stop mode, we need to make sure GDB can receive commands.  To do that we interrupt GDB if the inferiors are running.

For single-process, it was ok to leave GDB interrupted since we had terminated or detached from the once process.  However, for multi-process, the other processes should resume execution once the one terminate/detach has been performed.

One possibility would be to use IMIRunControl.executeWithTargetAvailable() with interrupts the targets, does the operation and then resumes the target.  The problem is that we should not use that call when in non-stop mode, because we do not want to interrupt the target in that case, since GDB always accepts commands in non-stop mode.

But before getting this bug, we must fix bug 337897, which is to properly deal with all-stop mode and multi-process.