diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2007-09-27 12:25:20 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2007-09-27 12:25:20 +0000 |
commit | 17f62551fb6e58bb5578ba6746369b551c0c5f4c (patch) | |
tree | 9599d5625a6c7b691f6828556bb36b8657dd7743 /gdb/testsuite | |
parent | d0fa13723fd15e60923d79b463247b15179608fa (diff) | |
download | gdb-17f62551fb6e58bb5578ba6746369b551c0c5f4c.zip gdb-17f62551fb6e58bb5578ba6746369b551c0c5f4c.tar.gz gdb-17f62551fb6e58bb5578ba6746369b551c0c5f4c.tar.bz2 |
* gdb.mi/var-cmd.c (do_children_tests): Initialize
the 'struct_declarations' variable to zeros.
* gdb.mi/mi2-var-child.exp: Step over said
initialization.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-var-child.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/var-cmd.c | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4beda48..63b5f7a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-09-27 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.mi/var-cmd.c (do_children_tests): Initialize + the 'struct_declarations' variable to zeros. + * gdb.mi/mi2-var-child.exp: Step over said + initialization. + 2007-09-24 Vladimir Prus <vladimir@codesourcery.com> * gdb.cp/mb-ctor.cc: New. diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp index 91ada0f..450f508 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp @@ -50,6 +50,10 @@ mi_continue_to_line $line_dlt_first_real "step to real start of do_children_test # # ##### ##### +# Step to "weird = &struct_declarations;" +set line_dct_weird [gdb_get_line_number "weird = &struct_declarations;"] +mi_next_to do_children_tests {} {.*var-cmd.c} \ + $line_dct_weird "step to line \$line_dct_weird" # Test: c_variable-4.2 # Desc: create variable "struct_declarations" diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c index c9b1c53..60a5b7b 100644 --- a/gdb/testsuite/gdb.mi/var-cmd.c +++ b/gdb/testsuite/gdb.mi/var-cmd.c @@ -16,6 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> +#include <string.h> struct _simple_struct { int integer; @@ -210,6 +211,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; |