Make gdb.base/sizeof.exp use gdb_test_stdio
authorPedro Alves <palves@redhat.com>
Wed, 29 Jul 2015 10:09:38 +0000 (11:09 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 29 Jul 2015 10:09:38 +0000 (11:09 +0100)
gdb/testsuite/ChangeLog:
2015-07-29  Pedro Alves  <palves@redhat.com>

* gdb.base/sizeof.exp (check_sizeof, check_valueof): Use
gdb_test_stdio.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/sizeof.exp

index f2f6adada2c2b047d5b566e5740d1960df6c418b..f735fb546f94f3eefb3c927559e22bfe8c971ed5 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use
+       gdb_test_stdio.
+
 2015-07-29  Pedro Alves  <palves@redhat.com>
 
        * lib/gdb.exp (gdb_test_stdio): New procedure.
index 7fda76e82c5a4ab52ad8428dd786ebf602162554..a237ee35ae4454dada175d533065253192d811d2 100644 (file)
@@ -70,8 +70,10 @@ set sizeof_long_double [get_sizeof "long double" 8]
 proc check_sizeof { type size } {
     global gdb_prompt
 
-    set pat [string_to_regexp "sizeof (${type}) == ${size}"]
-    gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*"  "check sizeof \"$type\""
+    set pat [string_to_regexp "sizeof (${type}) == ${size}\r\n"]
+    gdb_test_stdio "next" "${pat}" \
+       "\[0-9\].*" \
+       "check sizeof \"$type\""
 }
 
 check_sizeof "char" ${sizeof_char}
@@ -90,8 +92,10 @@ check_sizeof "long double" ${sizeof_long_double}
 proc check_valueof { exp val } {
     global gdb_prompt
 
-    set pat [string_to_regexp "valueof (${exp}) == ${val}"]
-    gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\""
+    set pat [string_to_regexp "valueof (${exp}) == ${val}\r\n"]
+    gdb_test_stdio "next" "${pat}" \
+       "\[0-9\].*" \
+       "check valueof \"$exp\""
 }
 
 # Check that GDB and the target agree over the sign of a character.