From 846b074b7ba8ca99922a701e1b481d0c5ff9ed811c0b0e66b77b56c335eb627e Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 14 May 2014 07:49:42 +0000 Subject: [PATCH] - Fix debugging of threaded 31bit inferiors on s390x (gdb-7.7-bnc877566.patch). [bnc#877566] OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=96 --- gdb-7.7-bnc877566.patch | 26 ++++++++++++++++++++++++++ gdb.changes | 6 ++++++ gdb.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 gdb-7.7-bnc877566.patch diff --git a/gdb-7.7-bnc877566.patch b/gdb-7.7-bnc877566.patch new file mode 100644 index 0000000..5f19cfb --- /dev/null +++ b/gdb-7.7-bnc877566.patch @@ -0,0 +1,26 @@ +This fixes a bug that leads to various failures when debugging a +31-bit inferior with a 64-bit gdb on s390x. + +gdb/ + * s390-linux-nat.c (fill_gregset): Remove erroneous offset 4 in + call to regcache_raw_collect. +--- + gdb/s390-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c +index 5c38952..45db7c9 100644 +--- 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); + } + } + +-- +1.8.4.2 + diff --git a/gdb.changes b/gdb.changes index 53fce78..9e997a3 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 14 07:43:54 UTC 2014 - rguenther@suse.com + +- Fix debugging of threaded 31bit inferiors on s390x + (gdb-7.7-bnc877566.patch). [bnc#877566] + ------------------------------------------------------------------- Wed Feb 12 16:24:38 UTC 2014 - matz@suse.de diff --git a/gdb.spec b/gdb.spec index c77f715..931e9a7 100644 --- a/gdb.spec +++ b/gdb.spec @@ -196,6 +196,7 @@ Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch Patch1004: gdb-ia64-tdep.patch Patch1006: gdb-ppc64le.patch Patch1007: gdb-fix-s390-build.patch +Patch1008: gdb-7.7-bnc877566.patch BuildRequires: bison BuildRequires: flex @@ -443,6 +444,7 @@ find -name "*.info*"|xargs rm -f %patch1004 -p1 %patch1006 -p1 %patch1007 -p1 +%patch1008 -p1 find -name "*.orig" | xargs rm -f ! find -name "*.rej" # Should not happen.