summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-var-child.exp
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-04-01 15:27:26 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-04-01 15:27:26 +0000
commita73bafbcaa287d25ca811a4bcc01e9bde25b82e9 (patch)
treedf5b8f1d477c2fc505cfce7731d5b79901ec73b5 /gdb/testsuite/gdb.mi/mi-var-child.exp
parent30dc3ae37811636191eee1f5b79c1672026b38d9 (diff)
downloadbinutils-gdb-a73bafbcaa287d25ca811a4bcc01e9bde25b82e9.tar.gz
* gdb.mi/mi-var-child.c
(do_children_tests): User char[2] instead of char so that automatic printing of pointers to char don't give unpredicable result. * gdb.mi/var-cmd.c (do_locals_test): Initialize local variables. * gdb.mi/mi-var-child.exp: Step to right line of do_children_tests. * gdb.mi/mi2-var-child.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Step to right line of do_locals_tests. (do_children_tests): User char[2] instead of char so that automatic printing of pointers to char don't give unpredicable result. * gdb.mi/mi2-var-cmd.exp: Likewise. * lib/mi-support.exp (mi_continue_to_line): Pass test name to mi_wait_for_stop.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-var-child.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 324179fe328..12f01d489a0 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -43,17 +43,16 @@ mi_gdb_load ${binfile}
mi_runto do_children_tests
+set line_dlt_first_real [gdb_get_line_number "weird = &struct_declarations;"]
+mi_continue_to_line $line_dlt_first_real "step to real start of do_children_test"
+
+
##### #####
# #
# children tests #
# #
##### #####
-# Step past the initialization of struct_declarations.
-set line_weird [gdb_get_line_number "weird = &struct_declarations;"]
-mi_execute_to "exec-next" "end-stepping-range" do_children_tests {} ".*${srcfile}" \
- [expr $line_weird] {} "step \$line_weird"
-
# Test: c_variable-4.2
# Desc: create variable "struct_declarations"
mi_gdb_test "-var-create struct_declarations * struct_declarations" \
@@ -859,7 +858,7 @@ mi_gdb_test "-var-update --no-values *" \
"update all vars struct_declarations.long_array.10 changed, don't print values."
# Step over "struct_declarations.long_array[11] = 5678";
-set line_dct_a0_0 [gdb_get_line_number "a0 = '0';"]
+set line_dct_a0_0 [gdb_get_line_number "a0\[0\] = '0';"]
mi_step_to do_children_tests {} ".*${srcfile}" \
$line_dct_a0_0 "step \$line_dct_a0_0"