Blame SOURCES/gdb-6.5-section-num-fixup-test.patch

7a6771
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c
7a6771
===================================================================
7a6771
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
7a6771
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c	2016-02-15 23:27:19.654331680 +0100
7a6771
@@ -0,0 +1,22 @@
7a6771
+/* This testcase is part of GDB, the GNU debugger.
7a6771
+
7a6771
+   Copyright 2008 Free Software Foundation, Inc.
7a6771
+
7a6771
+   This program is free software; you can redistribute it and/or modify
7a6771
+   it under the terms of the GNU General Public License as published by
7a6771
+   the Free Software Foundation; either version 2 of the License, or
7a6771
+   (at your option) any later version.
7a6771
+
7a6771
+   This program is distributed in the hope that it will be useful,
7a6771
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
7a6771
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a6771
+   GNU General Public License for more details.
7a6771
+ 
7a6771
+   You should have received a copy of the GNU General Public License
7a6771
+   along with this program; if not, write to the Free Software
7a6771
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7a6771
+
7a6771
+   Please email any bugs, comments, and/or additions to this file to:
7a6771
+   bug-gdb@prep.ai.mit.edu  */
7a6771
+
7a6771
+int var;
7a6771
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c
7a6771
===================================================================
7a6771
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
7a6771
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c	2016-02-15 23:27:19.654331680 +0100
7a6771
@@ -0,0 +1,26 @@
7a6771
+/* This testcase is part of GDB, the GNU debugger.
7a6771
+
7a6771
+   Copyright 2008 Free Software Foundation, Inc.
7a6771
+
7a6771
+   This program is free software; you can redistribute it and/or modify
7a6771
+   it under the terms of the GNU General Public License as published by
7a6771
+   the Free Software Foundation; either version 2 of the License, or
7a6771
+   (at your option) any later version.
7a6771
+
7a6771
+   This program is distributed in the hope that it will be useful,
7a6771
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
7a6771
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a6771
+   GNU General Public License for more details.
7a6771
+ 
7a6771
+   You should have received a copy of the GNU General Public License
7a6771
+   along with this program; if not, write to the Free Software
7a6771
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7a6771
+
7a6771
+   Please email any bugs, comments, and/or additions to this file to:
7a6771
+   bug-gdb@prep.ai.mit.edu  */
7a6771
+
7a6771
+int
7a6771
+main (void)
7a6771
+{
7a6771
+  return 0;
7a6771
+}
7a6771
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp
7a6771
===================================================================
7a6771
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
7a6771
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp	2016-02-15 23:27:25.968376510 +0100
7a6771
@@ -0,0 +1,51 @@
7a6771
+# Copyright 2008 Free Software Foundation, Inc.
7a6771
+
7a6771
+# This program is free software; you can redistribute it and/or modify
7a6771
+# it under the terms of the GNU General Public License as published by
7a6771
+# the Free Software Foundation; either version 2 of the License, or
7a6771
+# (at your option) any later version.
7a6771
+# 
7a6771
+# This program is distributed in the hope that it will be useful,
7a6771
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
7a6771
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a6771
+# GNU General Public License for more details.
7a6771
+# 
7a6771
+# You should have received a copy of the GNU General Public License
7a6771
+# along with this program; if not, write to the Free Software
7a6771
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
7a6771
+
7a6771
+set testfile datalib
7a6771
+set srcfilemain ${testfile}-main.c
7a6771
+set srcfilelib ${testfile}-lib.c
7a6771
+set libfile [standard_output_file ${testfile}-lib.so]
7a6771
+set binfile [standard_output_file ${testfile}-main]
7a6771
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
7a6771
+    untested "Couldn't compile test program"
7a6771
+    return -1
7a6771
+}
7a6771
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfilemain}" "${binfile} ${libfile}" executable {debug}] != "" } {
7a6771
+    untested "Couldn't compile test program"
7a6771
+    return -1
7a6771
+}
7a6771
+
7a6771
+# Get things started.
7a6771
+
7a6771
+gdb_exit
7a6771
+gdb_start
7a6771
+gdb_reinitialize_dir $srcdir/$subdir
7a6771
+gdb_load ${binfile}
7a6771
+
7a6771
+# We must use a separate library as the main executable is compiled to the
7a6771
+# address 0 by default and it would get fixed up already at the end of
7a6771
+# INIT_OBJFILE_SECT_INDICES.  We also cannot PRELINK it as PRELINK is missing
7a6771
+# on ia64.  The library must be NOSTDLIB as otherwise some stub code would
7a6771
+# create the `.text' section there.  Also DEBUG option is useful as some of
7a6771
+# the crashes occur in dwarf2read.c.
7a6771
+
7a6771
+# FAIL case:
7a6771
+# ../../gdb/ia64-tdep.c:2838: internal-error: sect_index_text not initialized
7a6771
+# A problem internal to GDB has been detected,
7a6771
+
7a6771
+gdb_test "start" \
7a6771
+         "main \\(\\) at .*${srcfilemain}.*" \
7a6771
+         "start"