Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341735 - [multi-process][all-stop] Terminating or detaching from a process may leave a running target suspended
Summary: [multi-process][all-stop] Terminating or detaching from a process may leave a...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 21:53 EDT by Marc Khouzam CLA
Modified: 2020-09-04 15:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.