mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
* gdb.mi/mi-var-cp.cc (reference_update_tests):
Make sure the variable we're using is in scope. (reference_to_pointer): Likewise.
This commit is contained in:
parent
c8b2f53c0b
commit
81121995ba
@ -1,3 +1,9 @@
|
||||
2007-01-11 Vladimir Prus <vladimir@codesourcery.com>
|
||||
|
||||
* 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 <nathan@codesourcery.com>
|
||||
|
||||
* lib/gdb.exp (gdb_compile_test): New.
|
||||
|
@ -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 :*/
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user