a8767b3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
f524ac5
From: Fedora GDB patches <invalid@email.com>
f524ac5
Date: Fri, 27 Oct 2017 21:07:50 +0200
f524ac5
Subject: gdb-6.6-scheduler_locking-step-is-default.patch
f524ac5
f637971
;; Make upstream `set scheduler-locking step' as default.
f637971
;;=push+jan: How much is scheduler-locking relevant after non-stop?
f524ac5
f637971
diff --git a/gdb/infrun.c b/gdb/infrun.c
f637971
--- a/gdb/infrun.c
f637971
+++ b/gdb/infrun.c
f637971
@@ -2202,7 +2202,7 @@ static const char *const scheduler_enums[] = {
Jan Kratochvil 23f398e
   schedlock_replay,
c78c51c
   NULL
c78c51c
 };
Jan Kratochvil 23f398e
-static const char *scheduler_mode = schedlock_replay;
c78c51c
+static const char *scheduler_mode = schedlock_step;
c78c51c
 static void
c78c51c
 show_scheduler_mode (struct ui_file *file, int from_tty,
c78c51c
 		     struct cmd_list_element *c, const char *value)
f637971
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
f637971
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
f637971
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
f637971
@@ -199,7 +199,7 @@ mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" \
2280d55
 # Test that the token is output even for CLI commands
2280d55
 # Also test that *stopped includes frame information.
2280d55
 mi_gdb_test "34 next" \
2280d55
-    ".*34\\\^running.*\\*running,thread-id=\"all\"" \
2280d55
+    ".*34\\\^running.*\\*running,thread-id=\"1\"" \
2280d55
     "34 next: run"
2280d55
 
Jan Kratochvil eb6cb2d
 # Test that the new current source line is output to the console
f637971
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
f637971
--- a/gdb/testsuite/gdb.mi/mi-console.exp
f637971
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
f637971
@@ -60,6 +60,9 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
f637971
 
f637971
 mi_run_to_main
f637971
 
f637971
+# thread-id=\"all\" vs. thread-id=\"1\" below:
f637971
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
f637971
+
f637971
 # The output we get from the target depends on how it is hosted.  If
f637971
 # we are semihosted (e.g., the sim or a remote target that supports
f637971
 # the File I/O remote protocol extension), we see the target I/O
f637971
diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp
f637971
--- a/gdb/testsuite/gdb.mi/mi-logging.exp
f637971
+++ b/gdb/testsuite/gdb.mi/mi-logging.exp
f637971
@@ -53,7 +53,7 @@ close $chan
Jan Kratochvil 11eae30
 
Jan Kratochvil 11eae30
 set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
Jan Kratochvil 11eae30
 
Jan Kratochvil 11eae30
-if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
Jan Kratochvil 11eae30
+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
Jan Kratochvil af2c2a5
     pass "log file contents"
Jan Kratochvil 11eae30
 } else {
Jan Kratochvil af2c2a5
     fail "log file contents"
f637971
@@ -76,7 +76,7 @@ set chan [open $milogfile]
Jan Kratochvil 11eae30
 set logcontent [read $chan]
Jan Kratochvil 11eae30
 close $chan
Jan Kratochvil 11eae30
 
Jan Kratochvil 11eae30
-if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
Jan Kratochvil 11eae30
+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
Jan Kratochvil af2c2a5
     pass "redirect log file contents"
Jan Kratochvil 11eae30
 } else {
Jan Kratochvil af2c2a5
     fail "redirect log file contents"
f637971
diff --git a/gdb/testsuite/gdb.opt/inline-cmds.exp b/gdb/testsuite/gdb.opt/inline-cmds.exp
f637971
--- a/gdb/testsuite/gdb.opt/inline-cmds.exp
f637971
+++ b/gdb/testsuite/gdb.opt/inline-cmds.exp
f637971
@@ -331,7 +331,7 @@ proc mi_cli_step {cli_output_re message} {
Jan Kratochvil 0300a2e
 
Jan Kratochvil 0300a2e
     send_gdb "interpreter-exec console \"step\"\n"
Jan Kratochvil 0300a2e
     gdb_expect {
Jan Kratochvil 0300a2e
-	-re "\\^running\r\n\\*running,thread-id=\"all\"\r\n${mi_gdb_prompt}${cli_output_re}" {
Jan Kratochvil 0300a2e
+	-re "\\^running\r\n\\*running,thread-id=\"1\"\r\n${mi_gdb_prompt}${cli_output_re}" {
Jan Kratochvil 0300a2e
 	    pass $message
Jan Kratochvil 0300a2e
 	}
Jan Kratochvil 0300a2e
 	timeout {