From: Andrew Stubbs Date: Mon, 16 Jan 2006 12:55:18 +0000 (+0000) Subject: 2006-01-16 Andrew Stubbs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f365de7342a5440ee8d04545d3b5b248102c4803;p=binutils-gdb.git 2006-01-16 Andrew Stubbs * breakpoint.c (insert_breakpoints): Check that a thread exists before inserting thread specific breakpoints. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 69a7f9be01b..eb145f10a35 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 239cd3604ae..064762d3812 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