mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 19:44:11 +08:00
gdb/testsuite: resolve some duplicate testnames in gdb.mi
Set of fixes to resolve some duplicate test names in the gdb.mi/ directory. There should be no real test changes after this set of fixes, they are all either: - Adding with_test_prefix type constructs to make test names unique, or - Changing the test name to be more descriptive, or better reflect the test being run.
This commit is contained in:
parent
b622494ee3
commit
b6846ba57b
@ -55,11 +55,12 @@ mi_gdb_test "402-stack-list-frames" "402\\^done,stack=\\\[frame=\{level=\"0\",ad
|
||||
#
|
||||
mi_send_resuming_command "exec-continue" "testing exec continue"
|
||||
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" \
|
||||
"finished exec continue after calling foo"
|
||||
|
||||
mi_gdb_test "404-stack-list-frames 0 0" \
|
||||
"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, back in main after calling foo"
|
||||
|
||||
|
||||
#
|
||||
@ -79,16 +80,17 @@ mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
|
||||
|
||||
mi_gdb_test "407-stack-list-frames" \
|
||||
"407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, with signal handler and dummy frame"
|
||||
|
||||
|
||||
mi_send_resuming_command "exec-continue" "testing exec continue"
|
||||
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" \
|
||||
"finished exec continue after calling have_a_very_merry_interrupt"
|
||||
|
||||
mi_gdb_test "409-stack-list-frames 0 0" \
|
||||
"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, back in main after calling have_a_very_merry_interrupt"
|
||||
|
||||
#
|
||||
# Call bar() by hand, which should get an exception while running.
|
||||
|
@ -899,7 +899,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_
|
||||
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
|
||||
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
|
||||
{\*\*\*\*psnp->char_ptr} 0 char}
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.18
|
||||
# Desc: number of children of *(*(*(psnp->char_ptr)))
|
||||
@ -1077,7 +1077,7 @@ mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
|
||||
# Test: c_variable-5.42
|
||||
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
|
||||
@ -1090,7 +1090,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.44
|
||||
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
|
||||
@ -1101,13 +1101,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
# Test: c_variable-5.43B
|
||||
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.44B
|
||||
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
|
||||
"\\^done,numchild=\"0\"" \
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.45
|
||||
# Desc: children of psnp->ptrs[0]->next->next
|
||||
|
@ -218,7 +218,7 @@ void use_rtti_with_multiple_inheritence_test ()
|
||||
} "list children of ptr.First (with RTTI) in $testname"
|
||||
mi_list_varobj_children "VAR.First.public" {
|
||||
{ VAR.First.public.F F 0 int }
|
||||
} "list children of ptr.Base.public (with RTTI) in $testname"
|
||||
} "list children of ptr.First.public (with RTTI) in $testname"
|
||||
mi_list_varobj_children "VAR.Base" {
|
||||
{ VAR.Base.public public 1 }
|
||||
} "list children of ptr.Base (with RTTI) in $testname"
|
||||
@ -307,6 +307,7 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
/*:
|
||||
set testname skip_type_update_when_not_use_rtti
|
||||
|
||||
with_test_prefix "ptr is nullptr" {
|
||||
set_print_object off $testname
|
||||
mi_create_varobj_checked PTR ptr {Base \*} \
|
||||
"create varobj for ptr in $testname"
|
||||
@ -320,11 +321,13 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
{ S.public.ptr ptr 1 {Base \*} }
|
||||
} "list children of s.public in $testname"
|
||||
check_derived_children_without_rtti S.public.ptr s.ptr $testname
|
||||
}
|
||||
:*/
|
||||
|
||||
ptr = &d;
|
||||
s.ptr = &d;
|
||||
/*:
|
||||
with_test_prefix "ptr points at d" {
|
||||
mi_varobj_update PTR {PTR PTR.public.A} \
|
||||
"update ptr to derived type in $testname"
|
||||
check_derived_without_rtti PTR ptr $testname
|
||||
@ -332,11 +335,13 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
mi_varobj_update S {S.public.ptr S.public.ptr.public.A} \
|
||||
"update s to derived type in $testname"
|
||||
check_derived_without_rtti S.public.ptr s.ptr $testname
|
||||
}
|
||||
:*/
|
||||
|
||||
ptr = 0;
|
||||
s.ptr = 0;
|
||||
/*:
|
||||
with_test_prefix "ptr is nullptr again" {
|
||||
mi_varobj_update PTR {PTR PTR.public.A} \
|
||||
"update ptr back to base type in $testname"
|
||||
mi_delete_varobj PTR "delete varobj for ptr in $testname"
|
||||
@ -344,6 +349,7 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
mi_varobj_update S {S.public.ptr S.public.ptr.public.A} \
|
||||
"update s back to base type in $testname"
|
||||
mi_delete_varobj S "delete varobj for s in $testname"
|
||||
}
|
||||
:*/
|
||||
return;
|
||||
/*: END: skip_type_update_when_not_use_rtti :*/
|
||||
|
@ -131,7 +131,7 @@ proc test_watchpoint_triggering {} {
|
||||
mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \
|
||||
".*basics.c" $line_callee3_close_brace \
|
||||
{"" "wpnum=\"2\""} \
|
||||
"watchpoint trigger"
|
||||
"watchpoint scope"
|
||||
}
|
||||
|
||||
proc test_watchpoint_all {mi_mode type} {
|
||||
|
@ -49,121 +49,135 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid
|
||||
|
||||
# Test various kinds of `set print entry-values'.
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=no" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "no: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "no: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "no: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"}} .* .* {.* disp="keep"} "no: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"}\]} "no: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="born",value="10"}} .* .* {.* disp="keep"} "no: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="born",arg="1",value="10"}\]} "no: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "no: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "no: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "no: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "no: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"}} .* .* {.* disp="keep"} "no: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"}\]} "no: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="born",value="10"}} .* .* {.* disp="keep"} "no: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="born",arg="1",value="10"}\]} "no: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "no: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "no: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=only" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "only: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born@entry",arg="1",value="<optimized out>"}\]} "only: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "only: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born@entry",arg="1",value="<optimized out>"}\]} "only: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "only: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=preferred" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "preferred: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "preferred: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "preferred: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "preferred: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "preferred: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "preferred: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "preferred: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=if-needed" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "if-needed: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "if-needed: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"}} .* .* {.* disp="keep"} "if-needed: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"}\]} "if-needed: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "if-needed: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "if-needed: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "if-needed: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "if-needed: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "if-needed: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"}} .* .* {.* disp="keep"} "if-needed: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"}\]} "if-needed: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "if-needed: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "if-needed: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "if-needed: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "if-needed: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=both" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "both: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "both: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "both: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="lost@entry",value="5"},{name="born",value="10"},{name="born@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"},{name="born@entry",arg="1",value="<optimized out>"}\]} "both: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"},{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "both: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "both: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "both: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="lost@entry",value="5"},{name="born",value="10"},{name="born@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"},{name="born@entry",arg="1",value="<optimized out>"}\]} "both: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "both: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"},{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=compact" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "compact: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "compact: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "compact: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "compact: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "compact: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "compact: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "compact: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "compact: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "compact: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
|
||||
|
||||
if {[mi_runto_main] == -1} {
|
||||
with_test_prefix "entry-values=default" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "default: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "default: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "default: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "default: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "default: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "default: invalid: -stack-list-variables"
|
||||
}
|
||||
mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values"
|
||||
mi_send_resuming_command "exec-continue" "default: entry_equal: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_equal: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equal: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: entry_different: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_different: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "default: entry_different: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: validity: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name="lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "default: validity: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}\]} "default: validity: -stack-list-variables"
|
||||
mi_send_resuming_command "exec-continue" "default: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "default: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "default: invalid: -stack-list-variables"
|
||||
|
@ -839,7 +839,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_
|
||||
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
|
||||
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
|
||||
{\*\*\*\*psnp->char_ptr} 0 char}
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.18
|
||||
# Desc: number of children of *(*(*(psnp->char_ptr)))
|
||||
@ -1018,7 +1018,7 @@ mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
|
||||
# Test: c_variable-5.42
|
||||
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
|
||||
@ -1031,7 +1031,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.44
|
||||
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
|
||||
@ -1042,13 +1042,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
# Test: c_variable-5.43B
|
||||
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.44B
|
||||
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
|
||||
"\\^done,numchild=\"0\"" \
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.45
|
||||
# Desc: children of psnp->ptrs[0]->next->next
|
||||
|
Loading…
Reference in New Issue
Block a user