]> git.ipfire.org Git - ipfire-3.x.git/blob - gdb/patches/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
bb6f3f16c6ac1adc4a6f8d7bd33694bcc6ea5b3a
[ipfire-3.x.git] / gdb / patches / gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
1 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
2
3
4 --- /dev/null 2006-12-17 14:18:21.881669220 -0500
5 +++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp 2006-12-17 16:52:51.000000000 -0500
6 @@ -0,0 +1,54 @@
7 +# Copyright 2006 Free Software Foundation, Inc.
8 +
9 +# This program is free software; you can redistribute it and/or modify
10 +# it under the terms of the GNU General Public License as published by
11 +# the Free Software Foundation; either version 2 of the License, or
12 +# (at your option) any later version.
13 +#
14 +# This program is distributed in the hope that it will be useful,
15 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 +# GNU General Public License for more details.
18 +#
19 +# You should have received a copy of the GNU General Public License
20 +# along with this program; if not, write to the Free Software
21 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 +
23 +if $tracelevel then {
24 + strace $tracelevel
25 +}
26 +
27 +set testfile step-over-trampoline
28 +set srcfile ${testfile}.c
29 +set binfile ${objdir}/${subdir}/${testfile}
30 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
31 + untested "Couldn't compile test program"
32 + return -1
33 +}
34 +
35 +# Get things started.
36 +
37 +gdb_exit
38 +gdb_start
39 +gdb_reinitialize_dir $srcdir/$subdir
40 +gdb_load ${binfile}
41 +
42 +# For C programs, "start" should stop in main().
43 +
44 +gdb_test "start" \
45 + "main \\(\\) at .*$srcfile.*" \
46 + "start"
47 +
48 +# main () at hello2.c:5
49 +# 5 puts("hello world\n");
50 +# (gdb) next
51 +# 0x100007e0 in call___do_global_ctors_aux ()
52 +
53 +gdb_test_multiple "next" "invalid `next' output" {
54 + -re "\nhello world.*return 0;.*" {
55 + pass "stepped over"
56 + }
57 + -re " in call___do_global_ctors_aux \\(\\).*" {
58 + fail "stepped into trampoline"
59 + }
60 +}
61 --- /dev/null 2006-12-17 14:18:21.881669220 -0500
62 +++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c 2006-12-17 16:18:12.000000000 -0500
63 @@ -0,0 +1,28 @@
64 +/* This testcase is part of GDB, the GNU debugger.
65 +
66 + Copyright 2006 Free Software Foundation, Inc.
67 +
68 + This program is free software; you can redistribute it and/or modify
69 + it under the terms of the GNU General Public License as published by
70 + the Free Software Foundation; either version 2 of the License, or
71 + (at your option) any later version.
72 +
73 + This program is distributed in the hope that it will be useful,
74 + but WITHOUT ANY WARRANTY; without even the implied warranty of
75 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76 + GNU General Public License for more details.
77 +
78 + You should have received a copy of the GNU General Public License
79 + along with this program; if not, write to the Free Software
80 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
81 +
82 + Please email any bugs, comments, and/or additions to this file to:
83 + bug-gdb@prep.ai.mit.edu */
84 +
85 +#include <stdio.h>
86 +
87 +int main (void)
88 +{
89 + puts ("hello world");
90 + return 0;
91 +}