From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13619 invoked by alias); 21 Dec 2006 22:38:39 -0000 Received: (qmail 13606 invoked by uid 22791); 21 Dec 2006 22:38:36 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Dec 2006 22:38:24 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-96.snap.net.nz [202.124.120.96]) by viper.snap.net.nz (Postfix) with ESMTP id 225773DA0DD; Fri, 22 Dec 2006 11:39:53 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id C774DBE457; Fri, 22 Dec 2006 11:33:43 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <17803.3014.401467.140643@kahikatea.snap.net.nz> Date: Thu, 21 Dec 2006 22:38:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix variable objects for references to pointers In-Reply-To: References: <17792.55489.274138.854508@kahikatea.snap.net.nz> <17793.7666.771432.41360@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.0.92.1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00295.txt.bz2 > > 2006-12-14 =A0Nick Roberts =A0 > >=20 > > * gdb.mi/mi-var-cp.exp: New test for references to pointers. > >=20 > > * gdb.mi/mi-var-cp.cc: Remove unnecessary string quotes. >=20 > This comment likely applies to .exp file, not .cc.=20=20 Yes. > Besides,=20 > it would be better not to mix style changes with essential changes, > to simplify review. I was trying to be consistent. Previously some arguments were in string quotes and some weren't. > Ah, and I've posted a patch to move most of .exp into .cc file, > so I guess we've mid-air collision. >=20 > > (reference_to_pointer): New procedure for above test. >=20 > Am I missing something, or this change is not included in > your mail? Ah, I think it's the CVS problem, whereas added > files are not included in diff. Sorry, I forgot include it. Its attached below > > + set end_of_proc [gdb_get_line_number "return 99;"] > > + send_gdb "-exec-next 4\n" > > + gdb_expect { > > + =A0 =A0 -re > > "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=3D\"end-stepping-rang= e\",thread-id=3D\"\[01\]\",frame=3D\{addr=3D\"$hex\",func=3D\"reference_to_= pointer\",args=3D\\\[\\\],file=3D\".*${srcfile}\",fullname=3D\"${fullname_s= yntax}${srcfile}\",line=3D\"$end_of_proc\"\}\r\n$mi_gdb_prompt$" > > { + =A0=A0=A0=A0=A0=A0pass "4xnext to return 99" + =A0 =A0 } > > + =A0 =A0 timeout { fail "4xnext in reference_to_pointer (timeout)" } > > + } >=20 > FWIW, once my "Simplified MI tests" patch is checked in, this block > can be just removed. Sure. > > + > > + mi_create_varobj RPTR rptr_s "create varobj for rptr_s" > > + > > + mi_list_varobj_children RPTR {{RPTR.public public 2}} \ > > + =A0 =A0 "list public child of RPTR" > > + > > + mi_list_varobj_children =A0RPTR.public \ > > + =A0 =A0 {{RPTR.public.i i 0 int} > > + =A0 =A0 =A0{RPTR.public.j j 0 int}} "list children of reference to p= ointer" > > + > > + mi_check_varobj_value RPTR.public.i 67 "check i member" > > + mi_check_varobj_value RPTR.public.j 89 "check j member" >=20 > Looks good. I've poked at this manually and it seems to work like > it should. >=20 > Now I guess you need to post a patch including the C++ file changes, > now that it's in CVS, and we need to find somebody who can actually > approve the patch. I'm pursuing this issue. --=20 Nick http://www.inet.net.nz/~nick= rob *** mi-var-cp.cc 09 Dec 2006 10:52:03 +1300 1.2 --- mi-var-cp.cc 14 Dec 2006 21:13:21 +1300=09 *************** void base_in_reference_test_main () *** 39,48 **** --- 39,57 ---- base_in_reference_test (s); } =20=20 + int reference_to_pointer () + { + S s, *ptr_s, *& rptr_s =3D ptr_s; + s.i =3D 67; + s.j =3D 89; + ptr_s =3D &s; + return 99; + } =20=20 int main () { reference_update_tests (); base_in_reference_test_main (); + reference_to_pointer (); return 0; }