]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix mi_clean_restart <absolute filename> in gdb.trace
authorTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 13:41:22 +0000 (15:41 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 13:41:22 +0000 (15:41 +0200)
Fix mi_clean_restart <absolute filename> in the test-cases in gdb.trace.

Tested on x86_64-linux, with target boards unix, native-gdbserver and
native-extended-gdbserver.

gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
gdb/testsuite/gdb.trace/mi-trace-unavailable.exp
gdb/testsuite/gdb.trace/mi-traceframe-changed.exp
gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
gdb/testsuite/gdb.trace/mi-tsv-changed.exp

index dd0d78596e911aa18e614364e0d278b22f125511..9b4f053963afd7a4f0d401411940622d872ef44e 100644 (file)
@@ -37,7 +37,7 @@ gdb_exit
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-mi_clean_restart $binfile
+mi_clean_restart $testfile
 mi_runto_main
 
 mi_gdb_test "-break-insert end" \
index dde6d8bdaa3e435b5d3c05adea54347a6135d7a5..dd22046a0cf891d607e51aecf409b494781c5d6e 100644 (file)
@@ -35,7 +35,7 @@ gdb_exit
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-mi_clean_restart $binfile
+mi_clean_restart $testfile
 mi_runto_main
 
 mi_gdb_test "-break-insert marker" \
index 05c10ed2964694145fa28943c4cd59071fc03778..c34f117e4d50ea7d56dd593f3db40985c0df1dee 100644 (file)
@@ -45,11 +45,10 @@ remote_file target delete $tfile_basic
 
 proc test_tfind_tfile { } {
     with_test_prefix "tfile" {
-       global binfile
        global decimal
        global tfile_basic
 
-       mi_clean_restart $binfile
+       mi_clean_restart $::testfile
 
        mi_gdb_test "-target-select tfile ${tfile_basic}" \
            ".*=breakpoint-created,bkpt=\{number=\"${decimal}\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"write_basic_trace_file\".*\\^connected" \
@@ -120,9 +119,8 @@ gdb_exit
 proc test_tfind_remote { } {
     with_test_prefix "remote" {
        global decimal
-       global binfile
 
-       mi_clean_restart $binfile
+       mi_clean_restart $::testfile
        mi_runto_main
 
        mi_gdb_test "-break-insert end" "\\^done.*" "break end"
index 90654c0cd20d594e6b397562d00879bbe171c372..99f7bf9b67be3ea55ff8bc0476f70a7f8d8c0a6e 100644 (file)
@@ -89,9 +89,7 @@ proc test_reconnect { } {
            }
        }
 
-       global binfile
-
-       if {[mi_clean_restart $binfile]} {
+       if {[mi_clean_restart $::testfile]} {
            return
        }
 
@@ -155,11 +153,10 @@ proc test_pending_resolved { } {
     with_test_prefix "pending resolved" {
        global decimal hex
        global executable
-       global binfile
        global lib_sl1 lib_sl2
        global mi_gdb_prompt
 
-       if {[mi_clean_restart $binfile]} {
+       if {[mi_clean_restart $::testfile]} {
            return
        }
        mi_load_shlibs $lib_sl1 $lib_sl2
index f90d9a49bd247bcec9c3ae773f15c25feb2b536d..6f71e79c93b5395f1c8eb8679518bccf42ac756a 100644 (file)
@@ -77,7 +77,7 @@ proc test_create_delete_modify_tsv { } {
        }
        gdb_exit
 
-       if {[mi_clean_restart $binfile]} {
+       if {[mi_clean_restart $::testfile]} {
            return
        }
 
@@ -145,7 +145,7 @@ proc test_upload_tsv { } {
            return 0
        }
 
-       clean_restart $testfile
+       clean_restart $::testfile
        if {![runto_main]} {
            return 0
        }
@@ -175,8 +175,7 @@ proc test_upload_tsv { } {
            }
        }
 
-       global binfile
-       if {[mi_clean_restart $binfile]} {
+       if {[mi_clean_restart $::testfile]} {
            return
        }