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

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