Browse Source

Add target_step wrapper:

- replaces all calls to target->type->step.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1965 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.2.0
zwelch 15 years ago
parent
commit
17fa4de854
3 changed files with 15 additions and 1 deletions
  1. +2
    -1
      src/server/gdb_server.c
  2. +6
    -0
      src/target/target.c
  3. +7
    -0
      src/target/target.h

+ 2
- 1
src/server/gdb_server.c View File

@@ -1366,7 +1366,8 @@ int gdb_step_continue_packet(connection_t *connection, target_t *target, char *p
else if (packet[0] == 's')
{
LOG_DEBUG("step");
retval=target->type->step(target, current, address, 0); /* step at current or address, don't handle breakpoints */
/* step at current or address, don't handle breakpoints */
retval = target_step(target, current, address, 0);
}
return retval;
}


+ 6
- 0
src/target/target.c View File

@@ -548,6 +548,12 @@ int target_get_gdb_reg_list(struct target_s *target,
{
return target->type->get_gdb_reg_list(target, reg_list, reg_list_size);
}
int target_step(struct target_s *target,
int current, u32 address, int handle_breakpoints)
{
return target->type->step(target, current, address, handle_breakpoints);
}


int target_run_algorithm(struct target_s *target,
int num_mem_params, mem_param_t *mem_params,


+ 7
- 0
src/target/target.h View File

@@ -410,6 +410,13 @@ extern void target_reset_examined(struct target_s *target);
extern int target_get_gdb_reg_list(struct target_s *target,
struct reg_s **reg_list[], int *reg_list_size);

/**
* Step the target.
*
* This routine is a wrapper for target->type->step.
*/
int target_step(struct target_s *target,
int current, u32 address, int handle_breakpoints);
/**
* Run an algorithm on the @a target given.
*


Loading…
Cancel
Save