* gdb.mi/mi-var-child.c (do_children_tests): Initialize
authorDaniel Jacobowitz <drow@false.org>
Sun, 31 Jul 2005 22:10:53 +0000 (22:10 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 31 Jul 2005 22:10:53 +0000 (22:10 +0000)
struct_declarations.
* gdb.mi/mi-var-child.exp: Step over the initialization of
struct_declarations.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-var-child.c
gdb/testsuite/gdb.mi/mi-var-child.exp

index 6ca381b5cb8935b29130246b538e66fd0ad716ba..ef3980c539b18c8f40b27fbb7b3be293b4a03378 100644 (file)
@@ -1,3 +1,10 @@
+2005-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * gdb.mi/mi-var-child.c (do_children_tests): Initialize
+       struct_declarations.
+       * gdb.mi/mi-var-child.exp: Step over the initialization of
+       struct_declarations.
+
 2005-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * gdb.mi/basics.c, gdb.mi/var-cmd.c: Revert last change.
index 06b3e357ff637517b40f26a9bef626bdf420c1fa..7686758a02988c43f3305efb824d042aef140bcb 100644 (file)
@@ -208,6 +208,7 @@ do_children_tests (void)
   int bar;
 
   struct _struct_decl struct_declarations;
+  memset (&struct_declarations, 0, sizeof (struct_declarations));
   weird = &struct_declarations;
 
   struct_declarations.integer = 123;
index 63f49eddd877c6df8032cbe3223e0e5f43989658..3337d890a80c0e3bf53936c460d11bb0f670c652 100644 (file)
@@ -47,6 +47,10 @@ mi_runto do_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"