From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23754 invoked by alias); 21 Dec 2006 15:25:29 -0000 Received: (qmail 23735 invoked by uid 22791); 21 Dec 2006 15:25:28 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Dec 2006 15:25:22 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1GxPnK-00057K-Vp for gdb-patches@sources.redhat.com; Thu, 21 Dec 2006 18:25:19 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1GxPnE-00056s-FX; Thu, 21 Dec 2006 18:25:12 +0300 From: Vladimir Prus Subject: Re: [PATCH] Fix variable objects for references to pointers To: Nick Roberts , gdb-patches@sources.redhat.com Date: Thu, 21 Dec 2006 15:25:00 -0000 References: <17792.55489.274138.854508@kahikatea.snap.net.nz> <17793.7666.771432.41360@kahikatea.snap.net.nz> User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit Message-Id: 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/msg00289.txt.bz2 Nick Roberts wrote: > 2006-12-14  Nick Roberts   > > * gdb.mi/mi-var-cp.exp: New test for references to pointers. > > * gdb.mi/mi-var-cp.cc: Remove unnecessary string quotes. This comment likely applies to .exp file, not .cc. Besides, it would be better not to mix style changes with essential changes, to simplify review. Ah, and I've posted a patch to move most of .exp into .cc file, so I guess we've mid-air collision. > (reference_to_pointer): New procedure for above test. 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. > + set end_of_proc [gdb_get_line_number "return 99;"] > + send_gdb "-exec-next 4\n" > + gdb_expect { > +     -re > "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"reference_to_pointer\",args=\\\[\\\],file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$end_of_proc\"\}\r\n$mi_gdb_prompt$" > { +       pass "4xnext to return 99" +     } > +     timeout { fail "4xnext in reference_to_pointer (timeout)" } > + } FWIW, once my "Simplified MI tests" patch is checked in, this block can be just removed. > + > + 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" Looks good. I've poked at this manually and it seems to work like it should. 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. Thanks, Volodya