]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.arch/i386-disp-step.exp
Introduce language_defn::lookup_symbol_local
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-disp-step.exp
index 41f39cfb457569983c021667b001f774ac4c7998..ee26cc2c30c2303e291e3cb04e8c294e7869dc31 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2009-2024 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
 
 # Test i386 displaced stepping.
 
-if $tracelevel {
-    strace $tracelevel
-}
-
 
-if ![istarget "i?86-*-linux*"] then {
-    verbose "Skipping x86 displaced stepping tests."
-    return
-}
+require is_x86_like_target
 
-set testfile "i386-disp-step"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
 
-set additional_flags "-Wa,-g"
+set opts {}
+lappend opts debug
+lappend opts nopie
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested i386-disp-step.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] } {
     return -1
 }
 
-# Get things started.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 gdb_test "set displaced-stepping on" ""
 gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
 
-if ![runto_main] then {
-    fail "Can't run to main"
+if {![runto_main]} {
     return 0
 }