mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 00:32:30 +08:00
Check has_more in mi_create_dynamic_varobj
Hi, I find "has_more" is not checked when a dynamic varobj is created in proc mi_create_dynamic_varobj. This patch adds the check to "has_more". gdb/testsuite: 2013-11-22 Yao Qi <yao@codesourcery.com> * lib/mi-support.exp (mi_create_dynamic_varobj): Update comment and add one more argument "has_more". * gdb.python/py-mi.exp: Callers update.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2013-11-22 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* lib/mi-support.exp (mi_create_dynamic_varobj): Update
|
||||||
|
comment and add one more argument "has_more".
|
||||||
|
* gdb.python/py-mi.exp: Callers update.
|
||||||
|
|
||||||
2013-11-22 Yao Qi <yao@codesourcery.com>
|
2013-11-22 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* gdb.python/py-mi.exp: Use mi_create_floating_varobj instead
|
* gdb.python/py-mi.exp: Use mi_create_floating_varobj instead
|
||||||
|
@ -87,7 +87,9 @@ mi_gdb_test "-var-update string" \
|
|||||||
"\\^done,changelist=\\\[{name=\"string\",in_scope=\"true\",type_changed=\"false\",dynamic=\"1\",has_more=\"0\"}\\\]" \
|
"\\^done,changelist=\\\[{name=\"string\",in_scope=\"true\",type_changed=\"false\",dynamic=\"1\",has_more=\"0\"}\\\]" \
|
||||||
"update string varobj after assignment"
|
"update string varobj after assignment"
|
||||||
|
|
||||||
mi_create_dynamic_varobj container c \
|
# The "elements" field of "c" is still empty, so the attribute
|
||||||
|
# "has_more" is expected to be zero.
|
||||||
|
mi_create_dynamic_varobj container c 0 \
|
||||||
"create container varobj"
|
"create container varobj"
|
||||||
|
|
||||||
mi_list_varobj_children container {
|
mi_list_varobj_children container {
|
||||||
@ -202,7 +204,7 @@ mi_next "next over update 5"
|
|||||||
|
|
||||||
# Regression test: examine an object that has no children, then update
|
# Regression test: examine an object that has no children, then update
|
||||||
# it to ensure that we don't print the children.
|
# it to ensure that we don't print the children.
|
||||||
mi_create_dynamic_varobj container2 c2 \
|
mi_create_dynamic_varobj container2 c2 0 \
|
||||||
"create second container varobj"
|
"create second container varobj"
|
||||||
|
|
||||||
mi_gdb_test "-var-update container2" \
|
mi_gdb_test "-var-update container2" \
|
||||||
@ -223,7 +225,7 @@ mi_continue_to_line \
|
|||||||
[gdb_get_line_number {MI outer breakpoint here} ${srcfile}] \
|
[gdb_get_line_number {MI outer breakpoint here} ${srcfile}] \
|
||||||
"step to outer breakpoint"
|
"step to outer breakpoint"
|
||||||
|
|
||||||
mi_create_dynamic_varobj outer outer \
|
mi_create_dynamic_varobj outer outer 1 \
|
||||||
"create outer varobj"
|
"create outer varobj"
|
||||||
|
|
||||||
mi_list_varobj_children outer {
|
mi_list_varobj_children outer {
|
||||||
@ -253,7 +255,7 @@ mi_continue_to_line \
|
|||||||
[gdb_get_line_number {break to inspect struct and union} ${srcfile}] \
|
[gdb_get_line_number {break to inspect struct and union} ${srcfile}] \
|
||||||
"step to outer breakpoint"
|
"step to outer breakpoint"
|
||||||
|
|
||||||
mi_create_dynamic_varobj nscont nstype \
|
mi_create_dynamic_varobj nscont nstype 1 \
|
||||||
"create nstype varobj"
|
"create nstype varobj"
|
||||||
|
|
||||||
mi_list_varobj_children nscont {
|
mi_list_varobj_children nscont {
|
||||||
@ -275,7 +277,7 @@ mi_gdb_test "-var-set-visualizer nscont gdb.default_visualizer" \
|
|||||||
|
|
||||||
mi_gdb_test "python exception_flag = True" ""
|
mi_gdb_test "python exception_flag = True" ""
|
||||||
|
|
||||||
mi_create_dynamic_varobj nstype2 nstype2 \
|
mi_create_dynamic_varobj nstype2 nstype2 1 \
|
||||||
"create nstype2 varobj"
|
"create nstype2 varobj"
|
||||||
|
|
||||||
mi_list_varobj_children nstype2 {
|
mi_list_varobj_children nstype2 {
|
||||||
@ -290,7 +292,7 @@ mi_gdb_test "-var-evaluate-expression me" \
|
|||||||
"evaluate me varobj"
|
"evaluate me varobj"
|
||||||
|
|
||||||
# Regression test for python/14836.
|
# Regression test for python/14836.
|
||||||
mi_create_dynamic_varobj children_as_list children_as_list \
|
mi_create_dynamic_varobj children_as_list children_as_list 1 \
|
||||||
"printer whose children are returned as a list"
|
"printer whose children are returned as a list"
|
||||||
|
|
||||||
# Regression test for bug 14741.
|
# Regression test for bug 14741.
|
||||||
@ -298,7 +300,7 @@ mi_continue_to_line \
|
|||||||
[gdb_get_line_number {breakpoint bug 14741} ${srcfile}] \
|
[gdb_get_line_number {breakpoint bug 14741} ${srcfile}] \
|
||||||
"step to breakpoint for bug 14741"
|
"step to breakpoint for bug 14741"
|
||||||
|
|
||||||
mi_create_dynamic_varobj c c \
|
mi_create_dynamic_varobj c c 1 \
|
||||||
"create varobj for c"
|
"create varobj for c"
|
||||||
|
|
||||||
mi_gdb_test "-var-set-visualizer c ArrayPrinter" \
|
mi_gdb_test "-var-set-visualizer c ArrayPrinter" \
|
||||||
|
@ -1277,9 +1277,10 @@ proc mi_create_varobj_checked { name expression type testname } {
|
|||||||
|
|
||||||
# Same as mi_create_floating_varobj, but assumes the test is creating
|
# Same as mi_create_floating_varobj, but assumes the test is creating
|
||||||
# a dynamic varobj that has children, so the value must be "{...}".
|
# a dynamic varobj that has children, so the value must be "{...}".
|
||||||
proc mi_create_dynamic_varobj {name expression testname} {
|
# The "has_more" attribute is checked.
|
||||||
|
proc mi_create_dynamic_varobj {name expression has_more testname} {
|
||||||
mi_gdb_test "-var-create $name @ $expression" \
|
mi_gdb_test "-var-create $name @ $expression" \
|
||||||
"\\^done,name=\"$name\",numchild=\"\(-1\|\[0-9\]+\)\",value=\"{\\.\\.\\.}\",type=.*" \
|
"\\^done,name=\"$name\",numchild=\"0\",value=\"{\\.\\.\\.}\",type=.*,has_more=\"${has_more}\"" \
|
||||||
$testname
|
$testname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user