From 15630549010233e9d0f0b1971d27e121cd74bdd0 Mon Sep 17 00:00:00 2001 From: Antoine Tremblay Date: Thu, 19 Feb 2015 15:23:34 -0500 Subject: Fix breakpoint thread condition missing with mi and a pending breakpoint. When setting a pending breakpoint with a thread condition while using the mi interface, the thread condition would be lost by gdb when the breakpoint was resolved. This patch fixes this behavior by setting the thread condition properly in the mi case. Also, this patch modifies the mi-pending test case to test for this issue and removes some unneeded code in the testcase and dependency on stdio. gdb/Changelog: PR breakpoints/16466 * breakpoint.c (create_breakpoint): Set thread on breakpoint struct. gdb/testsuite/ChangeLog: PR breakpoints/16466 * gdb.mi/Makefile.in: Add mi-pendshr2.sl to cleanup. * gdb.mi/mi-pending.c (thread_func): New function. (int main): Add threading support required. * gdb.mi/mi-pending.exp: Add tests for this issue. * gdb.mi/mi-pendshr.c (pendfunc1): Remove stdio dependency. (pendfunc2): Remove stdio dependency. * gdb.mi/mi-pendshr2.c: New file. --- gdb/breakpoint.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8a252bf..0724a72 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9784,6 +9784,7 @@ create_breakpoint (struct gdbarch *gdbarch, make_cleanup (xfree, cond_string); } b->cond_string = cond_string; + b->thread = thread; } b->extra_string = NULL; b->ignore_count = ignore_count; -- cgit v1.1