From f365de7342a5440ee8d04545d3b5b248102c4803 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Mon, 16 Jan 2006 12:55:18 +0000 Subject: [PATCH 1/1] 2006-01-16 Andrew Stubbs * breakpoint.c (insert_breakpoints): Check that a thread exists before inserting thread specific breakpoints. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 69a7f9be01..eb145f10a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-01-16 Andrew Stubbs + + * breakpoint.c (insert_breakpoints): Check that a thread exists + before inserting thread specific breakpoints. + 2006-01-15 Mark Kettenis * osabi.c (generic_elf_osabi_sniffer): Fix typo in previous diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 239cd3604a..064762d381 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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 -- 2.34.1