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

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