int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
- int stopped_by_watchpoint () override;
+ bool stopped_by_watchpoint () override;
- int stopped_data_address (CORE_ADDR *) override;
+ bool stopped_data_address (CORE_ADDR *) override;
int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
CORE_ADDR register_u_offset (struct gdbarch *gdbarch,
int regno, int store_p) override;
+ /* Override linux_nat_target low methods. */
+ void low_new_thread (struct lwp_info *lp) override;
+
private:
/* Helpers. See definitions. */
void mips64_regsets_store_registers (struct regcache *regcache,
stopped by watchpoint. The watchhi R and W bits indicate the watch
register triggered. */
-int
+bool
mips_linux_nat_target::stopped_by_watchpoint ()
{
int n;
if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
&watch_readback,
&watch_readback_valid, 1))
- return 0;
+ return false;
num_valid = mips_linux_watch_get_num_valid (&watch_readback);
for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
if (mips_linux_watch_get_watchhi (&watch_readback, n) & (R_MASK | W_MASK))
- return 1;
+ return true;
- return 0;
+ return false;
}
/* Target to_stopped_data_address implementation. Set the address
where the watch triggered (if known). Return 1 if the address was
known. */
-int
+bool
mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr)
{
/* On mips we don't know the low order 3 bits of the data address,
so we must return false. */
- return 0;
+ return false;
}
/* Target to_region_ok_for_hw_watchpoint implementation. Return 1 if
return 0;
}
-/* linux_nat new_thread implementation. Write the mirrored watch
- register values for the new thread. */
+/* linux_nat_target::low_new_thread implementation. Write the
+ mirrored watch register values for the new thread. */
-static void
-mips_linux_new_thread (struct lwp_info *lp)
+void
+mips_linux_nat_target::low_new_thread (struct lwp_info *lp)
{
long tid = lp->ptid.lwp ();
&maintenance_show_cmdlist);
linux_target = &the_mips_linux_nat_target;
- add_target (&the_mips_linux_nat_target);
- linux_nat_set_new_thread (&the_mips_linux_nat_target,
- mips_linux_new_thread);
+ add_inf_child_target (&the_mips_linux_nat_target);
}