aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-01-11 20:48:49 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-01-11 20:48:49 +0000
commit81121995ba146b0c5d0ed18730b07c2c3fcdb974 (patch)
tree13eabd8285e2aa8ab35f735c1d78a5f0c65bcff2 /gdb/testsuite/gdb.mi
parentc8b2f53c0bfcc51d21e3dda592b1a6e4cb594254 (diff)
downloadgdb-81121995ba146b0c5d0ed18730b07c2c3fcdb974.zip
gdb-81121995ba146b0c5d0ed18730b07c2c3fcdb974.tar.gz
gdb-81121995ba146b0c5d0ed18730b07c2c3fcdb974.tar.bz2
* gdb.mi/mi-var-cp.cc (reference_update_tests):
Make sure the variable we're using is in scope. (reference_to_pointer): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cp.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc
index a633d22..33f84e6 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.cc
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc
@@ -31,6 +31,8 @@ void reference_update_tests ()
x = 567;
/*: mi_varobj_update RX {} "update RX (3)"
:*/
+ /* Dummy assignment to keep 'x' in scope. */
+ x = 444;
/*: END: reference_update :*/
}
@@ -72,12 +74,11 @@ void base_in_reference_test_main ()
int reference_to_pointer ()
{
+ /*: BEGIN: reference_to_pointer :*/
S s, *ptr_s, *& rptr_s = ptr_s;
s.i = 67;
s.j = 89;
ptr_s = &s;
- /*: BEGIN: reference_to_pointer :*/
- return 99;
/*:
mi_create_varobj RPTR rptr_s "create varobj for rptr_s"
@@ -91,6 +92,7 @@ int reference_to_pointer ()
mi_check_varobj_value RPTR.public.i 67 "check i member"
mi_check_varobj_value RPTR.public.j 89 "check j member"
:*/
+ return 99;
/*: END: reference_to_pointer :*/
}