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: Mark Kettenis <kettenis at science dot uva dot nl>
- Date: 12 May 2001 12:30:39 +0200
- Cc: gdb-patches at sources dot redhat dot com
- References: <1010512080125.ZM29521@ocotillo.lan>
Kevin Buettner <kevinb@cygnus.com> writes:
> +/* 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;
> +}
The GNU coding standards suggest adding () around the returned
expression. Helps Emacs indenting this bit of code correctly :-).
Mark