-# Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 2002-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Regression test for PR11557. Make sure we don't end up with a stale
# register cache just after resuming a thread.
+if { ![support_displaced_stepping] } {
+ unsupported "displaced stepping"
+ return -1
+}
+
load_lib mi-support.exp
set MIFLAGS "-i=mi"
#
# Start here
#
-set testfile "ns-stale-regcache"
-set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/mi-$testfile"
+standard_testfile ns-stale-regcache.c
-set options [list debug incdir=$objdir]
+set options [list debug]
if {[gdb_compile "$srcdir/$subdir/$srcfile" \
$binfile executable $options] != "" } {
return -1
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load $binfile
-set supported 0
-gdb_test_multiple "-gdb-show non-stop" "" {
- -re ".*\\^done,value=\"off\",supported=\"(\[^\"\]+)\"\r\n$mi_gdb_prompt$" {
- if { $expect_out(1,string) == "1" } {
- set supported 1
- }
- }
- -re ".*$mi_gdb_prompt$" {
- }
-}
-
mi_gdb_test "-gdb-set non-stop 1" ".*"
-mi_gdb_test "-gdb-set target-async 1" ".*"
-detect_async
+mi_gdb_test "-gdb-set mi-async 1" ".*"
+mi_detect_async
if { [mi_run_to_main] < 0 } {
- perror "mi-ns-stale-regcache.exp tests suppressed"
continue
}