sizeof (gdb_fpregset_t));
}
-/* Helper for the "stopped_data_address" target method. Returns TRUE
- if a hardware watchpoint trap at ADDR_TRAP matches a set watchpoint.
- The address of the matched watchpoint is returned in *ADDR_P. */
-
-static bool
-loongarch_stopped_data_address (const struct loongarch_debug_reg_state *state,
- CORE_ADDR addr_trap, CORE_ADDR *addr_p)
-{
-
- int i;
-
- for (i = loongarch_num_wp_regs - 1; i >= 0; --i)
- {
- const CORE_ADDR addr_watch = state->dr_addr_wp[i];
-
- if (state->dr_ref_count_wp[i]
- && DR_CONTROL_ENABLED (state->dr_ctrl_wp[i])
- && addr_trap == addr_watch)
- {
- *addr_p = addr_watch;
- return true;
- }
- }
- return false;
-}
-
-
/* Returns the number of hardware watchpoints of type TYPE that we can
set. Value is positive if we can set CNT watchpoints, zero if
setting watchpoints of type TYPE is not supported, and negative if
return 1;
}
+
+/* See nat/loongarch-hw-point.h*/
+
+bool
+loongarch_stopped_data_address (const struct loongarch_debug_reg_state *state,
+ CORE_ADDR addr_trap, CORE_ADDR *addr_p)
+{
+ int i;
+
+ for (i = loongarch_num_wp_regs - 1; i >= 0; --i)
+ {
+ const CORE_ADDR addr_watch = state->dr_addr_wp[i];
+
+ if (state->dr_ref_count_wp[i]
+ && DR_CONTROL_ENABLED (state->dr_ctrl_wp[i])
+ && addr_trap == addr_watch)
+ {
+ *addr_p = addr_watch;
+ return true;
+ }
+ }
+
+ return false;
+}
int loongarch_region_ok_for_watchpoint (CORE_ADDR addr, int len);
+/* Helper for the "stopped_data_address/low_stopped_data_address" target
+ method. Returns TRUE if a hardware watchpoint trap at ADDR_TRAP matches
+ a set watchpoint. The address of the matched watchpoint is returned in
+ *ADDR_P. */
+
+bool loongarch_stopped_data_address (const struct loongarch_debug_reg_state *state,
+ CORE_ADDR addr_trap, CORE_ADDR *addr_p);
+
#endif /* GDB_NAT_LOONGARCH_HW_POINT_H */