1 2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
3 * gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
6 --- /dev/null 1 Jan 1970 00:00:00 -0000
7 +++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000
9 +/* This testcase is part of GDB, the GNU debugger.
11 + Copyright 2007 Free Software Foundation, Inc.
13 + This program is free software; you can redistribute it and/or modify
14 + it under the terms of the GNU General Public License as published by
15 + the Free Software Foundation; either version 2 of the License, or
16 + (at your option) any later version.
18 + This program is distributed in the hope that it will be useful,
19 + but WITHOUT ANY WARRANTY; without even the implied warranty of
20 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 + GNU General Public License for more details.
23 + You should have received a copy of the GNU General Public License
24 + along with this program; if not, write to the Free Software
25 + Foundation, Inc., 59 Temple Place - Suite 330,
26 + Boston, MA 02111-1307, USA. */
47 + i = pthread_create (&t1, NULL, threader, (void *) NULL);
49 + i = pthread_join (t1, NULL);
52 + execl ("/bin/true", "/bin/true", NULL);
55 --- /dev/null 1 Jan 1970 00:00:00 -0000
56 +++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000
58 +# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
59 +# Copyright (C) 2007 Free Software Foundation, Inc.
61 +# This program is free software; you can redistribute it and/or modify
62 +# it under the terms of the GNU General Public License as published by
63 +# the Free Software Foundation; either version 2 of the License, or
64 +# (at your option) any later version.
66 +# This program is distributed in the hope that it will be useful,
67 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
68 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69 +# GNU General Public License for more details.
71 +# You should have received a copy of the GNU General Public License
72 +# along with this program; if not, write to the Free Software
73 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
75 +# Please email any bugs, comments, and/or additions to this file to:
76 +# bug-gdb@prep.ai.mit.edu
78 +set testfile threaded-exec
79 +set srcfile ${testfile}.c
80 +set binfile ${objdir}/${subdir}/${testfile}
82 +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
88 +gdb_reinitialize_dir $srcdir/$subdir
94 +gdb_test_multiple {} "Program exited" {
95 + -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
96 + pass "Program exited"