This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] breakpoint.c: More check_duplicates() changes.
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFA] breakpoint.c: More check_duplicates() changes.
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: 17 May 2001 18:05:15 -0500
- Cc: Michael Snyder <msnyder at cygnus dot com>,Jim Blandy <jimb at cygnus dot com>, gdb-patches at sources dot redhat dot com
- References: <1010512080125.ZM29521@ocotillo.lan>
Kevin Buettner <kevinb@cygnus.com> writes:
> It turns out that there are several other breakpoint types which
> were using zero-valued addresses to cause an early return from
> check_duplicates(). They are:
>
> bp_catch_exec
> bp_longjmp_resume
> bp_catch_fork
> bp_catch_vfork
Wow, I really botched that patch. I did try to look for this stuff.
:(
> The patch below creates a new function called duplicate_okay() and
> uses this function to effect the early return. I.e, the above code
> has again been rewritten as follows:
>
> if (duplicate_okay (bpt))
> return;
>
> I removed the half-truth telling comment too. I think the above
> statement is reasonably self documenting.
I think the name `duplicate_okay' is misleading; I mean, it's okay to
have duplicate breakpoints, isn't it? One has to read the function's
uses carefully to see why that name is appropriate.
I think a better name would be `has_meaningful_address', or something
like that: the function tells us whether the breakpoint structure's
`address' field is meaningful. If a breakpoint's address isn't
meaningful, then we certainly shouldn't consider it when culling
duplicates.
Beyond that, I approve of this change.