diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-12-12 14:14:21 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-12-12 14:15:07 +0100 |
commit | feea5f36a9dd65a0ff279c71744423c419b77ada (patch) | |
tree | 09cacd52a7405844e3351be75901af05aad1a5fc /gdb/gdbserver/linux-low.c | |
parent | 098dbe61246fd65ea5e3825d77afb31d52c43153 (diff) | |
download | gdb-feea5f36a9dd65a0ff279c71744423c419b77ada.zip gdb-feea5f36a9dd65a0ff279c71744423c419b77ada.tar.gz gdb-feea5f36a9dd65a0ff279c71744423c419b77ada.tar.bz2 |
gdbserver: Support read-only regsets in linux-low.c
For GNU/Linux targets using the regsets interface, this change
supports regsets that can be read but not written. The S390 "last
break" regset is an example. So far it had been defined with
regset->set_request == PTRACE_GETREGSET, such that the respective
ptrace call does not cause any harm. Now we just skip the whole
read/modify/write sequence for regsets that do not define a
fill_function.
gdb/gdbserver/ChangeLog:
* linux-low.c (regsets_store_inferior_registers): Skip regsets
without a fill_function.
* linux-s390-low.c (s390_fill_last_break): Remove.
(s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
(s390_arch_setup): Use regset's size instead of fill_function for
loop end condition.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index c1b53ff..5f62010 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -4293,7 +4293,8 @@ regsets_store_inferior_registers (struct regsets_info *regsets_info, void *buf, *data; int nt_type, res; - if (regset->size == 0 || regset_disabled (regsets_info, regset)) + if (regset->size == 0 || regset_disabled (regsets_info, regset) + || regset->fill_function == NULL) continue; buf = xmalloc (regset->size); |