+2020-05-27  Luis Machado  <luis.machado@linaro.org>
+
+       * gdb.arch/aarch64-sighandler-regs.exp: Fix duplicated test names.
+       * gdb.arch/aarch64-tagged-pointer.exp: Likewise.
+       * gdb.arch/arm-disassembler-options.exp: Likewise.
+       * gdb.arch/arm-disp-step.exp: Likewise.
+       * gdb.arch/thumb-prologue.exp: Likewise.
+       * gdb.base/async.exp: Likewise.
+       * gdb.base/auxv.exp: Likewise.
+       * gdb.base/complex-parts.exp: Likewise.
+       * gdb.base/ena-dis-br.exp: Likewise.
+       * gdb.base/foll-exec.exp: Likewise.
+       * gdb.base/permissions.exp: Likewise.
+       * gdb.base/relocate.exp: Likewise.
+       * gdb.base/return2.exp: Likewise.
+       * gdb.base/sigbpt.exp: Likewise.
+       * gdb.base/siginfo-obj.exp: Likewise.
+       * gdb.cp/converts.exp: Likewise.
+       * gdb.cp/exceptprint.exp: Likewise.
+       * gdb.cp/inherit.exp: Likewise.
+       * gdb.cp/nsnoimports.exp: Likewise.
+       * gdb.cp/virtbase2.exp: Likewise.
+       * gdb.mi/mi-var-cmd.exp: Likewise.
+       * gdb.mi/var-cmd.c: Likewise.
+
 2020-05-26  Tom Tromey  <tromey@adacore.com>
 
        * gdb.ada/arr_acc_idx_w_gap.exp: Add tests.
 
 
 # Check register values
 
