From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8036 invoked by alias); 4 Jan 2007 18:49:20 -0000 Received: (qmail 8025 invoked by uid 22791); 4 Jan 2007 18:49:19 -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 18:49:15 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1H2XeF-0007QB-Rp for gdb-patches@sources.redhat.com; Thu, 04 Jan 2007 21:49:13 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1H2Xe8-0007Mc-Ae; Thu, 04 Jan 2007 21:49:00 +0300 From: Vladimir Prus Subject: Re: MI: Another -var-update bug? [PATCH] To: Nick Roberts , gdb-patches@sources.redhat.com Date: Thu, 04 Jan 2007 18:49:00 -0000 References: <17790.36044.454650.114329@kahikatea.snap.net.nz> <17791.40309.90872.126841@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: 2007-01/txt/msg00124.txt.bz2 Nick Roberts wrote: > Something like below? This patch introduces this for me: FAIL: gdb.mi/mi-var-cp.exp: update RX (3) Do you get this failure to? If yes, can you please fix it? If no, let me know and I'll investigate. > /* FIXME: select_frame could fail */ > !       if (fi) > !       { > !         CORE_ADDR pc = get_frame_pc (fi); > !         if (pc <  BLOCK_START (var->root->valid_block) || > !             pc >= BLOCK_END (var->root->valid_block)) > !           within_scope = 0; > !         select_frame (fi); > !       } The code later in this function is only executed if "within_scope" is true. Would it be better to call select_frame only if within_scope is set to true, like this: if (pc < BLOCK_START (var->root->valid_block) || pc >= BLOCK_END (var->root->valid_block)) within_scope = 0; else select_frame (fi); ? - Volodya