From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: Robustify mi-var-cp
Date: Tue, 09 Jan 2007 20:58:00 -0000 [thread overview]
Message-ID: <200701092355.21537.ghost@cs.msu.su> (raw)
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
This test fails for me, apparently due to compiler version dependency.
The attached patch makes sure we don't try to access variables
that are out of scope. OK?
- Volodya
[-- Attachment #2: mi-var-cp.diff --]
[-- Type: text/x-diff, Size: 1075 bytes --]
Index: mi-var-cp.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cp.cc,v
retrieving revision 1.5
diff -u -p -r1.5 mi-var-cp.cc
--- mi-var-cp.cc 9 Jan 2007 17:59:13 -0000 1.5
+++ mi-var-cp.cc 9 Jan 2007 20:54:23 -0000
@@ -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 :*/
}
next reply other threads:[~2007-01-09 20:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-09 20:58 Vladimir Prus [this message]
2007-01-09 21:50 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701092355.21537.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox