From 81121995ba146b0c5d0ed18730b07c2c3fcdb974 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 11 Jan 2007 20:48:49 +0000 Subject: [PATCH] * gdb.mi/mi-var-cp.cc (reference_update_tests): Make sure the variable we're using is in scope. (reference_to_pointer): Likewise. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.mi/mi-var-cp.cc | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 61db5831aa4..47786a85410 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-01-11 Vladimir Prus + + * gdb.mi/mi-var-cp.cc (reference_update_tests): + Make sure the variable we're using is in scope. + (reference_to_pointer): Likewise. + 2007-01-11 Nathan Sidwell * lib/gdb.exp (gdb_compile_test): New. diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc index a633d22536b..33f84e6fc31 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 :*/ } -- 2.30.2