-check_regs x $xreg_nums $reg_handler_value_64 ""
-check_regs v $vreg_nums $reg_handler_value_128 ".q.u"
-check_regs q $vreg_nums $reg_handler_value_128 ".u"
-check_regs d $vreg_nums $reg_handler_value_64 ".u"
-check_regs s $vreg_nums $reg_handler_value_32 ".u"
-check_regs h $vreg_nums $reg_handler_value_16 ".u"
-check_regs b $vreg_nums $reg_handler_value_8 ".u"
-if { $sve_hw } {
-  check_regs z $vreg_nums $zreg_handler_value ".d.u"
-  check_regs p $preg_nums $preg_handler_value ""
+with_test_prefix "handler frame 1st" {
+  check_regs x $xreg_nums $reg_handler_value_64 ""
+  check_regs v $vreg_nums $reg_handler_value_128 ".q.u"
+  check_regs q $vreg_nums $reg_handler_value_128 ".u"
+  check_regs d $vreg_nums $reg_handler_value_64 ".u"
+  check_regs s $vreg_nums $reg_handler_value_32 ".u"
+  check_regs h $vreg_nums $reg_handler_value_16 ".u"
+  check_regs b $vreg_nums $reg_handler_value_8 ".u"
+  if { $sve_hw } {
+    check_regs z $vreg_nums $zreg_handler_value ".d.u"
+    check_regs p $preg_nums $preg_handler_value ""
+  }
 }
 
 # Switch to the frame for main(), and check register values
       "#$mainframe.*in main ().*" \
       "set to main frame"
 
-check_regs x $xreg_nums $reg_main_value_64 ""
-check_regs v $vreg_nums $reg_main_value_128 ".q.u"
-check_regs q $vreg_nums $reg_main_value_128 ".u"
-check_regs d $vreg_nums $reg_main_value_64 ".u"
-check_regs s $vreg_nums $reg_main_value_32 ".u"
-check_regs h $vreg_nums $reg_main_value_16 ".u"
-check_regs b $vreg_nums $reg_main_value_8 ".u"
-if { $sve_hw } {
-  check_regs z $vreg_nums $zreg_main_value ".d.u"
-  check_regs p $preg_nums $preg_main_value ""
+
+with_test_prefix "main frame" {
+  check_regs x $xreg_nums $reg_main_value_64 ""
+  check_regs v $vreg_nums $reg_main_value_128 ".q.u"
+  check_regs q $vreg_nums $reg_main_value_128 ".u"
+  check_regs d $vreg_nums $reg_main_value_64 ".u"
+  check_regs s $vreg_nums $reg_main_value_32 ".u"
+  check_regs h $vreg_nums $reg_main_value_16 ".u"
+  check_regs b $vreg_nums $reg_main_value_8 ".u"
+  if { $sve_hw } {
+    check_regs z $vreg_nums $zreg_main_value ".d.u"
+    check_regs p $preg_nums $preg_main_value ""
+  }
 }
 
 # Switch back to the signal handler frame, and check register values
       "#$handlerframe.*handler \\\(sig=4\\\).*" \
       "set to signal handler frame"
 
-check_regs x $xreg_nums $reg_handler_value_64 ""
-check_regs v $vreg_nums $reg_handler_value_128 ".q.u"
-check_regs q $vreg_nums $reg_handler_value_128 ".u"
-check_regs d $vreg_nums $reg_handler_value_64 ".u"
-check_regs s $vreg_nums $reg_handler_value_32 ".u"
-check_regs h $vreg_nums $reg_handler_value_16 ".u"
-check_regs b $vreg_nums $reg_handler_value_8 ".u"
-if { $sve_hw } {
-  check_regs z $vreg_nums $zreg_handler_value ".d.u"
-  check_regs p $preg_nums $preg_handler_value ""
+with_test_prefix "handler frame 2nd" {
+  check_regs x $xreg_nums $reg_handler_value_64 ""
+  check_regs v $vreg_nums $reg_handler_value_128 ".q.u"
+  check_regs q $vreg_nums $reg_handler_value_128 ".u"
+  check_regs d $vreg_nums $reg_handler_value_64 ".u"
+  check_regs s $vreg_nums $reg_handler_value_32 ".u"
+  check_regs h $vreg_nums $reg_handler_value_16 ".u"
+  check_regs b $vreg_nums $reg_handler_value_8 ".u"
+  if { $sve_hw } {
+    check_regs z $vreg_nums $zreg_handler_value ".d.u"
+    check_regs p $preg_nums $preg_handler_value ""
+}
 }
 
 
 # Test that GDB manages caches correctly for tagged address.
 # Read from P2,
-gdb_test "x p2" "$hex:\[\t \]+0x000004d2"
+gdb_test "x p2" "$hex:\[\t \]+0x000004d2" "x p2"
 gdb_test_no_output "set variable i = 5678"
 # Test that *P2 is updated.
-gdb_test "x p2" "$hex:\[\t \]+0x0000162e"
+gdb_test "x p2" "$hex:\[\t \]+0x0000162e" "x p2, updated"
 
 # Read from SP1->i,
-gdb_test "print sp1->i" " = 1234"
+gdb_test "print sp1->i" " = 1234" "print SP1->i"
 # Write to SP2->i,
 gdb_test_no_output "set variable sp2->i = 5678"
 # Test that SP1->i is updated.
-gdb_test "print sp1->i" " = 5678"
+gdb_test "print sp1->i" " = 5678" "print SP1->i, updated"
 
 gdb_test "x/d &sp2->i" "$hex:\[\t \]+5678"
 gdb_test "x/d &sp1->i" "$hex:\[\t \]+5678"
 
 
 gdb_test "show disassembler-options" \
        "The current disassembler options are '$option'.*" \
-       "show disassembler-options $option"
+       "show disassembler-options $option, modified architecture"
 
 
 
     # Try to set breakpoint on test_ldm_stm_pc.  If symbol 'test_ldm_stm_pc'
     # can't be resolved, test case is compiled in Thumb mode, skip it.
-    gdb_test_multiple "break *test_ldm_stm_pc" "break test_ldm_stm_pc" {
+    gdb_test_multiple "break *test_ldm_stm_pc" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_ldm_stm_pc"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
-           pass "break test_ldm_stm_pc"
+           pass $gdb_test_name
            return 0
        }
     }
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_ldr_literal" "break test_ldr_literal" {
+    gdb_test_multiple "break *test_ldr_literal" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_ldr_literal"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return 0
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_ldr_literal_16" "break test_ldr_literal_16" {
+    gdb_test_multiple "break *test_ldr_literal_16" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_ldr_literal"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return 0
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_zero_cbnz" "break test_zero_cbnz" {
+    gdb_test_multiple "break *test_zero_cbnz" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_ldr_literal"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return 0
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_adr" "break test_adr" {
+    gdb_test_multiple "break *test_adr" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_adr"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return 0
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_adr_32bit" "break test_adr_32bit" {
+    gdb_test_multiple "break *test_adr_32bit" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_adr"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return 0
        "break test_pop_pc_3_right"
     gdb_test "break *test_pop_pc_3_wrong" \
        "Breakpoint.*at.* file .*$srcfile, line.*" \
-       "break test_pop_pc_1_wrong"
+       "break test_pop_pc_3_wrong"
 
     gdb_continue_to_breakpoint "continue to test_pop_pc_1" \
        ".*b.*\{r1\, pc\}.*"
     global srcfile
     global gdb_prompt
 
-    gdb_test_multiple "break *test_str_pc" "break test_str_pc" {
+    gdb_test_multiple "break *test_str_pc" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass "break test_str_pc"
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
-           pass "break test_str_pc"
+           pass $gdb_test_name
            return
        }
     }
 proc test_add_rn_pc {} {
     global srcfile gdb_prompt
 
-    set test "break test_add_rn_pc"
-    gdb_test_multiple "break *test_add_rn_pc" $test {
+    gdb_test_multiple "break *test_add_rn_pc" "" {
        -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" {
-           pass $test
+           pass $gdb_test_name
        }
        -re "No symbol.*\r\n$gdb_prompt $" {
            return
 
 
 gdb_test "backtrace 10" \
        "#0\[ \t\]*$hex in write_sp .*\r\n#1\[ \t\]*$hex in switch_stack_to_other .*\r\n#2\[ \t\]*$hex in main.*" \
-       "backtrace in write_sp"
+       "backtrace in write_sp, 2nd stop"
 
 gdb_test_multiple {x/2i $pc} "$test" {
     -re "=> $hex .* 0x(\[0-9a-f\]*) .*$gdb_prompt $" {
        set next_insn_addr $expect_out(1,string)
-       pass "$test"
+       pass $gdb_test_name
     }
 }
 set next_insn_is_stmt [hex_in_list $next_insn_addr $is_stmt]
 
 # Get the next instruction address.
 set next_insn_addr ""
-set test "get next insn"
+set test "get next insn, 2nd"
 gdb_test_multiple {x/2i $pc} "$test" {
     -re "=> $hex .* 0x(\[0-9a-f\]*) .*$gdb_prompt $" {
        set next_insn_addr $expect_out(1,string)
-       pass "$test"
+       pass $gdb_test_name
     }
 }
 set next_insn_is_stmt \
 
 set gcore_works [gdb_gcore_cmd "$gcorefile" "gcore"]
 
 # Let the program continue and die.
-gdb_test continue ".*Program received signal.*"
-gdb_test continue ".*Program terminated with signal.*"
+gdb_test continue ".*Program received signal.*" "continue until signal"
+gdb_test continue ".*Program terminated with signal.*" "continue and terminate"
 
 # Now collect the core dump it left.
 set test "generate native core dump"
 
 gdb_test "ptype z2" " = complex float"
 gdb_test "ptype z3" " = complex long double"
 
-gdb_test "p \$_cimag (z1)" " = 4.5"
-gdb_test "ptype \$" " = double"
+with_test_prefix "double imaginary" {
+    gdb_test "p \$_cimag (z1)" " = 4.5"
+    gdb_test "ptype \$" " = double"
+}
 
-gdb_test "p \$_cimag (z2)" " = -5.5"
-gdb_test "ptype \$" " = float"
+with_test_prefix "float imaginary" {
+    gdb_test "p \$_cimag (z2)" " = -5.5"
+    gdb_test "ptype \$" " = float"
+}
 
-gdb_test "p \$_cimag (z3)" " = 6.5"
-gdb_test "ptype \$" " = long double"
+with_test_prefix "long double imaginary" {
+    gdb_test "p \$_cimag (z3)" " = 6.5"
+    gdb_test "ptype \$" " = long double"
+}
 
-gdb_test "p \$_creal (z1)" " = 1.5"
-gdb_test "ptype \$" " = double"
+with_test_prefix "double real" {
+    gdb_test "p \$_creal (z1)" " = 1.5"
+    gdb_test "ptype \$" " = double"
+}
 
-gdb_test "p \$_creal (z2)" " = 2.5"
-gdb_test "ptype \$" " = float"
+with_test_prefix "float real" {
+    gdb_test "p \$_creal (z2)" " = 2.5"
+    gdb_test "ptype \$" " = float"
+}
 
-gdb_test "p \$_creal (z3)" " = 3.5"
-gdb_test "ptype \$" " = long double"
+with_test_prefix "long double real" {
+    gdb_test "p \$_creal (z3)" " = 3.5"
+    gdb_test "ptype \$" " = long double"
+}
 
 gdb_test "p \$_cimag (d1)" "expected a complex number"
 gdb_test "p \$_cimag (f1)" "expected a complex number"
 
     gdb_test_multiple "$test" "$test" {
        -re "Breakpoint (\[0-9\]*) at .*$where.*$gdb_prompt $" {
            set bp $expect_out(1,string)
-           pass "$test"
+           pass $gdb_test_name
        }
     }
     return $bp
 
 # Verify that we don't stop at a disabled breakpoint.
 gdb_continue_to_end "no stop"
-rerun_to_main
+
+set count 1
+with_test_prefix "run $count" {
+    rerun_to_main
+    incr count
+}
 gdb_continue_to_end "no stop at auto-disabled break marker2"
 
 # Verify that we can set a breakpoint to be self-deleting after the
 
 set bp [break_at $bp_location7 "line $bp_location7"]
 
-set bp2 [break_at marker1 " line $bp_location15"]
+with_test_prefix "enable count" {
+  set bp2 [break_at marker1 " line $bp_location15"]
+}
 
 gdb_test "enable count" \
     "Argument required \\(hit count\\)\\." \
     fail "enable/disable break tests suppressed"
 }
 
-set bp [break_at "marker1" " line $bp_location15.*"]
+with_test_prefix "ignore count" {
+    set bp [break_at "marker1" " line $bp_location15.*"]
+}
 
 # Verify that an ignore of a non-existent breakpoint is gracefully
 # handled.
     "info ignored break marker1"
 
 gdb_continue_to_end "no stop at ignored break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+    rerun_to_main
+    incr count
+}
 
 # See the comments in condbreak.exp for "run until breakpoint at marker1" 
 # for an explanation of the xfail below.
     fail "enable/disable break tests suppressed"
 }
 
-set bp [break_at marker1 " line $bp_location15.*"]
+with_test_prefix "ignore count and auto-delete" {
+    set bp [break_at marker1 " line $bp_location15.*"]
+}
 
 gdb_test "ignore $bp 1" \
     "Will ignore next crossing of breakpoint \[0-9\]*.*" \
     "info break marker1 after hitting breakpoint"
 
 gdb_continue_to_end "no stop at ignored & auto-deleted break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+    rerun_to_main
+    incr count
+}
 
 gdb_test "continue" \
     ".*marker1 .*:$bp_location15.*" \
     fail "enable/disable break tests suppressed"
 }
 
