1 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
3 FIXME: This workaround should be dropped and
4 glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
7 2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
9 * gdb/amd64-linux-tdep.c (linux_clone_code): New variable.
10 (LINUX_CLONE_LEN): New definition.
11 (amd64_linux_clone_running, amd64_linux_outermost_frame): New function.
12 (amd64_linux_init_abi): Initialize `outermost_frame_p'.
13 * gdb/i386-tdep.c (i386_gdbarch_init): Likewise.
14 * gdb/i386-tdep.h (gdbarch_tdep): Add `outermost_frame_p' member.
15 * gdb/amd64-tdep.c (amd64_frame_this_id): Call `outermost_frame_p'.
17 2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
19 * gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
22 2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
26 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
27 +++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.c 2009-08-03 15:50:08.000000000 +0200
29 +/* This testcase is part of GDB, the GNU debugger.
31 + Copyright 2006 Free Software Foundation, Inc.
33 + This program is free software; you can redistribute it and/or modify
34 + it under the terms of the GNU General Public License as published by
35 + the Free Software Foundation; either version 2 of the License, or
36 + (at your option) any later version.
38 + This program is distributed in the hope that it will be useful,
39 + but WITHOUT ANY WARRANTY; without even the implied warranty of
40 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 + GNU General Public License for more details.
43 + You should have received a copy of the GNU General Public License
44 + along with this program; if not, write to the Free Software
45 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
46 + MA 02110-1301, USA. */
54 +void *threader (void *arg)
64 + pthread_create (&t1, NULL, threader, (void *) NULL);
68 Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp
69 ===================================================================
70 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
71 +++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2009-08-03 15:50:08.000000000 +0200
73 +# Copyright 2006 Free Software Foundation, Inc.
75 +# This program is free software; you can redistribute it and/or modify
76 +# it under the terms of the GNU General Public License as published by
77 +# the Free Software Foundation; either version 2 of the License, or
78 +# (at your option) any later version.
80 +# This program is distributed in the hope that it will be useful,
81 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
82 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83 +# GNU General Public License for more details.
85 +# You should have received a copy of the GNU General Public License
86 +# along with this program; if not, write to the Free Software
87 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
89 +# Backtraced `clone' must not have `PC == 0' as its previous frame.
91 +if $tracelevel then {
95 +set testfile bt-clone-stop
96 +set srcfile ${testfile}.c
97 +set binfile ${objdir}/${subdir}/${testfile}
98 +if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
99 + untested "Couldn't compile test program"
103 +# Get things started.
107 +gdb_reinitialize_dir $srcdir/$subdir
110 +# threader: threader.c:8: threader: Assertion `0' failed.
111 +# Program received signal SIGABRT, Aborted.
114 + "Program received signal SIGABRT.*" \
117 +# Former gdb unwind (the first function is `clone'):
118 +# #5 0x0000003421ecd62d in ?? () from /lib64/libc.so.6
119 +# #6 0x0000000000000000 in ?? ()
121 +# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
123 +# Two `-re' cases below must be in this order (1st is a subset of the 2nd one).
124 +# Unhandled case below should not happen and it is fortunately handled by
125 +# `amd64_linux_outermost_frame' as FAIL (and result `0x0 entry output invalid').
126 +gdb_test_multiple "bt" "0x0 entry output invalid" {
127 + -re "in threader \\(.*\n#\[0-9\]* *0x0* in .*$gdb_prompt $" {
128 + fail "0x0 entry found"
130 + -re "in threader \\(.*$gdb_prompt $" {
131 + pass "0x0 entry not found"