From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Kevin Buettner Cc: Michael Snyder , Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] breakpoint.c: More check_duplicates() changes. Date: Fri, 18 May 2001 16:56:00 -0000 Message-id: References: <1010512080125.ZM29521@ocotillo.lan> X-SW-Source: 2001-05/msg00357.html Kevin Buettner 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.