Blame SOURCES/gdb-6.8-bz457187-largefile-test.patch

01917d
--- /dev/null	2009-04-19 14:49:00.974648389 +0200
01917d
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.exp	2009-04-19 16:30:12.000000000 +0200
01917d
@@ -0,0 +1,61 @@
01917d
+# This testcase is part of GDB, the GNU debugger.
01917d
+
01917d
+# Copyright 2009 Free Software Foundation, Inc.
01917d
+
01917d
+# This program is free software; you can redistribute it and/or modify
01917d
+# it under the terms of the GNU General Public License as published by
01917d
+# the Free Software Foundation; either version 2 of the License, or
01917d
+# (at your option) any later version.
01917d
+#
01917d
+# This program is distributed in the hope that it will be useful,
01917d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
01917d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
01917d
+# GNU General Public License for more details.
01917d
+#
01917d
+# You should have received a copy of the GNU General Public License
01917d
+# along with this program; if not, write to the Free Software
01917d
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
01917d
+
01917d
+# Test ability to load an elf64-i386 core file.  The provided core file was
01917d
+# elf64-x8664 one but it got binary patched to i386:
01917d
+# Elf32_Ehdr.e_machine @0x12..0x13
01917d
+# Elf64_Ehdr.e_machine @0x12..0x13
01917d
+# #define EM_386           3              /* Intel 80386 */
01917d
+# #define EM_X86_64       62              /* AMD x86-64 architecture */
01917d
+# patch @0x12: 0x3E -> 0x03
01917d
+
01917d
+if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
01917d
+    verbose "Skipping i386-biarch-core test."
01917d
+    return
01917d
+}
01917d
+
01917d
+set testfile "i386-biarch-core"
01917d
+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu
01917d
+set corefile ${objdir}/${subdir}/${testfile}.core
01917d
+# Entry point of the original executable.
01917d
+set address 0x400078
01917d
+
01917d
+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} {
01917d
+    untested "failed uudecode or bzip2"
01917d
+    return -1
01917d
+}
01917d
+file stat ${corefile} corestat
01917d
+if {$corestat(size) != 102400} {
01917d
+    untested "uudecode or bzip2 produce invalid result"
01917d
+    return -1
01917d
+}
01917d
+
01917d
+gdb_exit
01917d
+gdb_start
01917d
+gdb_reinitialize_dir $srcdir/$subdir
01917d
+
01917d
+# Wrongly built GDB complains by:
01917d
+# "..." is not a core dump: File format not recognized
01917d
+# As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it.
01917d
+# This is just a problem of the test care, real-world elf64-i386 file will have
01917d
+# 32bit PRSTATUS.  One cannot prepare elf64-i386 core file from elf32-i386 by
01917d
+# objcopy as it corrupts the core file beyond all recognition.
01917d
+# "\r\nCore was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal 11, Segmentation fault\\.\r\n.*"
01917d
+gdb_test "core-file ${corefile}"
01917d
+
01917d
+gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable"
01917d
--- /dev/null	2009-04-19 14:49:00.974648389 +0200
01917d
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.S	2009-04-19 14:52:28.000000000 +0200
01917d
@@ -0,0 +1,22 @@
01917d
+/* This testcase is part of GDB, the GNU debugger.
01917d
+
01917d
+   Copyright 2009 Free Software Foundation, Inc.
01917d
+  
01917d
+   This program is free software; you can redistribute it and/or modify
01917d
+   it under the terms of the GNU General Public License as published by
01917d
+   the Free Software Foundation; either version 2 of the License, or
01917d
+   (at your option) any later version.
01917d
+  
01917d
+   This program is distributed in the hope that it will be useful,
01917d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
01917d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
01917d
+   GNU General Public License for more details.
01917d
+  
01917d
+   You should have received a copy of the GNU General Public License
01917d
+   along with this program; if not, write to the Free Software
01917d
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
01917d
+ */
01917d
+
01917d
+	.globl _start
01917d
+_start:
01917d
+	hlt
01917d
--- /dev/null	2009-04-19 14:49:00.974648389 +0200
01917d
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.core.bz2.uu	2009-04-19 15:02:12.000000000 +0200
01917d
@@ -0,0 +1,13 @@
01917d
+begin 600 i386-biarch-core.core.bz2
01917d
+M0EIH.3%!629361`P1\P`!)?_____\9'@"8Q)6P380'9@'&#`0D@``"``%(``
01917d
+M@`#`"!<(L`%F"(:$GH13::F-)M&D&U,AD:`--#)M0&FT0XR9--,)D9`P(Q-&
01917d
+M",(-&F``02)%38HT]0T`&AH```'H@``T^>9T*(,("&)SE`>`9@+GP=[,N)KB
01917d
+M'I8BL(L]N5TCY\%V]/?DB.BN*UZ'U@]TN7-]UJ5\_%0QTT<*086#%MHT7XVJ
01917d
+M9D"+C!"2*L:8D1XPD!`--M@*XT1H5RFYN&)(!0P0#:`I:;2;$5M&\*9"0@%:
01917d
+MK@X[T()M)9N7`D$VA!^63)%,;@8LT`(7\K&[7G;U:"B6'!GG+46ALOZF.2F-
01917d
+M!@>C*%86X$-]C2`KE;HG)UL(913VR2G]0BD:J=Z_`G@S,`W%.8RMS-#5P:J0
01917d
+MAJ2\8&X?@DE;UF68QHM<,D`('::J65/S:PAG*R-09["8DBI)'V]Y.[(/AM*L
01917d
+M"X_O^V;%FY.S6Q]FM=D37>5F,%4-F1ZF#,CFJVU;H*^IT<(%
01917d
+/G`68?\7
01917d
+`
01917d
+end