From 9b1a6425a19d68a9d670bac2a4cc63b6ff9659f5 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 14 May 2014 21:21:44 +0200 Subject: [PATCH] [s390*] Import upstream fix for 64->32 debugging. --- gdb-upstream.patch | 38 ++++++++++++++++++++++++++++++++++++++ gdb.spec | 5 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 0936e1c..6d82704 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -64,3 +64,41 @@ index b5a7e1e..462df1f 100644 --u3/rZRmxL6MmkK24-- + + +commit 20dca09662aa0d2706fbe325b8f448ef74773028 +Author: Andreas Arnez +Date: Tue May 13 14:55:53 2014 +0200 + + PR target/16940 S390: Fix erroneous offset in fill_gregset. + + This fixes a bug that leads to various failures when debugging a + 31-bit inferior with a 64-bit gdb on s390x. + + Conflicts: + + gdb/ChangeLog + +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,9 @@ ++2014-05-13 Andreas Arnez ++ ++ PR target/16940 ++ * s390-linux-nat.c (fill_gregset): Remove erroneous offset 4 in ++ call to regcache_raw_collect. ++ + 2014-05-05 Joel Brobecker + + * version.in: Set GDB version number to 7.7.1.DATE-cvs. +--- a/gdb/s390-linux-nat.c ++++ b/gdb/s390-linux-nat.c +@@ -164,7 +164,7 @@ fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno) + memset (p, 0, 4); + p += 4; + } +- regcache_raw_collect (regcache, reg, p + 4); ++ regcache_raw_collect (regcache, reg, p); + } + } + diff --git a/gdb.spec b/gdb.spec index e5e0cee..f6c4edf 100644 --- a/gdb.spec +++ b/gdb.spec @@ -39,7 +39,7 @@ Version: 7.7.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -1404,6 +1404,9 @@ fi %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %changelog +* Wed May 14 2014 Jan Kratochvil - 7.7.1-13.fc21 +- [s390*] Import upstream fix for 64->32 debugging. + * Mon May 12 2014 Jan Kratochvil - 7.7.1-12.fc21 - [s390*] Fix compilation error.