From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29310 invoked by alias); 4 Jan 2007 22:30:49 -0000 Received: (qmail 29295 invoked by uid 22791); 4 Jan 2007 22:30:48 -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, 04 Jan 2007 22:30:42 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-54.snap.net.nz [202.124.120.54]) by viper.snap.net.nz (Postfix) with ESMTP id B6EF03D834F; Fri, 5 Jan 2007 11:30:34 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 8BDC24F6D0; Fri, 5 Jan 2007 11:30:32 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17821.32774.51044.39571@kahikatea.snap.net.nz> Date: Thu, 04 Jan 2007 22:30:00 -0000 To: Daniel Jacobowitz Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix variable objects for references to pointers In-Reply-To: <20070104140907.GA15440@nevyn.them.org> References: <17792.55489.274138.854508@kahikatea.snap.net.nz> <17793.7666.771432.41360@kahikatea.snap.net.nz> <20070103225532.GQ17935@nevyn.them.org> <17820.52196.372141.269808@kahikatea.snap.net.nz> <20070104140907.GA15440@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.92.5 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: 2007-01/txt/msg00157.txt.bz2 > 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 * 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; }