diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 070ea72..7c47870 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2013-12-06 Keven Boell <keven.boell@intel.com> + + * lib/mi-support.exp (mi_list_varobj_children_range): Add + call to mi_list_array_varobj_children_with_index. + (mi_list_array_varobj_children_with_index): New function. + Add parameter to specify array start. + 2013-12-03 Jose E. Marchesi <jose.marchesi@oracle.com> * gdb.base/sigall.exp (test_one_sig): gdb identifies SIGLOST as a diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 0c3cdbe..cb7bf90 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1487,9 +1487,18 @@ proc mi_list_varobj_children_range {varname from to numchildren children testnam # Verifies that variable object VARNAME has NUMBER children, # where each one is named $VARNAME.<index-of-child> and has type TYPE. proc mi_list_array_varobj_children { varname number type testname } { + mi_list_array_varobj_children_with_index $varname $number 0 $type $testname +} + +# Same as mi_list_array_varobj_children, but allowing to pass a start index +# for an array. +proc mi_list_array_varobj_children_with_index { varname number start_index \ + type testname } { set t {} + set index $start_index for {set i 0} {$i < $number} {incr i} { - lappend t [list $varname.$i $i 0 $type] + lappend t [list $varname.$index $index 0 $type] + incr index } mi_list_varobj_children $varname $t $testname } |