This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Simplify breakpoint.c function parameters
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 8 Dec 2008 12:05:36 +0100
- Subject: Re: [patch] Simplify breakpoint.c function parameters
- References: <20081207222253.GA6749@host0.dyn.jankratochvil.net>
> It fixes a small bug - update_watchpoint() for bp_watchpoint (software
> watchpoint) created breakpoint locations bp_loc_hardware_watchpoint while it
> should be bp_loc_other. But I am not aware of any (possibly negative) effect
> it had.
That's true!
> 2008-12-07 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Fix loc_type of `bp_location's created by update_watchpoint.
> * breakpoint.c (allocate_bp_location): Remove the bp_type parameter.
> Replace bp_type by bpt->type. Update prototype. All callers updated.
> (add_location_to_breakpoint): Remove the bp_type parameter.
> Replace bp_type by b->type. All callers updated.
> (set_breakpoint_location_function): Replace bptype by b->type.
After careful review, this looks right to me.
I'm wondering if it would make sense to get rid of the loc_type field
and compute it on the fly through a function...
--
Joel