From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28369 invoked by alias); 30 May 2006 18:27:34 -0000 Received: (qmail 28357 invoked by uid 22791); 30 May 2006 18:27:34 -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; Tue, 30 May 2006 18:27:31 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fl8wC-00051h-HQ; Tue, 30 May 2006 14:27:28 -0400 Date: Tue, 30 May 2006 18:48:00 -0000 From: Daniel Jacobowitz To: Wu Zhou Cc: gdb@sourceware.org Subject: Re: A little patch for two comments in infrun.c Message-ID: <20060530182728.GA19251@nevyn.them.org> Mail-Followup-To: Wu Zhou , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00400.txt.bz2 On Tue, May 30, 2006 at 04:24:11PM +0800, Wu Zhou wrote: > Hi, > > I am reading the source of infrun.c, and having a couple questions about > two comments in the code: > > First, in resume (int step, enum target_signal sig), one comment says: > > /* FIXME: calling breakpoint_here_p (read_pc ()) three times! */ > > Does this still make sense? In function resume, there does exist three > call for breakpoint_here_p (read_pc ()). But read_pc () might return > various values at various points. The breakpoint chain maintained in > this function might also change as the execution proceeds. So I am > thinking this comment doesn't make sense here. Am I right? Any error, > feel free to correct me. That's why it hasn't been fixed yet :-) It's wasteful, but not very wasteful, because of the register cache. The breakpoint chain shouldn't change during the function; the singlestep breakpoint is modified, but isn't on that chain. I don't much care if you leave or remove the FIXME. -- Daniel Jacobowitz CodeSourcery