-set bp [break_at marker1 " line $bp_location15"]
+with_test_prefix "disabled breakpoint ignore count" {
+    set bp [break_at marker1 " line $bp_location15"]
+}
 
 gdb_test "ignore $bp 10" \
     "Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \
 gdb_test_no_output "disable $bp" "disable break marker1"
 
 gdb_continue_to_end "no stop at ignored & disabled break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+    rerun_to_main
+}
 
 gdb_test "info break $bp" \
     "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*ignore next 10 hits.*" \
 set b3 0
 set b4 0
 set b1 [break_at main ""]
-set b2 [break_at main ""]
-set b3 [break_at main ""]
-set b4 [break_at main ""]
+
+with_test_prefix "2nd breakpoint" {
+    set b2 [break_at main ""]
+}
+
+with_test_prefix "3rd breakpoint" {
+    set b3 [break_at main ""]
+}
+
+with_test_prefix "4th breakpoint" {
+    set b4 [break_at main ""]
+}
 
 # Perform tests for disable/enable commands on multiple
 # locations and breakpoints.
 
      fail "couldn't run ${testfile}"
      return
    }
-   # Execute the code setting up variable PROG.
-   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
-   gdb_test "tbreak ${tbreak_line}"
-   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+
+   with_test_prefix "1st run" {
+       # Execute the code setting up variable PROG.
+       set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+       gdb_test "tbreak ${tbreak_line}" "" "insert breakpoint"
+       gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+   }
 
    # Verify that we can see various global and local variables
    # in this program, and that they have expected values.  Some
      fail "couldn't run ${testfile} (3rd try)"
      return
    }
-   # Execute the code setting up variable PROG.
-   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
-   gdb_test "tbreak ${tbreak_line}"
-   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+
+   with_test_prefix "2nd run" {
+       # Execute the code setting up variable PROG.
+       set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+       gdb_test "tbreak ${tbreak_line}" "" "insert breakpoint"
+       gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+   }
 
    # Verify that we can follow through follow an execl()
    # call.  (We must jump around earlier exec* calls.)
      fail "couldn't run ${testfile} (4th try)"
      return
    }
-   # Execute the code setting up variable PROG.
-   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
-   gdb_test "tbreak ${tbreak_line}"
-   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+
+   with_test_prefix "3rd run" {
+       # Execute the code setting up variable PROG.
+       set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+       gdb_test "tbreak ${tbreak_line}" "" "insert breakpoint"
+       gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
+   }
 
    # Verify that we can follow through follow an execv()
    # call.  (We must jump around earlier exec* calls.)
 
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-gdb_test "show may-write-registers" \
-    "Permission to write into registers is on."
+with_test_prefix "observer mode off" {
 
-gdb_test "show may-write-memory" \
-    "Permission to write into target memory is on."
+    gdb_test "show may-write-registers" \
+       "Permission to write into registers is on."
 
-gdb_test "show may-insert-breakpoints" \
-    "Permission to insert breakpoints in the target is on."
+    gdb_test "show may-write-memory" \
+       "Permission to write into target memory is on."
 
-gdb_test "show may-insert-tracepoints" \
-    "Permission to insert tracepoints in the target is on."
+    gdb_test "show may-insert-breakpoints" \
+       "Permission to insert breakpoints in the target is on."
 
-gdb_test "show may-insert-fast-tracepoints" \
-    "Permission to insert fast tracepoints in the target is on."
+    gdb_test "show may-insert-tracepoints" \
+       "Permission to insert tracepoints in the target is on."
 
-gdb_test "show may-interrupt" \
-    "Permission to interrupt or signal the target is on."
+    gdb_test "show may-insert-fast-tracepoints" \
+       "Permission to insert fast tracepoints in the target is on."
+
+    gdb_test "show may-interrupt" \
+       "Permission to interrupt or signal the target is on."
+}
 
 gdb_test "set observer on" "Observer mode is now on." "enable observer mode"
 
