[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    Re: A little patch for two comments in infrun.c
From:       Daniel Jacobowitz <drow () false ! org>
Date:       2006-05-30 18:27:28
Message-ID: 20060530182728.GA19251 () nevyn ! them ! org
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic