aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-01-24 13:49:58 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-01-24 13:49:58 +0000
commitd0d8b0c6675218bed37125a99c9fedb12f9c1265 (patch)
treed0f620269b49c6eb5182c4cf12bd24c9dc65e5ba /gdb/breakpoint.c
parent4403d8e9b35649c5b24f65c0ec0decc3839e1164 (diff)
downloadgdb-d0d8b0c6675218bed37125a99c9fedb12f9c1265.zip
gdb-d0d8b0c6675218bed37125a99c9fedb12f9c1265.tar.gz
gdb-d0d8b0c6675218bed37125a99c9fedb12f9c1265.tar.bz2
gdb/
Fix watchpoints to be specific for each inferior. * breakpoint.c (watchpoint_in_thread_scope): Verify also current_program_space. * i386-nat.c (i386_inferior_data_cleanup): New. (i386_inferior_data_get): Replace variable inf_data_local by an inferior_data call. (i386_use_watchpoints): Initialize i386_inferior_data. * linux-nat.c (linux_nat_iterate_watchpoint_lwps): Use INFERIOR_PTID specific iterate_over_lwps. gdb/testsuite/ Fix watchpoints to be specific for each inferior. * gdb.multi/watchpoint-multi.c: New file. * gdb.multi/watchpoint-multi.exp: New file.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f6a0276..573a49c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1239,9 +1239,10 @@ is_watchpoint (const struct breakpoint *bpt)
static int
watchpoint_in_thread_scope (struct watchpoint *b)
{
- return (ptid_equal (b->watchpoint_thread, null_ptid)
- || (ptid_equal (inferior_ptid, b->watchpoint_thread)
- && !is_executing (inferior_ptid)));
+ return (b->base.pspace == current_program_space
+ && (ptid_equal (b->watchpoint_thread, null_ptid)
+ || (ptid_equal (inferior_ptid, b->watchpoint_thread)
+ && !is_executing (inferior_ptid))));
}
/* Set watchpoint B to disp_del_at_next_stop, even including its possible