diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:22 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:22 +0200 |
commit | a5863204fb1b9c03627edc3bb447c5958ef96458 (patch) | |
tree | c80edf717564f8ac3da1e8202d0e56f06271265f /gdbserver/linux-low.h | |
parent | 4b27d27c07a9514d5f6d0876f659a32378fb4801 (diff) | |
download | fsf-binutils-gdb-a5863204fb1b9c03627edc3bb447c5958ef96458.zip fsf-binutils-gdb-a5863204fb1b9c03627edc3bb447c5958ef96458.tar.gz fsf-binutils-gdb-a5863204fb1b9c03627edc3bb447c5958ef96458.tar.bz2 |
gdbserver: make linux target op 'cannot_store_register' a predicate function
The comment for the linux target op 'cannot_store_register' states the
following:
/* Returns 0 if we can store the register, 1 if we can not
store the register, and 2 if failure to store the register
is acceptable. */
There is only one low target, linux-ppc-low, that potentially returns
2. There are two places that call the 'cannot_store_register' target
op in linux-low.cc. None of these locations distinguish a '2' from a
'1'. Hence, to simplify the definition, make the function a predicate
that returns either 0 or 1. This is also consistent with the
companion function, 'cannot_fetch_register'.
gdbserver/ChangeLog:
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* linux-low.h (struct linux_target_ops): Update the comment for
'cannot_store_register' to return 0 or 1.
* linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
of 2.
Diffstat (limited to 'gdbserver/linux-low.h')
-rw-r--r-- | gdbserver/linux-low.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index b69ade9..aaf882b 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -135,11 +135,10 @@ struct linux_target_ops void (*arch_setup) (void); const struct regs_info *(*regs_info) (void); - int (*cannot_fetch_register) (int); - /* Returns 0 if we can store the register, 1 if we can not - store the register, and 2 if failure to store the register - is acceptable. */ + /* Return 0 if we can fetch/store the register, 1 if we cannot + fetch/store the register. */ + int (*cannot_fetch_register) (int); int (*cannot_store_register) (int); /* Hook to fetch a register in some non-standard way. Used for |