This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch] Simplify breakpoint.c function parameters


> 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


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