This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A little patch for two comments in infrun.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]