]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/lib/gdb-test.exp
gdb-test.exp (gdb-test): Turn off GDB's auto-load, list loaded libs.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / lib / gdb-test.exp
index 2169f26d2179c2b81b6977a78f2237939c66b433..9cb6ecfce3922b984485acfff34ff6ec69cc1ec5 100644 (file)
@@ -116,10 +116,18 @@ proc gdb-test { marker {selector {}} } {
     global gdb_tests
 
     set fd [open $cmd_file "w"]
+    # We don't want the system copy of the pretty-printers loaded
+    puts $fd "set auto-load no"
+    # Now that we've disabled auto-load, it's safe to set the target file
+    puts $fd "file ./$output_file"
+    # Load & register *our* copy of the pretty-printers
     puts $fd "source $pycode"
     puts $fd "python register_libstdcxx_printers(None)"
+    # And start the program
     puts $fd "break $line"
     puts $fd "run"
+    # So we can verify that we're using the right libs ...
+    puts $fd "info share"
 
     set count 0
     foreach {var result kind} $gdb_tests {
@@ -147,8 +155,7 @@ proc gdb-test { marker {selector {}} } {
     puts $fd "quit"
     close $fd
 
-    send_log "Spawning: $gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file\n"
-    set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file"]
+    set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file "]
     if { $res < 0 || $res == "" } {
        unsupported "$testname"
        return