aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-var-child.c
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.c
parent30dc3ae37811636191eee1f5b79c1672026b38d9 (diff)
downloadgdb-a73bafbcaa287d25ca811a4bcc01e9bde25b82e9.zip
gdb-a73bafbcaa287d25ca811a4bcc01e9bde25b82e9.tar.gz
gdb-a73bafbcaa287d25ca811a4bcc01e9bde25b82e9.tar.bz2
* 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.c')
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.c b/gdb/testsuite/gdb.mi/mi-var-child.c
index f871cb7..21151cd 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.c
+++ b/gdb/testsuite/gdb.mi/mi-var-child.c
@@ -199,9 +199,9 @@ do_children_tests (void)
weird_struct *weird;
struct _struct_n_pointer *psnp;
struct _struct_n_pointer snp0, snp1, snp2;
- char a0, *a1, **a2, ***a3;
- char b0, *b1, **b2, ***b3;
- char c0, *c1, **c2, ***c3;
+ char a0[2] = {}, *a1, **a2, ***a3;
+ char b0[2] = {}, *b1, **b2, ***b3;
+ char c0[2] = {}, *c1, **c2, ***c3;
long z0, *z1, **z2, ***z3;
long y0, *y1, **y2, ***y3;
long x0, *x1, **x2, ***x3;
@@ -233,16 +233,16 @@ do_children_tests (void)
struct_declarations.long_array[11] = 5678;
/* Struct/pointer/array tests */
- a0 = '0';
- a1 = &a0;
+ a0[0] = '0';
+ a1 = a0;
a2 = &a1;
a3 = &a2;
- b0 = '1';
- b1 = &b0;
+ b0[0] = '1';
+ b1 = b0;
b2 = &b1;
b3 = &b2;
- c0 = '2';
- c1 = &c0;
+ c0[1] = '2';
+ c1 = c0;
c2 = &c1;
c3 = &c2;
z0 = 0xdead + 0;