[gdb/testsuite] Reduce errors after gdb exit in default_gdb_start
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / hbreak-unmapped.exp
index 95668f2fd62903c49a64c2ee907525cf6f4f4205..6a1035f89d852c5ac570fbf06f7a0f029fb7a7e2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2014 Free Software Foundation, Inc.
+# Copyright 2014-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
@@ -24,18 +24,14 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
 # If we can read the memory at address 0, skip the test.
-gdb_test_multiple "x 0" "memory at address 0" {
-    -re "0x0:.*Cannot access memory at address 0x0.*$gdb_prompt $" { }
-    -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { }
-    -re ".*$gdb_prompt $" {
-       untested "Memory at address 0 is readable"
-       return
-    }
+if { [is_address_zero_readable] } {
+    untested "memory at address 0 is readable"
+    return
 }
 
 delete_breakpoints
This page took 0.029557 seconds and 4 git commands to generate.