]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-6.5-bz216711-clone-is-outermost.patch
- fixed aclocal rebuilds (no more unexpanded ACX_* macros in final configure scripts)
[packages/gdb.git] / gdb-6.5-bz216711-clone-is-outermost.patch
1 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
2
3 FIXME: This workaround should be dropped and
4 glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
5 instead.
6
7 2006-12-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
8
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'.
16
17 2006-12-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
18
19         * gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
20         New file.
21
22 2007-10-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
23
24         Port to GDB-6.7.
25
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
28 @@ -0,0 +1,39 @@
29 +/* This testcase is part of GDB, the GNU debugger.
30 +
31 +   Copyright 2006 Free Software Foundation, Inc.
32 +
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.
37 +
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.
42
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.  */
47 +
48 +
49 +#include <pthread.h>
50 +#include <unistd.h>
51 +#include <assert.h>
52 +
53 +
54 +void *threader (void *arg)
55 +{
56 +       assert (0);
57 +       return NULL;
58 +}
59 +
60 +int main (void)
61 +{
62 +       pthread_t t1;
63 +
64 +       pthread_create (&t1, NULL, threader, (void *) NULL);
65 +       for (;;)
66 +               pause();
67 +}
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
72 @@ -0,0 +1,61 @@
73 +# Copyright 2006 Free Software Foundation, Inc.
74 +
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.
79 +# 
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.
84 +# 
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.  
88 +
89 +# Backtraced `clone' must not have `PC == 0' as its previous frame.
90 +
91 +if $tracelevel then {
92 +    strace $tracelevel
93 +}
94 +
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"
100 +    return -1
101 +}
102 +
103 +# Get things started.
104 +
105 +gdb_exit
106 +gdb_start
107 +gdb_reinitialize_dir $srcdir/$subdir
108 +gdb_load ${binfile}
109 +
110 +# threader: threader.c:8: threader: Assertion `0' failed.
111 +# Program received signal SIGABRT, Aborted.
112 +
113 +gdb_test "run" \
114 +     "Program received signal SIGABRT.*" \
115 +     "run"
116 +
117 +# Former gdb unwind (the first function is `clone'):
118 +# #5  0x0000003421ecd62d in ?? () from /lib64/libc.so.6
119 +# #6  0x0000000000000000 in ?? ()
120 +# (gdb)
121 +# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
122 +# 
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"
129 +    }
130 +    -re "in threader \\(.*$gdb_prompt $" {
131 +       pass "0x0 entry not found"
132 +    }
133 +}
This page took 0.066126 seconds and 3 git commands to generate.