This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: A little patch for two comments in infrun.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 30 May 2006 14:27:28 -0400
- Subject: Re: A little patch for two comments in infrun.c
- References: <Pine.LNX.4.64.0605301602590.2773@localhost.localdomain>
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