From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eli Zaretskii" To: kevinb@cygnus.com Cc: msnyder@cygnus.com, jimb@cygnus.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] breakpoint.c: More check_duplicates() changes. Date: Sat, 12 May 2001 03:15:00 -0000 Message-id: <5137-Sat12May2001131511+0300-eliz@is.elta.co.il> References: <1010512080125.ZM29521@ocotillo.lan> X-SW-Source: 2001-05/msg00268.html > Date: Sat, 12 May 2001 01:01:25 -0700 > From: Kevin Buettner > > +/* Return true for all breakpoint types which are permitted to have > + addresses which may be a duplicate of some other breakpoint. E.g, > + watchpoints will always have zero valued addresses and we don't > + want check_duplicates() to mark a watchpoint as a duplicate of an > + actual breakpoint at address zero. */ > + > +static int > +duplicate_okay (struct breakpoint *bpt) > +{ > + enum bptype type = bpt->type; > + > + return type == bp_watchpoint > + || type == bp_hardware_watchpoint > + || type == bp_read_watchpoint > + || type == bp_access_watchpoint > + || type == bp_catch_exec > + || type == bp_longjmp_resume > + || type == bp_catch_fork > + || type == bp_catch_vfork; > +} > + Is it perhaps possible to explain, for each of these types, why it is okay to duplicate it? The comment only gives one example.