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

Bug 339882

Summary: [runcontrol] Make use of GDB's 'scheduler-locking' option
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: enhancement    
Priority: P3 CC: cdtdoug, nobody, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Adding the MI command to set scheduler-locking marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-03-14 09:35:47 EDT
GDB has an option called 'scheduler-locking' which controls how threads should be treated for a step/resume.

The different behaviors of run-control that this option offers may be of interest to user of DSF-GDB.
Comment 1 Marc Khouzam CLA 2011-05-17 16:08:54 EDT
This bug applies to all-stop mode.

Currently when resuming or stepping, the same GDB command is used independently
of the debug context.  This means that when a thread is selected and the user
resumes it, all threads are resumed.

GDb has the command 'set scheduler-locking on' which allows to keep every
things stopped, except the one that is being resumed.  Using this we could
offer the following:

1- if a stack or thread is selected, only resume that thread
2- if the process is selected, resume all threads of the process
3- for multi-process, if the launch is selected, resume all threads of all
processes (this may require a new setting that is being proposed in GDB, set
schedule-multiple off, see
http://sourceware.org/ml/gdb-patches/2009-05/msg00647.html)
Comment 2 Marc Khouzam CLA 2011-05-17 16:09:15 EDT
*** Bug 278623 has been marked as a duplicate of this bug. ***
Comment 3 Marc Khouzam CLA 2011-07-21 13:13:50 EDT
Created attachment 200109 [details]
Adding the MI command to set scheduler-locking

This patch simply adds the file for the 'set scheduler-locking' command.

Committed to master.
Comment 4 CDT Genie CLA 2011-07-21 14:19:24 EDT
*** cdt git genie on behalf of 339882 ***

    Bug 339882: Make use of GDB's 'scheduler-locking' option

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1923edd05cbbd501492eb348b6eceb389e26b218