-gdb_test "show may-write-memory" \
-    "Permission to write into target memory is off."
+with_test_prefix "observer mode on" {
+    gdb_test "show may-write-memory" \
+       "Permission to write into target memory is off."
 
-gdb_test "show may-write-registers" \
-    "Permission to write into registers is off."
+    gdb_test "show may-write-registers" \
+       "Permission to write into registers is off."
 
-gdb_test "show may-insert-breakpoints" \
-    "Permission to insert breakpoints in the target is off."
+    gdb_test "show may-insert-breakpoints" \
+       "Permission to insert breakpoints in the target is off."
 
-gdb_test "show may-insert-tracepoints" \
-    "Permission to insert tracepoints in the target is off."
+    gdb_test "show may-insert-tracepoints" \
+       "Permission to insert tracepoints in the target is off."
 
-gdb_test "show may-insert-fast-tracepoints" \
-    "Permission to insert fast tracepoints in the target is on."
+    gdb_test "show may-insert-fast-tracepoints" \
+       "Permission to insert fast tracepoints in the target is on."
 
-gdb_test "show may-interrupt" \
-    "Permission to interrupt or signal the target is off."
+    gdb_test "show may-interrupt" \
+       "Permission to interrupt or signal the target is off."
+}
 
 gdb_test "set observer off" "Observer mode is now off." "disable observer mode"
 
 
 gdb_test "print x = 45" "$decimal = 45" "set a global"
 
-gdb_test "print x" "$decimal = 45"
+gdb_test "print x" "$decimal = 45" "validate setting a global"
 
 gdb_test "set may-write-memory off"
 
 gdb_test "print x = 92" "Writing to memory is not allowed.*" \
-    "try to set a global"
+    "set a global, 2nd time"
 
-gdb_test "print x" "$decimal = 45"
+gdb_test "print x" "$decimal = 45" "validate setting a global, 2nd time"
 
 # FIXME Add tests for other flags when a testsuite-able target becomes
 # available.
 
        "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = 0x0\[\r\n\]+\\(y or n\\) " \
        "y"
 
-# Print the addresses of static variables.
-set static_foo_addr [get_var_address static_foo]
-set static_bar_addr [get_var_address static_bar]
+with_test_prefix "print addresses, static vars" {
+    # Print the addresses of static variables.
+    set static_foo_addr [get_var_address static_foo]
+    set static_bar_addr [get_var_address static_bar]
+}
 
 # Make sure they have different addresses.
 if { "${static_foo_addr}" == "${static_bar_addr}" } {
   pass "static variables have different addresses"
 }
 
-# Print the addresses of global variables.
-set global_foo_addr [get_var_address global_foo]
-set global_bar_addr [get_var_address global_bar]
+with_test_prefix "print addresses, global vars" {
+    # Print the addresses of global variables.
+    set global_foo_addr [get_var_address global_foo]
+    set global_bar_addr [get_var_address global_bar]
+}
 
 # Make sure they have different addresses.
 if { "${global_foo_addr}" == "${global_bar_addr}" } {
   pass "global variables have different addresses"
 }
 
