Pass breakpoint length to target.
This commit is contained in:
parent
459bae4ea1
commit
60f3be501e
|
@ -67,8 +67,8 @@ static int cortexm_halt_wait(target *t);
|
|||
static void cortexm_halt_request(target *t);
|
||||
static int cortexm_fault_unwind(target *t);
|
||||
|
||||
static int cortexm_set_hw_bp(target *t, uint32_t addr);
|
||||
static int cortexm_clear_hw_bp(target *t, uint32_t addr);
|
||||
static int cortexm_set_hw_bp(target *t, uint32_t addr, uint8_t len);
|
||||
static int cortexm_clear_hw_bp(target *t, uint32_t addr, uint8_t len);
|
||||
|
||||
static int cortexm_set_hw_wp(target *t, uint8_t type, uint32_t addr, uint8_t len);
|
||||
static int cortexm_clear_hw_wp(target *t, uint8_t type, uint32_t addr, uint8_t len);
|
||||
|
@ -669,8 +669,9 @@ int cortexm_run_stub(target *t, uint32_t loadaddr,
|
|||
/* The following routines implement hardware breakpoints.
|
||||
* The Flash Patch and Breakpoint (FPB) system is used. */
|
||||
|
||||
static int cortexm_set_hw_bp(target *t, uint32_t addr)
|
||||
static int cortexm_set_hw_bp(target *t, uint32_t addr, uint8_t len)
|
||||
{
|
||||
(void)len;
|
||||
struct cortexm_priv *priv = t->priv;
|
||||
uint32_t val = addr;
|
||||
unsigned i;
|
||||
|
@ -693,8 +694,9 @@ static int cortexm_set_hw_bp(target *t, uint32_t addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cortexm_clear_hw_bp(target *t, uint32_t addr)
|
||||
static int cortexm_clear_hw_bp(target *t, uint32_t addr, uint8_t len)
|
||||
{
|
||||
(void)len;
|
||||
struct cortexm_priv *priv = t->priv;
|
||||
unsigned i;
|
||||
|
||||
|
|
|
@ -452,9 +452,9 @@ handle_z_packet(char *packet, int plen)
|
|||
switch(type) {
|
||||
case 1: /* Hardware breakpoint */
|
||||
if(set)
|
||||
ret = target_set_hw_bp(cur_target, addr);
|
||||
ret = target_set_hw_bp(cur_target, addr, len);
|
||||
else
|
||||
ret = target_clear_hw_bp(cur_target, addr);
|
||||
ret = target_clear_hw_bp(cur_target, addr, len);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
|
@ -76,11 +76,11 @@ target *target_attach(target *t, target_destroy_callback destroy_cb);
|
|||
(target)->halt_resume((target), (step))
|
||||
|
||||
/* Break-/watchpoint functions */
|
||||
#define target_set_hw_bp(target, addr) \
|
||||
(target)->set_hw_bp((target), (addr))
|
||||
#define target_set_hw_bp(target, addr, len) \
|
||||
(target)->set_hw_bp((target), (addr), (len))
|
||||
|
||||
#define target_clear_hw_bp(target, addr) \
|
||||
(target)->clear_hw_bp((target), (addr))
|
||||
#define target_clear_hw_bp(target, addr, len) \
|
||||
(target)->clear_hw_bp((target), (addr), (len))
|
||||
|
||||
|
||||
#define target_set_hw_wp(target, type, addr, len) \
|
||||
|
@ -169,8 +169,8 @@ struct target_s {
|
|||
void (*halt_resume)(target *t, bool step);
|
||||
|
||||
/* Break-/watchpoint functions */
|
||||
int (*set_hw_bp)(target *t, uint32_t addr);
|
||||
int (*clear_hw_bp)(target *t, uint32_t addr);
|
||||
int (*set_hw_bp)(target *t, uint32_t addr, uint8_t len);
|
||||
int (*clear_hw_bp)(target *t, uint32_t addr, uint8_t len);
|
||||
|
||||
int (*set_hw_wp)(target *t, uint8_t type, uint32_t addr, uint8_t len);
|
||||
int (*clear_hw_wp)(target *t, uint8_t type, uint32_t addr, uint8_t len);
|
||||
|
|
Loading…
Reference in New Issue