(*breakpoint_p)->orig_instr = malloc(length);
(*breakpoint_p)->next = NULL;
- if ((retval = target->type->add_breakpoint(target, *breakpoint_p)) != ERROR_OK)
+ if ((retval = target_add_breakpoint(target, *breakpoint_p)) != ERROR_OK)
{
switch (retval)
{
if (breakpoint==NULL)
return;
- target->type->remove_breakpoint(target, breakpoint);
+ target_remove_breakpoint(target, breakpoint);
(*breakpoint_p) = breakpoint->next;
free(breakpoint->orig_instr);
(*watchpoint_p)->set = 0;
(*watchpoint_p)->next = NULL;
- if ((retval = target->type->add_watchpoint(target, *watchpoint_p)) != ERROR_OK)
+ if ((retval = target_add_watchpoint(target, *watchpoint_p)) != ERROR_OK)
{
switch (retval)
{
if (watchpoint==NULL)
return;
- target->type->remove_watchpoint(target, watchpoint);
+ target_remove_watchpoint(target, watchpoint);
(*watchpoint_p) = watchpoint->next;
free(watchpoint);
}
return target->type->bulk_write_memory(target, address, count, buffer);
}
+int target_add_breakpoint(struct target_s *target,
+ struct breakpoint_s *breakpoint)
+{
+ return target->type->add_breakpoint(target, breakpoint);
+}
+int target_remove_breakpoint(struct target_s *target,
+ struct breakpoint_s *breakpoint)
+{
+ return target->type->remove_breakpoint(target, breakpoint);
+}
+
+int target_add_watchpoint(struct target_s *target,
+ struct watchpoint_s *watchpoint)
+{
+ return target->type->add_watchpoint(target, watchpoint);
+}
+int target_remove_watchpoint(struct target_s *target,
+ struct watchpoint_s *watchpoint)
+{
+ return target->type->remove_watchpoint(target, watchpoint);
+}
int target_get_gdb_reg_list(struct target_s *target,
struct reg_s **reg_list[], int *reg_list_size)
/// Reset the @c examined flag for the given target.
extern void target_reset_examined(struct target_s *target);
+
+/**
+ * Add the @a breakpoint for @a target.
+ *
+ * This routine is a wrapper for target->type->add_breakpoint.
+ */
+extern int target_add_breakpoint(struct target_s *target,
+ struct breakpoint_s *breakpoint);
+/**
+ * Remove the @a breakpoint for @a target.
+ *
+ * This routine is a wrapper for target->type->remove_breakpoint.
+ */
+extern int target_remove_breakpoint(struct target_s *target,
+ struct breakpoint_s *breakpoint);
+/**
+ * Add the @a watchpoint for @a target.
+ *
+ * This routine is a wrapper for target->type->add_watchpoint.
+ */
+extern int target_add_watchpoint(struct target_s *target,
+ struct watchpoint_s *watchpoint);
+/**
+ * Remove the @a watchpoint for @a target.
+ *
+ * This routine is a wrapper for target->type->remove_watchpoint.
+ */
+extern int target_remove_watchpoint(struct target_s *target,
+ struct watchpoint_s *watchpoint);
+
/**
* Obtain the registers for GDB.
*