This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/WIP PATCH 00/14] I/T sets
On Monday 28 November 2011 15:38:53, Pedro Alves wrote:
> This series is also available at http://github.com/palves/gdb/tree/itsets-v1
> for convenience.
Whoops, I've just noticed that the series I posted is badly
broken due to a last minute change. I've just pushed the commit
below there to fix it, and will fold it into the proper
place in for v2.
Sorry about that.
--
Pedro Alves
commit 0103de5e1e88bab2050a19abc51c92fd3d3898d0
Author: Pedro Alves <pedro@codesourcery.com>
Date: Mon Nov 28 18:02:14 2011 +0000
Allow calling itset_reference on a NULL itset. We'll just return a
NULL itset then.
(top-gdb) bt
#0 0x00000000006a4811 in itset_reference (itset=0x0) at ../../gdb/gdb/itset.c:1532
#1 0x000000000052f87d in bpstat_stop_set (bs_head=0x1461ad0) at ../../gdb/gdb/breakpoint.c:4559
#2 0x00000000005a09eb in handle_inferior_event (ecs=0x7fff568abc00) at ../../gdb/gdb/infrun.c:5183
diff --git a/gdb/itset.c b/gdb/itset.c
index 717d261..25e40b6 100644
--- a/gdb/itset.c
+++ b/gdb/itset.c
@@ -1529,7 +1529,8 @@ itset_contains_thread (struct itset *set, struct thread_info *thr)
struct itset *
itset_reference (struct itset *itset)
{
- ++itset->refc;
+ if (itset)
+ ++itset->refc;
return itset;
}