This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix crash on conditional watchpoints (PR 11371)
On Sat, 14 Aug 2010 04:38:17 +0200, Pedro Alves wrote:
> Please give this alternative patch a try, and let me know what you think.
I find this patch as a better one.
(I could not (easily) regression it myself as sourceware.org is down today.)
> +/* Decrement reference count. If the reference count reaches 0,
> + destroy the bp_location. Sets *BLP to NULL. */
> +
> +static void
> +decref_bp_location (struct bp_location **blp)
> +{
I miss here some:
gdb_assert ((*blp)->refc > 0);
> + if (--(*blp)->refc == 0)
> + free_bp_location (*blp);
> + *blp = NULL;
> +}
Thanks,
Jan