From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16956 invoked by alias); 4 Jan 2007 14:09:26 -0000 Received: (qmail 16944 invoked by uid 22791); 4 Jan 2007 14:09:25 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 04 Jan 2007 14:09:20 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H2THH-000421-S1; Thu, 04 Jan 2007 09:09:07 -0500 Date: Thu, 04 Jan 2007 14:09:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix variable objects for references to pointers Message-ID: <20070104140907.GA15440@nevyn.them.org> Mail-Followup-To: Nick Roberts , Vladimir Prus , gdb-patches@sources.redhat.com 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17820.52196.372141.269808@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) 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/msg00117.txt.bz2 On Thu, Jan 04, 2007 at 10:41:56PM +1300, Nick Roberts wrote: > 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. Let's hold off on this for a little bit and use Vlad's new stuff. The above is better, except you really should use mi_gdb_test even if you don't care about the result. It's important that every time you send a command to GDB that produces output, you also consume that output. Otherwise, you can get this behavior: -> -break-insert $end_of_proc -> -exec-continue <- ^done <- (gdb) Oops, that looks like the default case, something must have gone wrong with -exec-continue. FAIL. <- ^running <- ^stopped <- (gdb) -- Daniel Jacobowitz CodeSourcery