2006-01-16 Andrew Stubbs <andrew.stubbs@st.com>
authorAndrew Stubbs <andrew.stubbs@st.com>
Mon, 16 Jan 2006 12:55:18 +0000 (12:55 +0000)
committerAndrew Stubbs <andrew.stubbs@st.com>
Mon, 16 Jan 2006 12:55:18 +0000 (12:55 +0000)
* breakpoint.c (insert_breakpoints): Check that a thread exists
before inserting thread specific breakpoints.

gdb/ChangeLog
gdb/breakpoint.c

index 69a7f9be01bfbb9c532175d15e626f2ae5759fcc..eb145f10a35be26e8f28708e9473aff2699e4e9a 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-16  Andrew Stubbs  <andrew.stubbs@st.com>
+
+       * breakpoint.c (insert_breakpoints): Check that a thread exists
+       before inserting thread specific breakpoints.
+
 2006-01-15  Mark Kettenis  <kettenis@gnu.org>
 
        * osabi.c (generic_elf_osabi_sniffer): Fix typo in previous
index 239cd3604aecbe53f4bd9afb8088ee8bc863f291..064762d38126279fd37f3ff13e591f07069f7316 100644 (file)
@@ -1142,6 +1142,12 @@ insert_breakpoints (void)
       if (!breakpoint_enabled (b->owner))
        continue;
 
+      /* There is no point inserting thread-specific breakpoints if the
+        thread no longer exists.  */
+      if (b->owner->thread != -1
+         && !valid_thread_id (b->owner->thread))
+       continue;
+
       /* FIXME drow/2003-10-07: This code should be pushed elsewhere when
         hardware watchpoints are split into multiple loc breakpoints.  */
       if ((b->loc_type == bp_loc_hardware_watchpoint