diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-01-28 11:14:37 -0800 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-01-28 11:14:37 -0800 |
commit | b95a31ed5d2b34f1a4072d701f5cd51075e61c01 (patch) | |
tree | fca4d7410b95d442204b8b2858fa4c992ffeaf6f /gdb/fbsd-nat.c | |
parent | 7384826ebff8a91a3f9b632e9e3982760fab966e (diff) | |
download | binutils-b95a31ed5d2b34f1a4072d701f5cd51075e61c01.zip binutils-b95a31ed5d2b34f1a4072d701f5cd51075e61c01.tar.gz binutils-b95a31ed5d2b34f1a4072d701f5cd51075e61c01.tar.bz2 |
fbsd-nat: Return a bool from fetch_register_set and store_register_set.
Change these helper functions to return true if they did any work.
Diffstat (limited to 'gdb/fbsd-nat.c')
-rw-r--r-- | gdb/fbsd-nat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index 9a94557..bf606ec 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -1611,7 +1611,7 @@ fbsd_nat_target::supports_disable_randomization () /* See fbsd-nat.h. */ -void +bool fbsd_nat_target::fetch_register_set (struct regcache *regcache, int regnum, int fetch_op, const struct regset *regset, void *regs, size_t size) @@ -1627,12 +1627,14 @@ fbsd_nat_target::fetch_register_set (struct regcache *regcache, int regnum, perror_with_name (_("Couldn't get registers")); regcache->supply_regset (regset, regnum, regs, size); + return true; } + return false; } /* See fbsd-nat.h. */ -void +bool fbsd_nat_target::store_register_set (struct regcache *regcache, int regnum, int fetch_op, int store_op, const struct regset *regset, void *regs, @@ -1652,7 +1654,9 @@ fbsd_nat_target::store_register_set (struct regcache *regcache, int regnum, if (ptrace (store_op, pid, (PTRACE_TYPE_ARG3) regs, 0) == -1) perror_with_name (_("Couldn't write registers")); + return true; } + return false; } void _initialize_fbsd_nat (); |