keiths / rpms / gdb

Forked from rpms/gdb 20 days ago
Clone
Jan Kratochvil 35cdcb6
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
Jan Kratochvil 35cdcb6
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Jan Kratochvil 35cdcb6
Date: Fri, 23 Mar 2018 20:42:44 +0100
Jan Kratochvil 35cdcb6
Subject: gdb-rhbz1553104-s390x-arch12-test.patch
Jan Kratochvil 35cdcb6
Jan Kratochvil 35cdcb6
;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
Jan Kratochvil 35cdcb6
;; =fedoratest
Jan Kratochvil 35cdcb6
Jan Kratochvil 35cdcb6
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S
Jan Kratochvil 35cdcb6
new file mode 100644
Jan Kratochvil 35cdcb6
--- /dev/null
Jan Kratochvil 35cdcb6
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.S
Jan Kratochvil 35cdcb6
@@ -0,0 +1,4 @@
Jan Kratochvil 35cdcb6
+.text
Jan Kratochvil 35cdcb6
+.globl load_guarded
Jan Kratochvil 35cdcb6
+load_guarded:
Jan Kratochvil 35cdcb6
+.byte 0xeb,0xbf,0xf0,0x58,0x00,0x24,0xe3,0xf0,0xff,0x50,0xff,0x71,0xb9,0x04,0x00,0xbf,0xe3,0x20,0xb0,0xa0,0x00,0x24,0xe3,0x10,0xb0,0xa0,0x00,0x04,0xe3,0x10,0x10,0x00,0x00,0x4c,0xe3,0x10,0xb0,0xa8,0x00,0x24,0xe3,0x10,0xb0,0xa8,0x00,0x04,0xb9,0x04,0x00,0x21,0xe3,0x40,0xb1,0x20,0x00,0x04,0xeb,0xbf,0xb1,0x08,0x00,0x04,0x07,0xf4
Jan Kratochvil 35cdcb6
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp
Jan Kratochvil 35cdcb6
new file mode 100644
Jan Kratochvil 35cdcb6
--- /dev/null
Jan Kratochvil 35cdcb6
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp
Jan Kratochvil 35cdcb6
@@ -0,0 +1,34 @@
Jan Kratochvil 35cdcb6
+# Copyright 2018 Free Software Foundation, Inc.
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+# This program is free software; you can redistribute it and/or modify
Jan Kratochvil 35cdcb6
+# it under the terms of the GNU General Public License as published by
Jan Kratochvil 35cdcb6
+# the Free Software Foundation; either version 3 of the License, or
Jan Kratochvil 35cdcb6
+# (at your option) any later version.
Jan Kratochvil 35cdcb6
+#
Jan Kratochvil 35cdcb6
+# This program is distributed in the hope that it will be useful,
Jan Kratochvil 35cdcb6
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
Jan Kratochvil 35cdcb6
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Jan Kratochvil 35cdcb6
+# GNU General Public License for more details.
Jan Kratochvil 35cdcb6
+#
Jan Kratochvil 35cdcb6
+# You should have received a copy of the GNU General Public License
Jan Kratochvil 35cdcb6
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } {
Jan Kratochvil 35cdcb6
+#    verbose "Skipping s390x-prologue-skip.exp"
Jan Kratochvil 35cdcb6
+#    return
Jan Kratochvil 35cdcb6
+#}
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+set testfile "s390x-arch12"
Jan Kratochvil 35cdcb6
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
Jan Kratochvil 35cdcb6
+set ofile "${srcdir}/${subdir}/${testfile}.o"
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
Jan Kratochvil 35cdcb6
+    untested "failed uudecode"
Jan Kratochvil 35cdcb6
+    return -1
Jan Kratochvil 35cdcb6
+}
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+gdb_exit
Jan Kratochvil 35cdcb6
+gdb_start
Jan Kratochvil 35cdcb6
+gdb_load $ofile
Jan Kratochvil 35cdcb6
+
Jan Kratochvil 35cdcb6
+gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*"
Jan Kratochvil 35cdcb6
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
Jan Kratochvil 35cdcb6
new file mode 100644
Jan Kratochvil 35cdcb6
--- /dev/null
Jan Kratochvil 35cdcb6
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
Jan Kratochvil 35cdcb6
@@ -0,0 +1,20 @@
Jan Kratochvil 35cdcb6
+begin 644 s390x-arch12.o
Jan Kratochvil 35cdcb6
+M?T5,1@("`0`````````````!`!8````!````````````````````````````
Jan Kratochvil 35cdcb6
+M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@
Jan Kratochvil 35cdcb6
+M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A
Jan Kratochvil 35cdcb6
+M8@`N
Jan Kratochvil 35cdcb6
+M`````````````````````````````````P```0``````````````````````
Jan Kratochvil 35cdcb6
+M`````P```@```````````````````````````P```P``````````````````
Jan Kratochvil 35cdcb6
+M```````!$````0``````````````````````;&]A9%]G=6%R9&5D````````
Jan Kratochvil 35cdcb6
+M````````````````````````````````````````````````````````````
Jan Kratochvil 35cdcb6
+M`````````````````````````!L````!``````````8`````````````````
Jan Kratochvil 35cdcb6
+M``!``````````$`````````````````````$```````````````A`````0``
Jan Kratochvil 35cdcb6
+M```````#````````````````````@```````````````````````````````
Jan Kratochvil 35cdcb6
+M!```````````````)P````@``````````P```````````````````(``````
Jan Kratochvil 35cdcb6
+M``````````````````````````0``````````````!$````#````````````
Jan Kratochvil 35cdcb6
+M``````````````````"``````````"P````````````````````!````````
Jan Kratochvil 35cdcb6
+M```````!`````@``````````````````````````````L`````````!X````
Jan Kratochvil 35cdcb6
+M!@````0`````````"``````````8````"0````,`````````````````````
Jan Kratochvil 35cdcb6
+H`````````2@`````````#@````````````````````$`````````````
Jan Kratochvil 35cdcb6
+`
Jan Kratochvil 35cdcb6
+end