+2020-08-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+
+ * ppc-linux-nat.c (ppc_linux_dreg_interface::detect)
+ (ppc_linux_nat_target::low_prepare_to_resume): Use ptrace () < 0
+ and >= to check return value instead of == -1 and != -1.
+
2020-08-14 Simon Marchi <simon.marchi@polymtl.ca>
* utils.h (class gdb_argv) <as_array_view>: New method.
bool no_features = false;
if (ptrace (PPC_PTRACE_GETHWDBGINFO, ptid.lwp (), 0, &m_hwdebug_info)
- != -1)
+ >= 0)
{
/* If there are no advertised features, we don't use the
HWDEBUG interface and try the DEBUGREG interface instead.
{
unsigned long wp;
- if (ptrace (PTRACE_GET_DEBUGREG, ptid.lwp (), 0, &wp) != -1)
+ if (ptrace (PTRACE_GET_DEBUGREG, ptid.lwp (), 0, &wp) >= 0)
{
m_interface.emplace (DEBUGREG);
return;
the debug register state when fork and clone events are
detected. */
if (ptrace (PPC_PTRACE_DELHWDEBUG, lp->ptid.lwp (), 0,
- bp_it->first) == -1)
+ bp_it->first) < 0)
if (errno != ENOENT)
perror_with_name (_("Error deleting hardware "
"breakpoint or watchpoint"));
long ret = ptrace (PTRACE_SET_DEBUGREG, lp->ptid.lwp (),
0, wp);
- if (ret == -1)
+ if (ret < 0)
perror_with_name (_("Error setting hardware watchpoint"));
}