From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19343 invoked by alias); 4 Jan 2007 11:56:40 -0000 Received: (qmail 19333 invoked by uid 22791); 4 Jan 2007 11:56:39 -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, 04 Jan 2007 11:56:35 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1H2RCs-0002u1-Q2 for gdb-patches@sources.redhat.com; Thu, 04 Jan 2007 14:56:31 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1H2RCe-0002tg-An; Thu, 04 Jan 2007 14:56: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, 04 Jan 2007 11:56:00 -0000 References: <17792.55489.274138.854508@kahikatea.snap.net.nz> <17820.52196.372141.269808@kahikatea.snap.net.nz> User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit 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: 2007-01/txt/msg00114.txt.bz2 Nick Roberts wrote: > > This line isn't testing anything you're interested in, right? > > Then you can just put a breakpoint in the right place and run > > to that breakpoint. I'd recommend mi_continue_to. I don't > > see a convenient helper in mi-support.exp to set the breakpoint, but > > there's an example in mi-var-cmd.exp. > > Something like below? > > set end_of_proc [gdb_get_line_number "return 99;"] > send_gdb "-break-insert $end_of_proc\n" > mi_continue_to ".*" reference_to_pointer "" ".*${srcfile}" $end_of_proc \ > "continue to return 99" > > > Other tests seem to use mi_gdb_test for -break-insert but I'm not > interested in the result and mi_continue presumably sifts through the > output until it reaches > something it recognises. I'm also not that interested in the breakpoint > number so I've used a wildcard for future-proofing. I don't think there's need to polish this fragment. The "Simplified MI testing" patch of mine is almost approved, and introduces automatic stepping to the right line in source. Ah, and I think I'd need to modify that patch so that if you stop on the wrong line we error out, and don't wait for timeout -- I think the current version of my patch has exactly this problem that Dan pointed out earlier in this thread. - Volodya