set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
-gdb_test "print my_buffer" \
- "= \\(size => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\), length => 8\\)" \
- "print empty"
+set test "print my_buffer"
+gdb_test_multiple "$test" $test {
+ -re "= \\(size => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\), length => 8\\)\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+ -re "= \\(size => 8, length => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\)\\)\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+}
gdb_test "print my_buffer'Address" \
"= \\(system\\.address\\) $hex" \
"print address"
-gdb_test "print {foo.octal_buffer} ($)" \
- "= \\(size => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\), length => 8\\)" \
- "print adress content"
+set test "print {foo.octal_buffer} ($)"
+gdb_test_multiple "$test" $test {
+ -re "= \\(size => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\), length => 8\\)\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+ -re "= \\(size => 8, length => 8, buffer => \\(1, 2, 3, 4, 5, 6, 7, 0\\)\\)\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+}