target: use proper macro for parsing watchpoint address
Currently wp/rwp commands fail on 64-bit targets: > wp 0xffffffff80001400 4 addr option value ('0xffffffff80001400') is not valid Change-Id: I94d4af906b02b7bd463c8d79a6235a3646dfc434 Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Reviewed-on: http://openocd.zylin.com/6058 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
84a2302af7
commit
54ef790149
|
@ -4056,7 +4056,7 @@ COMMAND_HANDLER(handle_wp_command)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum watchpoint_rw type = WPT_ACCESS;
|
enum watchpoint_rw type = WPT_ACCESS;
|
||||||
uint32_t addr = 0;
|
target_addr_t addr = 0;
|
||||||
uint32_t length = 0;
|
uint32_t length = 0;
|
||||||
uint32_t data_value = 0x0;
|
uint32_t data_value = 0x0;
|
||||||
uint32_t data_mask = 0xffffffff;
|
uint32_t data_mask = 0xffffffff;
|
||||||
|
@ -4086,7 +4086,7 @@ COMMAND_HANDLER(handle_wp_command)
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case 2:
|
case 2:
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], length);
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], length);
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
|
COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -4106,8 +4106,8 @@ COMMAND_HANDLER(handle_rwp_command)
|
||||||
if (CMD_ARGC != 1)
|
if (CMD_ARGC != 1)
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
|
|
||||||
uint32_t addr;
|
target_addr_t addr;
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
|
COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
|
||||||
|
|
||||||
struct target *target = get_current_target(CMD_CTX);
|
struct target *target = get_current_target(CMD_CTX);
|
||||||
watchpoint_remove(target, addr);
|
watchpoint_remove(target, addr);
|
||||||
|
|
Loading…
Reference in New Issue