+2016-11-09 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * gdb.mi/user-selected-context-sync.exp (with_test_prefix_procname):
+ Remove.
+ (test_setup): Define with proc_with_prefix.
+ (test_cli_inferior): Likewise.
+ (test_cli_thread): Likewise.
+ (test_cli_frame): Likewise.
+ (test_cli_select_frame): Likewise.
+ (test_cli_up_down): Likewise.
+ (test_mi_thread_select): Likewise.
+ (test_mi_stack_select_frame): Likewise.
+ (test_cli_in_mi_inferior): Likewise.
+ (test_cli_in_mi_thread): Likewise.
+ (test_cli_in_mi_frame): Likewise.
+ (top level): Do not use with_test_prefix_procname.
+
2016-11-09 Pedro Alves <palves@redhat.com>
* gdb.base/commands.exp (gdbvar_simple_if_test)
set thread_loop_line [gdb_get_line_number "thread loop line"]
set thread_caller_line [gdb_get_line_number "thread caller line"]
-# Call PROCNAME with the given arguments, inside a with_test_prefix $procname
-# block.
-
-proc with_test_prefix_procname { procname args } {
- with_test_prefix $procname {
- # Note: this syntax requires TCL 8.5, if we need to support 8.4,
- # we'll need to find an alternative.
- $procname {*}$args
- }
-}
-
# Return whether we expect thread THREAD to be running in mode MODE.
#
# MODE can be either "all-stop" or "non-stop".
#
# MODE can be either "all-stop" or "non-stop".
-proc test_setup { mode } {
+proc_with_prefix test_setup { mode } {
global srcfile
global srcdir
global subdir
# Test selecting an inferior from CLI.
-proc test_cli_inferior { mode } {
+proc_with_prefix test_cli_inferior { mode } {
global gdb_main_spawn_id mi_spawn_id
reset_selection "1.1"
# Test thread selection from CLI.
-proc test_cli_thread { mode } {
+proc_with_prefix test_cli_thread { mode } {
global gdb_main_spawn_id
global mi_spawn_id
# Test frame selection from CLI.
-proc test_cli_frame { mode } {
+proc_with_prefix test_cli_frame { mode } {
global gdb_main_spawn_id mi_spawn_id
with_test_prefix "thread 1.2" {
# Test frame selection from CLI with the select-frame command.
-proc test_cli_select_frame { mode } {
+proc_with_prefix test_cli_select_frame { mode } {
global gdb_main_spawn_id mi_spawn_id expect_out
with_test_prefix "thread 1.2" {
# Test doing an up and then down command from CLI.
-proc test_cli_up_down { mode } {
+proc_with_prefix test_cli_up_down { mode } {
global gdb_main_spawn_id mi_spawn_id
reset_selection "1.2"
# Test selecting a thread from MI.
-proc test_mi_thread_select { mode } {
+proc_with_prefix test_mi_thread_select { mode } {
global gdb_main_spawn_id mi_spawn_id
reset_selection "1.1"
# place to test it.
}
-proc test_mi_stack_select_frame { mode } {
+proc_with_prefix test_mi_stack_select_frame { mode } {
global gdb_main_spawn_id mi_spawn_id
with_test_prefix "thread 1.2" {
# Test selecting the inferior using a CLI command in the MI channel.
-proc test_cli_in_mi_inferior { mode cli_in_mi_mode } {
+proc_with_prefix test_cli_in_mi_inferior { mode cli_in_mi_mode } {
global gdb_main_spawn_id mi_spawn_id
reset_selection "1.1"
# Test selecting the thread using a CLI command in the MI channel.
-proc test_cli_in_mi_thread { mode cli_in_mi_mode } {
+proc_with_prefix test_cli_in_mi_thread { mode cli_in_mi_mode } {
global gdb_main_spawn_id mi_spawn_id
reset_selection "1.1"
# Test selecting the frame using a CLI command in the MI channel.
-proc test_cli_in_mi_frame { mode cli_in_mi_mode } {
+proc_with_prefix test_cli_in_mi_frame { mode cli_in_mi_mode } {
global gdb_main_spawn_id mi_spawn_id
with_test_prefix "thread 1.2" {
}
foreach_with_prefix mode { "all-stop" "non-stop" } {
- with_test_prefix_procname test_setup $mode
+ test_setup $mode
# Test selecting inferior, thread and frame from CLI
- with_test_prefix_procname test_cli_inferior $mode
- with_test_prefix_procname test_cli_thread $mode
- with_test_prefix_procname test_cli_frame $mode
- with_test_prefix_procname test_cli_select_frame $mode
- with_test_prefix_procname test_cli_up_down $mode
+ test_cli_inferior $mode
+ test_cli_thread $mode
+ test_cli_frame $mode
+ test_cli_select_frame $mode
+ test_cli_up_down $mode
# Test selecting thread and frame from MI
- with_test_prefix_procname test_mi_thread_select $mode
- with_test_prefix_procname test_mi_stack_select_frame $mode
+ test_mi_thread_select $mode
+ test_mi_stack_select_frame $mode
# Test some CLI commands sent through MI, both with a "direct" command,
# such as "thread 1", and with -interpreter-exec, such as
# '-interpreter-exec console "thread 1"'.
foreach_with_prefix exec_mode {"direct" "interpreter-exec"} {
- with_test_prefix_procname test_cli_in_mi_inferior $mode $exec_mode
- with_test_prefix_procname test_cli_in_mi_thread $mode $exec_mode
- with_test_prefix_procname test_cli_in_mi_frame $mode $exec_mode
+ test_cli_in_mi_inferior $mode $exec_mode
+ test_cli_in_mi_thread $mode $exec_mode
+ test_cli_in_mi_frame $mode $exec_mode
}
}