summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-pendshr.c
diff options
context:
space:
mode:
authorAntoine Tremblay <antoine.tremblay@ericsson.com>2015-02-19 15:23:34 -0500
committerAntoine Tremblay <antoine.tremblay@ericsson.com>2015-03-24 08:38:49 -0400
commit15630549010233e9d0f0b1971d27e121cd74bdd0 (patch)
tree18b911965de53b783ada68f01518a466cc4dd4d7 /gdb/testsuite/gdb.mi/mi-pendshr.c
parent5421cc6e55c7b3fba445c6085a05efb2a6f58505 (diff)
downloadbinutils-gdb-15630549010233e9d0f0b1971d27e121cd74bdd0.tar.gz
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.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-pendshr.c')
-rw-r--r--gdb/testsuite/gdb.mi/mi-pendshr.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-pendshr.c b/gdb/testsuite/gdb.mi/mi-pendshr.c
index 05c88af9df5..2dce1fe8ef7 100644
--- a/gdb/testsuite/gdb.mi/mi-pendshr.c
+++ b/gdb/testsuite/gdb.mi/mi-pendshr.c
@@ -15,20 +15,19 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <stdio.h>
-
-void pendfunc1 (int x)
+void
+pendfunc1 (int x)
{
int y = x + 4;
- printf ("in pendfunc1, x is %d\n", x);
}
-void pendfunc2 (int x)
+void
+pendfunc2 (int x)
{
- printf ("in pendfunc2, x is %d\n", x);
}
-void pendfunc (int x)
+void
+pendfunc (int x)
{
pendfunc1 (x);
pendfunc2 (x);