#include "config.h"
#endif
-#include <stdlib.h>
-
-#include "binarybuffer.h"
#include "target.h"
#include "log.h"
-#include "types.h"
-
#include "breakpoints.h"
-char *breakpoint_type_strings[] =
+
+static char *breakpoint_type_strings[] =
{
"hardware",
"software"
};
-char *watchpoint_rw_strings[] =
+static char *watchpoint_rw_strings[] =
{
"read",
"write",
(*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);
free(breakpoint);
}
-int breakpoint_remove(target_t *target, u32 address)
+void breakpoint_remove(target_t *target, u32 address)
{
breakpoint_t *breakpoint = target->breakpoints;
breakpoint_t **breakpoint_p = &target->breakpoints;
{
LOG_ERROR("no breakpoint at address 0x%8.8x found", address);
}
-
- return ERROR_OK;
}
void breakpoint_clear_target(target_t *target)
(*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);
}
-
-
-int watchpoint_remove(target_t *target, u32 address)
+void watchpoint_remove(target_t *target, u32 address)
{
watchpoint_t *watchpoint = target->watchpoints;
watchpoint_t **watchpoint_p = &target->watchpoints;
{
LOG_ERROR("no watchpoint at address 0x%8.8x found", address);
}
-
- return ERROR_OK;
}
-
void watchpoint_clear_target(target_t *target)
{
watchpoint_t *watchpoint;