-# Print the addresses of functions.
-set function_foo_addr [get_var_address function_foo]
-set function_bar_addr [get_var_address function_bar]
+with_test_prefix "print addresses, functions" {
+    # Print the addresses of functions.
+    set function_foo_addr [get_var_address function_foo]
+    set function_bar_addr [get_var_address function_bar]
+}
 
 # Make sure they have different addresses.
 if { "${function_foo_addr}" == "${function_bar_addr}" } {
     "Reading symbols from ${binfile}\.\.\." \
     "symbol-file with offset"
 
-# Make sure the address of a static variable is moved by offset.
-set new_static_foo_addr [get_var_address static_foo]
-gdb_assert {${new_static_foo_addr} == ${static_foo_addr} + $offset} \
-    "static variable foo is moved by offset"
+with_test_prefix "static vars" {
+    # Make sure the address of a static variable is moved by offset.
+    set new_static_foo_addr [get_var_address static_foo]
+    gdb_assert {${new_static_foo_addr} == ${static_foo_addr} + $offset} \
+       "static variable foo is moved by offset"
+}
 
-# Make sure the address of a global variable is moved by offset.
-set new_global_foo_addr [get_var_address global_foo]
-gdb_assert {${new_global_foo_addr} == ${global_foo_addr} + $offset} \
-    "global variable foo is moved by offset"
+with_test_prefix "global vars" {
+    # Make sure the address of a global variable is moved by offset.
+    set new_global_foo_addr [get_var_address global_foo]
+    gdb_assert {${new_global_foo_addr} == ${global_foo_addr} + $offset} \
+       "global variable foo is moved by offset"
+}
 
-# Make sure the address of a function is moved by offset.
-set new_function_foo_addr [get_var_address function_foo]
-gdb_assert {${new_function_foo_addr} == ${function_foo_addr} + $offset} \
-    "function foo is moved by offset"
+with_test_prefix "functions" {
+    # Make sure the address of a function is moved by offset.
+    set new_function_foo_addr [get_var_address function_foo]
+    gdb_assert {${new_function_foo_addr} == ${function_foo_addr} + $offset} \
+       "function foo is moved by offset"
+}
 
 # Load the object using add-symbol-file with an offset and check that
 # all addresses are moved by that offset.
     "add symbol table from file \".*${testfile}\\.o\" with all sections offset by $offset\[\r\n\]+\\(y or n\\) " \
     "y"
 
-# Make sure the address of a static variable is moved by offset.
-set new_static_foo_addr [get_var_address static_foo]
-gdb_assert { ${new_static_foo_addr} == ${static_foo_addr} + $offset } \
-    "static variable foo is moved by offset"
+with_test_prefix "static scope, 2nd" {
+    # Make sure the address of a static variable is moved by offset.
+    set new_static_foo_addr [get_var_address static_foo]
+    gdb_assert { ${new_static_foo_addr} == ${static_foo_addr} + $offset } \
+       "static variable foo is moved by offset"
+}
 
-# Make sure the address of a global variable is moved by offset.
-set new_global_foo_addr [get_var_address global_foo]
-gdb_assert { ${new_global_foo_addr} == ${global_foo_addr} + $offset } \
-    "global variable foo is moved by offset"
+with_test_prefix "global vars, 2nd" {
+    # Make sure the address of a global variable is moved by offset.
+    set new_global_foo_addr [get_var_address global_foo]
+    gdb_assert { ${new_global_foo_addr} == ${global_foo_addr} + $offset } \
+       "global variable foo is moved by offset"
+}
 
-# Make sure the address of a function is moved by offset.
-set new_function_foo_addr [get_var_address function_foo]
-gdb_assert { ${new_function_foo_addr} == ${function_foo_addr} + $offset } \
-    "function foo is moved by offset"
+with_test_prefix "functions, 2nd" {
+    # Make sure the address of a function is moved by offset.
+    set new_function_foo_addr [get_var_address function_foo]
+    gdb_assert { ${new_function_foo_addr} == ${function_foo_addr} + $offset } \
+       "function foo is moved by offset"
+}
 
 # Re-load the object giving an explicit address for .text
 
     "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = ${text}\[\r\n\]+with other sections offset by ${offset}\[\r\n\]+\\(y or n\\) " \
     "y"
 
-# Make sure function has a different addresses now.
-set function_foo_addr [get_var_address function_foo]
-gdb_assert { ${function_foo_addr} != ${new_function_foo_addr} } \
-    "function foo has a different address"
+with_test_prefix "functions, 3rd" {
+    # Make sure function has a different addresses now.
+    set function_foo_addr [get_var_address function_foo]
+    gdb_assert { ${function_foo_addr} != ${new_function_foo_addr} } \
+       "function foo has a different address"
+}
 
 # Re-load the object giving an explicit address for .data
 
     "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.data_addr = ${data}\[\r\n\]+with other sections offset by ${offset}\[\r\n\]+\\(y or n\\) " \
     "y"
 
-# Make sure variable has a different addresses now.
-set global_foo_addr [get_var_address global_foo]
-gdb_assert { ${global_foo_addr} != ${new_global_foo_addr} } \
-    "global variable foo has a different address"
+with_test_prefix "global vars, 3rd" {
+    # Make sure variable has a different addresses now.
+    set global_foo_addr [get_var_address global_foo]
+    gdb_assert { ${global_foo_addr} != ${new_global_foo_addr} } \
+       "global variable foo has a different address"
+}
 
 # Now try loading the object as an exec-file; we should be able to print
 # the values of variables after we do this.
 
     gdb_test "print ${type}_resultval == testval.${type}_testval" ".* = 1" \
            "${type} value returned successfully"
     gdb_test "print ${type}_resultval != ${type}_returnval" ".* = 1" \
-           "validate result value not equal to program return value"
+           "validate result value not equal to program return value, ${type}"
 }
 
 proc return_void { } {
 
     # disable SIGSEGV, ensuring that further signals stop the
     # inferior.  Stops a SIGSEGV infinite loop when a broke system
     # keeps re-executing the faulting instruction.
-    rerun_to_main
+    with_test_prefix $name {
+       rerun_to_main
+    }
     gdb_test "handle ${signame} nostop print pass" ".*" "${name}; pass ${signame}"
     gdb_test "continue" "keeper.*" "${name}; continue to keeper"
     gdb_test "handle ${signame} stop print nopass" ".*" "${name}; nopass ${signame}"
     # disable SIGSEGV, ensuring that further signals stop the
     # inferior.  Stops a SIGSEGV infinite loop when a broke system
     # keeps re-executing the faulting instruction.
-    rerun_to_main
+    with_test_prefix $name {
+       rerun_to_main
+    }
     gdb_test "handle ${signame} nostop print pass" ".*" "${name}; pass ${signame}"
     gdb_test "continue" "keeper.*" "${name}; continue to keeper"
     gdb_test "handle ${signame} stop print nopass" ".*" "${name}; nopass ${signame}"
 
 }
 
 # Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
+gdb_test "continue" ".*Program received signal SIGSEGV.*" \
+        "continue to signal, 1st"
 
 # Try to generate a core file, for a later test.
 set gcorefile [standard_output_file $testfile.gcore]
 
 set bp_location [gdb_get_line_number "set breakpoint here"]
 
-gdb_test "break $bp_location"
-gdb_test "continue" ".* handler .*" "continue to handler"
-
-gdb_test "p ssi_addr" " = \\(void \\*\\) $ssi_addr"
-gdb_test "p ssi_errno" " = $ssi_errno"
-gdb_test "p ssi_code" " = $ssi_code"
-gdb_test "p ssi_signo" " = $ssi_signo"
+with_test_prefix "validate siginfo fields" {
+    gdb_test "break $bp_location"
+    gdb_test "continue" ".* handler .*" "continue to handler"
+    gdb_test "p ssi_addr" " = \\(void \\*\\) $ssi_addr"
+    gdb_test "p ssi_errno" " = $ssi_errno"
+    gdb_test "p ssi_code" " = $ssi_code"
+    gdb_test "p ssi_signo" " = $ssi_signo"
+}
 
 # Again, but this time, patch si_addr and check that the inferior sees
 # the changed value.
 }
 
 # Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
+gdb_test "continue" ".*Program received signal SIGSEGV.*" \
+        "continue to signal, 2nd"
 
 set test "set si_addr"
 gdb_test "p \$_siginfo._sifields._sigfault.si_addr = 0x666" " = \\(void \\*\\) 0x666"
 gdb_test "p \$_siginfo.si_code = 999" " = 999"
 gdb_test "p \$_siginfo.si_signo = 11" " = 11"
 
