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