From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix variable objects for references to pointers
Date: Thu, 04 Jan 2007 22:30:00 -0000 [thread overview]
Message-ID: <17821.32774.51044.39571@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20070104140907.GA15440@nevyn.them.org>
> Let's hold off on this for a little bit and use Vlad's new stuff.
Here are the tests using the new stuff.
--
Nick http://www.inet.net.nz/~nickrob
2007-01-05 Nick Roberts <nickrob@snap.net.nz>
* gdb.mi/mi-var-cp.exp: New test for references to pointers.
* gdb.mi/mi-var-cp.cc: (reference_to_pointer): New procedure for above
test.
*** mi-var-cp.exp 05 Jan 2007 10:59:45 +1300 1.3
--- mi-var-cp.exp 05 Jan 2007 11:00:07 +1300
*************** mi_prepare_inline_tests $srcfile
*** 43,48 ****
--- 43,49 ----
mi_run_inline_test reference_update
mi_run_inline_test base_in_reference
+ mi_run_inline_test reference_to_pointer
mi_gdb_exit
return 0
*** mi-var-cp.cc 05 Jan 2007 10:58:59 +1300 1.3
--- mi-var-cp.cc 05 Jan 2007 11:15:21 +1300
*************** void base_in_reference_test_main ()
*** 70,79 ****
--- 70,103 ----
base_in_reference_test (s);
}
+ int 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"
+
+ mi_list_varobj_children RPTR {{RPTR.public public 2}} \
+ "list public child of RPTR"
+
+ mi_list_varobj_children RPTR.public \
+ {{RPTR.public.i i 0 int}
+ {RPTR.public.j j 0 int}} "list children of 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"
+ :*/
+ /*: END: reference_to_pointer :*/
+ }
int main ()
{
reference_update_tests ();
base_in_reference_test_main ();
+ reference_to_pointer ();
return 0;
}
next prev parent reply other threads:[~2007-01-04 22:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-14 4:58 Nick Roberts
2006-12-14 6:03 ` Vladimir Prus
2006-12-14 9:53 ` Nick Roberts
2006-12-21 15:25 ` Vladimir Prus
2006-12-21 22:38 ` Nick Roberts
2007-01-03 22:55 ` Daniel Jacobowitz
2007-01-04 9:42 ` Nick Roberts
2007-01-04 11:56 ` Vladimir Prus
2007-01-04 14:09 ` Daniel Jacobowitz
2007-01-04 22:30 ` Nick Roberts [this message]
2007-01-04 22:33 ` Daniel Jacobowitz
2007-01-03 22:49 ` 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=17821.32774.51044.39571@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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