-gdb_test "break $bp_location"
-gdb_test "continue" ".* handler .*" "continue to handler"
-
-gdb_test "p ssi_addr" " = \\(void \\*\\) 0x666"
-gdb_test "p ssi_errno" " = 666"
-gdb_test "p ssi_code" " = 999"
-gdb_test "p ssi_signo" " = 11"
+with_test_prefix "validate modified siginfo fields" {
+    gdb_test "break $bp_location"
+    gdb_test "continue" ".* handler .*" "continue to handler"
+    gdb_test "p ssi_addr" " = \\(void \\*\\) 0x666"
+    gdb_test "p ssi_errno" " = 666"
+    gdb_test "p ssi_code" " = 999"
+    gdb_test "p ssi_signo" " = 11"
+}
 
 # Test siginfo preservation in core files.
 if {$gcore_created} {
 
 
 gdb_test "p foo1_1 (a)"  "= 11"             "pointer to pointer"
 gdb_test "p foo1_2 (a)"  "= 12"             "pointer to array"
-gdb_test "p foo1_3 (a)"  "Cannot resolve.*" "pointer to pointer of wrong type"
-gdb_test "p foo1_3 (bp)" "Cannot resolve.*" "pointer to pointer of wrong type"
+gdb_test "p foo1_3 (a)"  "Cannot resolve.*" \
+        "pointer to pointer of wrong type, a"
+gdb_test "p foo1_3 (bp)" "Cannot resolve.*" \
+        "pointer to pointer of wrong type, bp"
 gdb_test "p foo1_4 (bp)" "= 14"             "pointer to ancestor pointer"
 gdb_test "p foo1_5 (bp)" "= 15"             "pointer to void pointer"
 gdb_test "p foo1_6 (bp)" "Cannot resolve.*"     "pointer to void pointer pointer"
 
 # Test for strict type checking
 set error_str "Cannot resolve function %s to any overloaded instance"
-gdb_test "show check type" "Strict type checking is on\."
-gdb_test "p foo1_type_check (123)" [format $error_str "foo1_type_check"]
-gdb_test "p foo2_type_check (0, 1)" [format $error_str "foo2_type_check"]
-gdb_test "p foo2_type_check (1, 0)" [format $error_str "foo2_type_check"]
-gdb_test "p foo2_type_check (1, 1)" [format $error_str "foo2_type_check"]
-gdb_test "p foo3_type_check (0, 0, 1)" [format $error_str "foo3_type_check"]
-gdb_test "p foo3_type_check (0, 1, 0)" [format $error_str "foo3_type_check"]
-gdb_test "p foo3_type_check (1, 0, 0)" [format $error_str "foo3_type_check"]
-gdb_test "p foo3_type_check (0, 1, 1)" [format $error_str "foo3_type_check"]
-gdb_test "p foo3_type_check (1, 1, 0)" [format $error_str "foo3_type_check"]
-gdb_test "p foo3_type_check (1, 1, 1)" [format $error_str "foo3_type_check"]
+gdb_test "show check type" "Strict type checking is on\." \
+        "confirm check type on"
+
+with_test_prefix "strict type checking on" {
+    gdb_test "p foo1_type_check (123)" [format $error_str "foo1_type_check"]
+    gdb_test "p foo2_type_check (0, 1)" [format $error_str "foo2_type_check"]
+    gdb_test "p foo2_type_check (1, 0)" [format $error_str "foo2_type_check"]
+    gdb_test "p foo2_type_check (1, 1)" [format $error_str "foo2_type_check"]
+    gdb_test "p foo3_type_check (0, 0, 1)" [format $error_str "foo3_type_check"]
+    gdb_test "p foo3_type_check (0, 1, 0)" [format $error_str "foo3_type_check"]
+    gdb_test "p foo3_type_check (1, 0, 0)" [format $error_str "foo3_type_check"]
+    gdb_test "p foo3_type_check (0, 1, 1)" [format $error_str "foo3_type_check"]
+    gdb_test "p foo3_type_check (1, 1, 0)" [format $error_str "foo3_type_check"]
+    gdb_test "p foo3_type_check (1, 1, 1)" [format $error_str "foo3_type_check"]
+}
 
 gdb_test_no_output "set check type off"
-gdb_test "show check type" "Strict type checking is off\."
-gdb_test "p foo1_type_check (123)" " = 1000"
-gdb_test "p foo2_type_check (0, 1)" " = 1001"
-gdb_test "p foo2_type_check (1, 0)" " = 1001"
-gdb_test "p foo2_type_check (1, 1)" " = 1001"
-gdb_test "p foo3_type_check (0, 0, 1)" " = 1002"
-gdb_test "p foo3_type_check (0, 1, 0)" " = 1002"
-gdb_test "p foo3_type_check (1, 0, 0)" " = 1002"
-gdb_test "p foo3_type_check (0, 1, 1)" " = 1002"
-gdb_test "p foo3_type_check (1, 1, 0)" " = 1002"
-gdb_test "p foo3_type_check (1, 1, 1)" " = 1002"
-gdb_test "p foo3_2 (1,1)" " = 32"
+gdb_test "show check type" "Strict type checking is off\." \
+        "confirm check type off"
+
+with_test_prefix "strict type checking off" {
+    gdb_test "p foo1_type_check (123)" " = 1000"
+    gdb_test "p foo2_type_check (0, 1)" " = 1001"
+    gdb_test "p foo2_type_check (1, 0)" " = 1001"
+    gdb_test "p foo2_type_check (1, 1)" " = 1001"
+    gdb_test "p foo3_type_check (0, 0, 1)" " = 1002"
+    gdb_test "p foo3_type_check (0, 1, 0)" " = 1002"
+    gdb_test "p foo3_type_check (1, 0, 0)" " = 1002"
+    gdb_test "p foo3_type_check (0, 1, 1)" " = 1002"
+    gdb_test "p foo3_type_check (1, 1, 0)" " = 1002"
+    gdb_test "p foo3_type_check (1, 1, 1)" " = 1002"
+    gdb_test "p foo3_2 (1,1)" " = 32"
+}
 
     return -1
 }
 
-gdb_test "catch catch int if \$_exception == 23" \
-    "Catchpoint \[0-9\]+ \\(catch\\)" \
-    "catch catch"
-gdb_test "catch throw int if \$_exception == 23" \
-    "Catchpoint \[0-9\]+ \\(throw\\)" \
-    "catch throw"
-gdb_test "catch rethrow int if \$_exception == 23" \
-    "Catchpoint \[0-9\]+ \\(rethrow\\)" \
-    "catch rethrow"
+with_test_prefix "2nd run" {
+    gdb_test "catch catch int if \$_exception == 23" \
+       "Catchpoint \[0-9\]+ \\(catch\\)" \
+       "catch catch"
+    gdb_test "catch throw int if \$_exception == 23" \
+       "Catchpoint \[0-9\]+ \\(throw\\)" \
+       "catch throw"
+    gdb_test "catch rethrow int if \$_exception == 23" \
+       "Catchpoint \[0-9\]+ \\(rethrow\\)" \
+       "catch rethrow"
+}
 
 # This tests both the case where the regular expression does not
 # match, and the case where it does.
-do_exceptprint_tests int 23
+with_test_prefix "2nd run" {
+    do_exceptprint_tests int 23
+}
 
        return
     }
 
-    test_print_si_members
+    with_test_prefix "single inheritance" {
+       test_print_si_members
+    }
+
     test_print_si_classes
