gdb/gdb-6.3-bz202689-exec-from-pthread-test.patch
Michael Matz b288fe5a9a - Rebase to gdb version 7.11 as of version in Fedora 24:
* Per-inferior thread numbers. 
  * Breakpoint "explicit locations" (via CLI and GDB/MI). 
  * New convenience variables ($_gthread, $_inferior). 
  * Record btrace now supports non-stop mode. 
  * Various improvements on AArch64 GNU/Linux: 
    - Multi-architecture debugging support. 
    - displaced stepping. 
    - tracepoint support added in GDBserver. 
  * In Ada, the overloads selection menu provides the parameter
    types and return types for the matching overloaded subprograms. 
  * Various remote protocol improvements, including several
    new packets which can be used to support features such as
    follow-exec-mode, exec catchpoints, syscall catchpoints, etc. 
  * Some minor improvements in the Python API for extending GDB. 
- Added new patches from Fedora:
    gdb-fedora-libncursesw.patch
    gdb-fortran-stride-intel-1of6.patch
    gdb-fortran-stride-intel-2of6.patch
    gdb-fortran-stride-intel-3of6.patch
    gdb-fortran-stride-intel-4of6.patch
    gdb-fortran-stride-intel-5of6.patch
    gdb-fortran-stride-intel-6of6-nokfail.patch
    gdb-fortran-stride-intel-6of6.patch
    gdb-opcodes-clflushopt-test.patch
    gdb-testsuite-readline63-sigint.patch
- Removed obsolete patches:
    gdb-6.3-bz231832-obstack-2gb.patch
    gdb-pahole-python2.patch
    gdb-probes-based-interface-robust-1of2.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=132
2016-02-29 19:38:18 +00:00

103 lines
3.3 KiB
Diff

2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:06.936904418 +0100
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <pthread.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+static void *
+threader (void *arg)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+
+ execl ("/bin/true", "/bin/true", NULL);
+ abort ();
+}
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:19.965992585 +0100
@@ -0,0 +1,41 @@
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+set testfile threaded-exec
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test_multiple {} "Program exited" {
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
+ pass "Program exited"
+ }
+}