]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - gdb/patches/gdb-6.5-section-num-fixup-test.patch
gdb: Update to 7.3.50.20110722.
[people/amarx/ipfire-3.x.git] / gdb / patches / gdb-6.5-section-num-fixup-test.patch
1 diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c
2 --- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c 1969-12-31 19:00:00.000000000 -0500
3 +++ gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c 2008-05-29 13:51:50.000000000 -0400
4 @@ -0,0 +1,22 @@
5 +/* This testcase is part of GDB, the GNU debugger.
6 +
7 + Copyright 2008 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 + Please email any bugs, comments, and/or additions to this file to:
24 + bug-gdb@prep.ai.mit.edu */
25 +
26 +int var;
27 diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c
28 --- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c 1969-12-31 19:00:00.000000000 -0500
29 +++ gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c 2008-05-29 13:51:39.000000000 -0400
30 @@ -0,0 +1,26 @@
31 +/* This testcase is part of GDB, the GNU debugger.
32 +
33 + Copyright 2008 Free Software Foundation, Inc.
34 +
35 + This program is free software; you can redistribute it and/or modify
36 + it under the terms of the GNU General Public License as published by
37 + the Free Software Foundation; either version 2 of the License, or
38 + (at your option) any later version.
39 +
40 + This program is distributed in the hope that it will be useful,
41 + but WITHOUT ANY WARRANTY; without even the implied warranty of
42 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 + GNU General Public License for more details.
44 +
45 + You should have received a copy of the GNU General Public License
46 + along with this program; if not, write to the Free Software
47 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
48 +
49 + Please email any bugs, comments, and/or additions to this file to:
50 + bug-gdb@prep.ai.mit.edu */
51 +
52 +int
53 +main (void)
54 +{
55 + return 0;
56 +}
57 diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/testsuite/gdb.base/datalib.exp
58 --- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp 1969-12-31 19:00:00.000000000 -0500
59 +++ gdb-6.5/gdb/testsuite/gdb.base/datalib.exp 2008-05-29 14:58:33.000000000 -0400
60 @@ -0,0 +1,51 @@
61 +# Copyright 2008 Free Software Foundation, Inc.
62 +
63 +# This program is free software; you can redistribute it and/or modify
64 +# it under the terms of the GNU General Public License as published by
65 +# the Free Software Foundation; either version 2 of the License, or
66 +# (at your option) any later version.
67 +#
68 +# This program is distributed in the hope that it will be useful,
69 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
70 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71 +# GNU General Public License for more details.
72 +#
73 +# You should have received a copy of the GNU General Public License
74 +# along with this program; if not, write to the Free Software
75 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
76 +
77 +set testfile datalib
78 +set srcfilemain ${testfile}-main.c
79 +set srcfilelib ${testfile}-lib.c
80 +set libfile ${objdir}/${subdir}/${testfile}-lib.so
81 +set binfile ${objdir}/${subdir}/${testfile}-main
82 +if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
83 + untested "Couldn't compile test program"
84 + return -1
85 +}
86 +if { [gdb_compile "${srcdir}/${subdir}/${srcfilemain}" "${binfile} ${libfile}" executable {debug}] != "" } {
87 + untested "Couldn't compile test program"
88 + return -1
89 +}
90 +
91 +# Get things started.
92 +
93 +gdb_exit
94 +gdb_start
95 +gdb_reinitialize_dir $srcdir/$subdir
96 +gdb_load ${binfile}
97 +
98 +# We must use a separate library as the main executable is compiled to the
99 +# address 0 by default and it would get fixed up already at the end of
100 +# INIT_OBJFILE_SECT_INDICES. We also cannot PRELINK it as PRELINK is missing
101 +# on ia64. The library must be NOSTDLIB as otherwise some stub code would
102 +# create the `.text' section there. Also DEBUG option is useful as some of
103 +# the crashes occur in dwarf2read.c.
104 +
105 +# FAIL case:
106 +# ../../gdb/ia64-tdep.c:2838: internal-error: sect_index_text not initialized
107 +# A problem internal to GDB has been detected,
108 +
109 +gdb_test "start" \
110 + "main \\(\\) at .*${srcfilemain}.*" \
111 + "start"