#endif
#include "target.h"
+#include "target_type.h"
#include "target_request.h"
#include "time_support.h"
#include "register.h"
return ERROR_OK;
}
+int target_examine_one(struct target_s *target)
+{
+ return target->type->examine(target);
+}
+
/* Targets that correctly implement init+examine, i.e.
* no communication with target during init:
*
target_t *target = all_targets;
while (target)
{
- if ((retval = target->type->examine(target))!=ERROR_OK)
+ if ((retval = target_examine_one(target)) != ERROR_OK)
return retval;
target = target->next;
}
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)
"0x%8.8x: ", address + (i*size));
}
- u32 value;
+ u32 value=0;
const u8 *value_ptr = buffer + i * size;
switch (size) {
case 4: value = target_buffer_get_u32(target, value_ptr); break;