public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] gdbserver: make linux target op 'cannot_store_register' a predicate function Date: Fri, 17 Apr 2020 00:35:11 -0400 [thread overview] Message-ID: <a5863204fb1b9c03627edc3bb447c5958ef96458@gdb-build> (raw) *** TEST RESULTS FOR COMMIT a5863204fb1b9c03627edc3bb447c5958ef96458 *** commit a5863204fb1b9c03627edc3bb447c5958ef96458 Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> AuthorDate: Thu Apr 2 15:11:22 2020 +0200 Commit: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> CommitDate: Thu Apr 2 15:11:22 2020 +0200 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. diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 37e38611d5..b523f982cb 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +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. + 2020-03-20 Simon Marchi <simon.marchi@efficios.com> * config.in: Re-generate. diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index b69ade98e4..aaf882b8c5 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 diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc index fd6d0369c4..f3837e4796 100644 --- a/gdbserver/linux-ppc-low.cc +++ b/gdbserver/linux-ppc-low.cc @@ -152,13 +152,13 @@ ppc_cannot_store_register (int regno) /* Some kernels do not allow us to store fpscr. */ if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE) && regno == find_regno (tdesc, "fpscr")) - return 2; + return 1; #endif /* Some kernels do not allow us to store orig_r3 or trap. */ if (regno == find_regno (tdesc, "orig_r3") || regno == find_regno (tdesc, "trap")) - return 2; + return 1; return 0; }
next reply other threads:[~2020-04-17 4:35 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-17 4:35 gdb-buildbot [this message] 2020-04-17 4:35 ` Failures on Fedora-i686, branch master gdb-buildbot 2020-04-17 4:40 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2020-04-17 5:16 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2020-04-17 5:22 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-04-17 6:12 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-04-17 6:22 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-04-20 0:43 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a5863204fb1b9c03627edc3bb447c5958ef96458@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).