[gdb/testsuite] Reduce errors after gdb exit in default_gdb_start
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / overlays.exp
index 13d2463b5eb7a77f4c89096279c90cf6676bc339..7ebb77695b3e3f9c12a1d7c74d3ac6fd1a5302fb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1997-2013 Free Software Foundation, Inc.
+# Copyright 1997-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
 
 set data_overlays 1
 
-if [istarget "d10v-*-*"] then {
-    set linker_script "${srcdir}/${subdir}/d10v.ld"
-} elseif [istarget "m32r-*-*"] then {
+if [istarget "m32r-*-*"] then {
     set linker_script "${srcdir}/${subdir}/m32r.ld"
-} elseif [istarget "spu-*-*"] then {
-    set linker_script "${srcdir}/${subdir}/spu.ld"
-    set data_overlays 0
 } else {
     verbose "Skipping overlay test -- not implemented for this target."
     return 
@@ -44,7 +39,7 @@ standard_testfile overlays.c ovlymgr.c foo.c bar.c baz.c grbx.c
 if {[build_executable $testfile.exp $testfile \
         [list $srcfile $srcfile2 $srcfile3 $srcfile4 $srcfile5 $srcfile6] \
         {debug ldscript=-Wl,-T$linker_script}] == -1} {
-     untested overlays.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -60,7 +55,8 @@ gdb_load ${binfile}
 #
 
 if ![runto_main] then {
-    gdb_suppress_tests
+    fail "can't run to main"
+    return 0
 }
 
 # couple of convenience variables
@@ -69,7 +65,7 @@ set iptrcast [string_to_regexp "(int *)"]
 set hexx "0x\[0-9abcdefABCDEF\]+"
 
 gdb_test_no_output "overlay manual"
-gdb_test "overlay list" "No sections are mapped." "List with none mapped"
+gdb_test "overlay list" "No sections are mapped." "list with none mapped"
 
 # capture the LMA addresses of [foo bar baz grbx foox barx bazx grbxx]
 
@@ -115,39 +111,39 @@ if $data_overlays then {
 # capture the VMA addresses of [foo bar baz grbx foox barx bazx grbxx]
 
 gdb_test "overlay map .ovly0" "" 
-gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "List ovly0"
+gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "list ovly0"
 set foo_vma [get_func_address "foo"  "foo"  "foo  runtime address"]
 
 gdb_test "overlay map .ovly1" "" 
-gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "List ovly1"
+gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "list ovly1"
 set bar_vma [get_func_address "bar"  "bar"  "bar  runtime address"]
 
 gdb_test "overlay map .ovly2" "" 
-gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "List ovly2"
+gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "list ovly2"
 set baz_vma [get_func_address "baz"  "baz"  "baz  runtime address"]
 
 gdb_test "overlay map .ovly3" "" 
-gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "List ovly3"
+gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "list ovly3"
 set grbx_vma [get_func_address "grbx" "grbx" "grbx runtime address"]
 
 if $data_overlays then {
     gdb_test "overlay map .data00" "" 
-    gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "List data00"
+    gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "list data00"
     gdb_test "print \$foox_vma = &foox" \
        ".* $iptrcast 0x.*"  "foox runtime addr"
 
     gdb_test "overlay map .data01" "" 
-    gdb_test "overlay list" "Section .data01, loaded .*, mapped .*" "List data01"
+    gdb_test "overlay list" "Section .data01, loaded .*, mapped .*" "list data01"
     gdb_test "print \$barx_vma = &barx" \
        ".* $iptrcast 0x.*"  "barx runtime addr"
 
     gdb_test "overlay map .data02" "" 
-    gdb_test "overlay list" "Section .data02, loaded .*, mapped .*" "List data02"
+    gdb_test "overlay list" "Section .data02, loaded .*, mapped .*" "list data02"
     gdb_test "print \$bazx_vma = &bazx" \
        ".* $iptrcast 0x.*"  "bazx runtime addr"
 
     gdb_test "overlay map .data03" "" 
-    gdb_test "overlay list" "Section .data03, loaded .*, mapped .*" "List data03"
+    gdb_test "overlay list" "Section .data03, loaded .*, mapped .*" "list data03"
     gdb_test "print \$grbxx_vma = &grbxx" \
        ".* $iptrcast 0x.*"  "grbxx runtime addr"
 }
@@ -173,7 +169,7 @@ gdb_expect {
     -re ".*ovly2, "            { fail ".ovly2  not unmapped by .ovly3"  }
     -re ".*data00,"            { fail ".data00 not unmapped by .data01" }
     -re ".*data02,"            { fail ".data02 not unmapped by .data03" }
-    -re ".*$gdb_prompt $"      { pass "Automatic unmapping"             }
+    -re ".*$gdb_prompt $"      { pass "automatic unmapping"             }
     timeout                    { fail "(timeout) Automatic unmapping"   }
 }
 
@@ -218,7 +214,7 @@ if $data_overlays then {
 # test automatic mode
 
 gdb_test_no_output "overlay auto"
-gdb_test "overlay list" "No sections are mapped." "List none mapped (auto)"
+gdb_test "overlay list" "No sections are mapped." "list none mapped (auto)"
 gdb_test "break foo"  "Breakpoint .*at .*file .*foo.c.*"  "break foo"
 gdb_test "break bar"  "Breakpoint .*at .*file .*bar.c.*"  "break bar"
 gdb_test "break baz"  "Breakpoint .*at .*file .*baz.c.*"  "break baz"
This page took 0.040365 seconds and 4 git commands to generate.