-    test_print_mi_members
+
+    with_test_prefix "multiple inheritance" {
+       test_print_mi_members
+    }
+
     test_print_mi_member_types
     test_print_mi_classes
     test_print_anon_union
 
     continue
 }
 
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
+with_test_prefix "main scope" {
+    gdb_test "print A::_a" "= 11"
+    gdb_test "print A::B::ab" "= 22"
+    gdb_test "print A::B::C::abc" "= 33"
 
-gdb_test "print _a" "No symbol .* in current context."
-gdb_test "print ab" "No symbol .* in current context."
-gdb_test "print abc" "No symbol .* in current context."
+    gdb_test "print _a" "No symbol .* in current context."
+    gdb_test "print ab" "No symbol .* in current context."
+    gdb_test "print abc" "No symbol .* in current context."
+}
 
 ############################################
 gdb_breakpoint A::B::first
 gdb_continue_to_breakpoint "A::B::first"
 
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
+with_test_prefix "A::B::first scope" {
+    gdb_test "print A::_a" "= 11"
+    gdb_test "print A::B::ab" "= 22"
+    gdb_test "print A::B::C::abc" "= 33"
 
-gdb_test "print _a" "= 11"
-gdb_test "print ab" "= 22"
-gdb_test "print C::abc" "= 33"
+    gdb_test "print _a" "= 11"
+    gdb_test "print ab" "= 22"
+    gdb_test "print C::abc" "= 33"
 
-gdb_test "print abc" "No symbol .* in current context."
+    gdb_test "print abc" "No symbol .* in current context."
+}
 
 ############################################
 gdb_breakpoint A::B::C::second
 gdb_continue_to_breakpoint "A::B::C::second"
 
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
+with_test_prefix "A::B::C::second scope" {
+    gdb_test "print A::_a" "= 11"
+    gdb_test "print A::B::ab" "= 22"
+    gdb_test "print A::B::C::abc" "= 33"
 
-gdb_test "print _a" "= 11"
-gdb_test "print ab" "= 22"
-gdb_test "print abc" "= 33"
+    gdb_test "print _a" "= 11"
+    gdb_test "print ab" "= 22"
+    gdb_test "print abc" "= 33"
+}
 
 
 }
 
 proc test_variables_in_base { scopes } {
-    foreach scope [make_scope_list $scopes] {
-        gdb_test "print ${scope}i" " = 55"
-        gdb_test "print ${scope}d" " = 6.25"
-        gdb_test "print ${scope}x" " = 22"
-    }
+  with_test_prefix "$scopes" {
+      foreach scope [make_scope_list $scopes] {
+         gdb_test "print ${scope}i" " = 55"
+         gdb_test "print ${scope}d" " = 6.25"
+         gdb_test "print ${scope}x" " = 22"
+      }
+  }
 }
 
 proc test_variables_in_superbase { scopes } {
-    foreach scope [make_scope_list $scopes] {
-        gdb_test "print ${scope}x" " = 22"
-    }
+  with_test_prefix "$scopes" {
+      foreach scope [make_scope_list $scopes] {
+         gdb_test "print ${scope}x" " = 22"
+      }
+  }
 }
 
 proc test_variables_in_super { scopes } {
-    foreach scope [make_scope_list $scopes] {
-        gdb_test "print ${scope}w" " = 17"
-    }
+  with_test_prefix "$scopes" {
+      foreach scope [make_scope_list $scopes] {
+         gdb_test "print ${scope}w" " = 17"
+      }
+  }
 }
 
 with_test_prefix "derived::func_d" {
 
        "113\\^error,msg=\"-var-create: unable to create variable object\"" \
        "create out of scope variable"
 
-mi_runto do_locals_tests
+with_test_prefix "first run" {
+  mi_runto do_locals_tests
+}
 
 set line_dlt_first_real [gdb_get_line_number "linteger = 1234;"]
 
 
 mi_gdb_test "-var-assign linteger 3333" \
        "\\^done,value=\"3333\"" \
-       "assign to linteger"
+       "assign to linteger, 1st"
 
 # Allow lpcharacter to update, optionally.  Because it points to a
 # char variable instead of a zero-terminated string, if linteger is
 
 mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
        "\\^done,value=\"$hex\"" \
-       "assign to lpinteger"
+       "assign to lpinteger, 1st"
 
 mi_gdb_test "-var-update *" \
        "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
 
 mi_gdb_test "-var-assign linteger 4321" \
        "\\^done,value=\"4321\"" \
-       "assign to linteger"
+       "assign to linteger, 2nd"
 
 mi_gdb_test "-var-assign lpinteger &linteger" \
        "\\^done,value=\"$hex\"" \
-       "assign to lpinteger"
+       "assign to lpinteger, 2nd"
 
 mi_gdb_test "-var-assign lcharacter 'z'" \
        "\\^done,value=\"122 'z'\"" \
 
 mi_gdb_test "-var-assign llong 1313L" \
        "\\^done,value=\"1313\"" \
-       "assign to llong"
+       "assign to llong, 1st"
 mi_gdb_test "-var-evaluate-expression llong" \
        "\\^done,value=\"1313\"" \
        "eval llong"
 mi_gdb_test "-var-assign llong 1212L" \
        "\\^done,value=\"1212\"" \
-       "assign to llong"
+       "assign to llong, 2nd"
 
 mi_gdb_test "-var-assign lplong &llong+4" \
        "\\^done,value=\"$hex\"" \
-       "assign to lplong"
+       "assign to lplong, 1st"
 mi_gdb_test "-var-evaluate-expression lplong" \
        "\\^done,value=\"$hex\"" \
        "eval lplong"
 mi_gdb_test "-var-assign lplong &llong" \
        "\\^done,value=\"$hex\"" \
-       "assign to lplong"
+       "assign to lplong, 2nd"
 
 mi_gdb_test "-var-assign lfloat 3.4567" \
        "\\^done,value=\"3.45.*\"" \
-       "assign to lfloat"
+       "assign to lfloat, 1st"
 mi_gdb_test "-var-evaluate-expression lfloat" \
        "\\^done,value=\"3.45.*\"" \
        "eval lfloat"
 mi_gdb_test "-var-assign lfloat 1.2345" \
        "\\^done,value=\"1.23.*\"" \
-       "assign to lfloat"
+       "assign to lfloat, 2nd"
 
 mi_gdb_test "-var-assign lpfloat &lfloat+4" \
        "\\^done,value=\"$hex\"" \
 
 mi_delete_breakpoints
 
-mi_runto do_locals_tests
+with_test_prefix "second run" {
+  mi_runto do_locals_tests
+}
 
 mi_create_varobj "L" "lsimple" "in-and-out-of-scope: create varobj"
 mi_check_varobj_value "L" "{...}" "in-and-out-of-scope: check initial value"
 
 
   int v2 = 4;
   /*: 
-    mi_create_varobj V1 v1 "create varobj for v1" 
-    mi_create_varobj V2 v2 "create varobj for v2"
-
-    mi_list_varobj_children "V1" {
-        {"V1.i" "i" "0" "int"}
-       {"V1.nested" "nested" "2" "struct {...}"}
-    } "list children of v1"
-
-    mi_list_varobj_children "V1.nested" {
-        {"V1.nested.j" "j" "0" "int"}
-        {"V1.nested.k" "k" "0" "int"}
-    } "list children of v1.nested"
-
-    mi_check_varobj_value V1.i 1 "check V1.i: 1"
-    mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
-    mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
-    mi_check_varobj_value V2 4 "check V2: 4"
+    with_test_prefix "create varobj V1 and V2" {
+       mi_create_varobj V1 v1 "create varobj for v1"
+       mi_create_varobj V2 v2 "create varobj for v2"
+
+       mi_list_varobj_children "V1" {
+           {"V1.i" "i" "0" "int"}
+           {"V1.nested" "nested" "2" "struct {...}"}
+       } "list children of v1"
+
+       mi_list_varobj_children "V1.nested" {
+           {"V1.nested.j" "j" "0" "int"}
+           {"V1.nested.k" "k" "0" "int"}
+       } "list children of v1.nested"
+
+       mi_check_varobj_value V1.i 1 "check V1.i: 1"
+       mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
+       mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+       mi_check_varobj_value V2 4 "check V2: 4"
+    }
   :*/
   v2 = 5;
   /*: 
   v1.nested.j = 8;
   v1.nested.k = 9;
   /*:
-    set_frozen V1 1
-    mi_varobj_update * {} "update varobjs: nothing changed"
-    mi_check_varobj_value V1.i 1 "check V1.i: 1"
-    mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
-    mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"    
+    with_test_prefix "frozen V1" {
+       set_frozen V1 1
+       mi_varobj_update * {} "update varobjs: nothing changed"
+       mi_check_varobj_value V1.i 1 "check V1.i: 1"
+       mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
+       mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+    }
     # Check that explicit update for elements of structures
     # works.
-    # Update v1.j
-    mi_varobj_update V1.nested.j {V1.nested.j} "update V1.nested.j"
-    mi_check_varobj_value V1.i 1 "check V1.i: 1"
-    mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
-    mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"    
-    # Update v1.nested, check that children is updated.
-    mi_varobj_update V1.nested {V1.nested.k} "update V1.nested"
-    mi_check_varobj_value V1.i 1 "check V1.i: 1"
-    mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
-    mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"    
-    # Update v1.i
-    mi_varobj_update V1.i {V1.i} "update V1.i"
-    mi_check_varobj_value V1.i 7 "check V1.i: 7"
+    with_test_prefix "update v1.j" {
+       # Update v1.j
+       mi_varobj_update V1.nested.j {V1.nested.j} "update V1.nested.j"
+       mi_check_varobj_value V1.i 1 "check V1.i: 1"
+       mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+       mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+    }
+    with_test_prefix "update v1.nested" {
+       # Update v1.nested, check that children is updated.
+       mi_varobj_update V1.nested {V1.nested.k} "update V1.nested"
+       mi_check_varobj_value V1.i 1 "check V1.i: 1"
+       mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+       mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
+    }
+    with_test_prefix "update v1.i" {
+       # Update v1.i
+       mi_varobj_update V1.i {V1.i} "update V1.i"
+       mi_check_varobj_value V1.i 7 "check V1.i: 7"
+    }
   :*/
   v1.i = 10;
   v1.nested.j = 11;
   v1.nested.k = 12;
   /*:
     # Check that unfreeze itself does not updates the values.
-    set_frozen V1 0
-    mi_check_varobj_value V1.i 7 "check V1.i: 7"
-    mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
-    mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"    
-    mi_varobj_update V1 {V1.i V1.nested.j V1.nested.k} "update V1"
-    mi_check_varobj_value V1.i 10 "check V1.i: 10"
-    mi_check_varobj_value V1.nested.j 11 "check V1.nested.j: 11"
-    mi_check_varobj_value V1.nested.k 12 "check V1.nested.k: 12"    
+    with_test_prefix "unfrozen V1" {
+       set_frozen V1 0
+       mi_check_varobj_value V1.i 7 "check V1.i: 7"
+       mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+       mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
+       mi_varobj_update V1 {V1.i V1.nested.j V1.nested.k} "update V1"
+       mi_check_varobj_value V1.i 10 "check V1.i: 10"
+       mi_check_varobj_value V1.nested.j 11 "check V1.nested.j: 11"
+       mi_check_varobj_value V1.nested.k 12 "check V1.nested.k: 12"
+    }
   :*/    
   
   /*: END: frozen :*/