This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] S390: Enable re-attaching with native-extended-gdbserver
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 21 Mar 2018 12:59:27 -0400
- Subject: [binutils-gdb] S390: Enable re-attaching with native-extended-gdbserver
*** TEST RESULTS FOR COMMIT 7edb9bd32ba23247a509cbe9d44ccb02da97b66e ***
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 7edb9bd32ba23247a509cbe9d44ccb02da97b66e
S390: Enable re-attaching with native-extended-gdbserver
On s390x, when running attach.exp with native-extended-gdbserver,
gdbserver crashes in find_regno like this:
.../regcache.c:252: A problem internal to GDBserver has been detected.
Unknown register tdb0 requested
On the GDB side it looks like this:
(gdb) attach 31568
Attaching to process 31568
Remote connection closed
The test case attempts to attach to a new process via the already running
gdbserver. Thus s390_arch_setup is called a second time, and that's where
the problem occurs. In order to determine the word width (32 or 64 bits),
s390_arch_setup reads the pswm register through the regcache. For that it
uses a temporary tdesc which is supposed to work for all s390 targets,
since the actual tdesc has not been determined yet. But in this second
round this doesn't work, because s390_regsets has been updated already and
now contains regsets not described by the temporary tdesc, such as the one
containing tdb0.
This is fixed by rearranging the logic in s390_arch_setup.
gdb/gdbserver/ChangeLog:
* linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
the word size. Add comment.
(s390_get_wordsize): New function.
(s390_arch_setup): No longer select a temporary tdesc to fetch the
pswm with it. Instead, use s390_get_wordsize to determine the
word size first and derive the correct tdesc from that directly.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-i686, branch master
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE ***
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master