This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] breakpoint.c: Pass breakpoint type to set_raw_breakpoint()
- To: Fernando Nasser <fnasser at redhat dot com>, Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFA] breakpoint.c: Pass breakpoint type to set_raw_breakpoint()
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Fri, 11 May 2001 12:04:13 -0700
- Cc: Michael Snyder <msnyder at cygnus dot com>, Jim Blandy <jimb at cygnus dot com>, gdb-patches at sources dot redhat dot com
- References: <1010511075057.ZM27226@ocotillo.lan> <3AFC073A.CADCE636@redhat.com>
On May 11, 11:37am, Fernando Nasser wrote:
> I agree with your solution. Actually, one day, in the lost past, this
> function did have more arguments. Look at the comments for
> set_raw_breakpoint():
>
> /* Low level routine to set a breakpoint.
> Takes as args the three things that every breakpoint must have.
>
> BTW, when you check in you can change the comment as well to reflect the
> current version.
Fernando,
Thanks for calling my attention to the set_raw_breakpoint() comment.
I have rewritten it from:
/* Low level routine to set a breakpoint.
Takes as args the three things that every breakpoint must have.
Returns the breakpoint object so caller can set other things.
Does not set the breakpoint number!
Does not print anything.
==> This routine should not be called if there is a chance of later
error(); otherwise it leaves a bogus breakpoint on the chain. Validate
your arguments BEFORE calling this routine! */
To:
/* set_raw_breakpoint() is a low level routine for allocating and
partially initializing a breakpoint of type BPTYPE. The newly
created breakpoint's address, section, source file name, and line
number are provided by SAL. The newly created and partially
initialized breakpoint is added to the breakpoint chain and
is also returned as the value of this function.
It is expected that the caller will complete the initialization of
the newly created breakpoint struct as well as output any status
information regarding the creation of a new breakpoint. In
particular, set_raw_breakpoint() does NOT set the breakpoint
number! Care should be taken to not allow an error() to occur
prior to completing the initializtion of the breakpoint. If this
should happen, a bogus breakpoint will be left on the chain. */
Kevin