This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH RFA] breakpoint.c: More check_duplicates() changes.



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.


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