diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index ee35a62..353356e 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -523,3 +523,7 @@ Patch125: gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch # Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare. Patch126: gdb-ppc64-stwux-tautological-compare.patch +# [s390x] Backport arch12 instructions decoding (RH BZ 1553104). +# =fedoratest +Patch127: gdb-rhbz1553104-s390x-arch12-test.patch + diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index 1bc02ff..28c6d1f 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -124,3 +124,4 @@ %patch124 -p1 %patch125 -p1 %patch126 -p1 +%patch127 -p1 diff --git a/_patch_order b/_patch_order index f3a5edf..91c68da 100644 --- a/_patch_order +++ b/_patch_order @@ -124,3 +124,4 @@ gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch gdb-ppc64-stwux-tautological-compare.patch +gdb-rhbz1553104-s390x-arch12-test.patch diff --git a/gdb-rhbz1553104-s390x-arch12-test.patch b/gdb-rhbz1553104-s390x-arch12-test.patch new file mode 100644 index 0000000..3266ba8 --- /dev/null +++ b/gdb-rhbz1553104-s390x-arch12-test.patch @@ -0,0 +1,97 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Fri, 23 Mar 2018 20:42:44 +0100 +Subject: gdb-rhbz1553104-s390x-arch12-test.patch + +FileName: gdb-rhbz1553104-s390x-arch12-test.patch + +;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104). +;; =fedoratest +--- + gdb/testsuite/gdb.arch/s390x-arch12.S | 4 ++++ + gdb/testsuite/gdb.arch/s390x-arch12.exp | 34 ++++++++++++++++++++++++++++++++ + gdb/testsuite/gdb.arch/s390x-arch12.o.uu | 20 +++++++++++++++++++ + 3 files changed, 58 insertions(+) + create mode 100644 gdb/testsuite/gdb.arch/s390x-arch12.S + create mode 100644 gdb/testsuite/gdb.arch/s390x-arch12.exp + create mode 100644 gdb/testsuite/gdb.arch/s390x-arch12.o.uu + +diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S +new file mode 100644 +index 0000000000..cc1506eebf +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/s390x-arch12.S +@@ -0,0 +1,4 @@ ++.text ++.globl load_guarded ++load_guarded: ++.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 +diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp +new file mode 100644 +index 0000000000..4e902ff960 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp +@@ -0,0 +1,34 @@ ++# Copyright 2018 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } { ++# verbose "Skipping s390x-prologue-skip.exp" ++# return ++#} ++ ++set testfile "s390x-arch12" ++set uufile "${srcdir}/${subdir}/${testfile}.o.uu" ++set ofile "${srcdir}/${subdir}/${testfile}.o" ++ ++if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } { ++ untested "failed uudecode" ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_load $ofile ++ ++gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*" +diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu +new file mode 100644 +index 0000000000..2cee883b0f +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu +@@ -0,0 +1,20 @@ ++begin 644 s390x-arch12.o ++M?T5,1@("`0`````````````!`!8````!```````````````````````````` ++M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@ ++M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A ++M8@`N - 8.1-12.fc28 +- Add test: [s390x] Backport arch12 instructions decoding (RH BZ 1553104). + * Sat Mar 3 2018 Jan Kratochvil - 8.1-11.fc28 - Add: BuildRequires: gcc-c++ https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires