diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2018-03-21 17:41:44 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2018-03-21 17:41:44 +0100 |
commit | 7edb9bd32ba23247a509cbe9d44ccb02da97b66e (patch) | |
tree | e30515417f5f3da3e43b4a580e87e5d3b996daee /gdb/sentinel-frame.c | |
parent | 0ccf57bd817a73e7d7cef714039f1302fa5298ec (diff) | |
download | gdb-7edb9bd32ba23247a509cbe9d44ccb02da97b66e.zip gdb-7edb9bd32ba23247a509cbe9d44ccb02da97b66e.tar.gz gdb-7edb9bd32ba23247a509cbe9d44ccb02da97b66e.tar.bz2 |
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.
Diffstat (limited to 'gdb/sentinel-frame.c')
0 files changed, 0 insertions, 0 deletions