LOG_DEBUG("-");
#endif
- if ((retval = target->type->get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
+ if ((retval = target_get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
{
return gdb_error(connection, retval);
}
return ERROR_SERVER_REMOTE_CLOSED;
}
- if ((retval = target->type->get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
+ if ((retval = target_get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
{
return gdb_error(connection, retval);
}
LOG_DEBUG("-");
#endif
- if ((retval = target->type->get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
+ if ((retval = target_get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
{
return gdb_error(connection, retval);
}
LOG_DEBUG("-");
- if ((retval = target->type->get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
+ if ((retval = target_get_gdb_reg_list(target, ®_list, ®_list_size)) != ERROR_OK)
{
return gdb_error(connection, retval);
}
}
+int target_get_gdb_reg_list(struct target_s *target,
+ struct reg_s **reg_list[], int *reg_list_size)
+{
+ return target->type->get_gdb_reg_list(target, reg_list, reg_list_size);
+}
+
int target_run_algorithm(struct target_s *target,
int num_mem_params, mem_param_t *mem_params,
int num_reg_params, reg_param_t *reg_param,
int (*soft_reset_halt_imp)(struct target_s *target);
int (*soft_reset_halt)(struct target_s *target);
- /* target register access for gdb.
+ /**
+ * Target register access for GDB. Do @b not call this function
+ * directly, use target_get_gdb_reg_list() instead.
*
* Danger! this function will succeed even if the target is running
* and return a register list with dummy values.
/// Reset the @c examined flag for the given target.
extern void target_reset_examined(struct target_s *target);
+/**
+ * Obtain the registers for GDB.
+ *
+ * This routine is a wrapper for target->type->get_gdb_reg_list.
+ */
+extern int target_get_gdb_reg_list(struct target_s *target,
+ struct reg_s **reg_list[], int *reg_list_size);
+
/**
* Run an algorithm on the @a target given.
*