aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Mamonov <pmamonov@gmail.com>2020-10-12 15:02:44 +0300
committerAntonio Borneo <borneo.antonio@gmail.com>2021-02-13 13:08:31 +0000
commit54ef790149918df40e6bc2220ffd52ade1b9669b (patch)
treef447ad3f92f670480d03d59a38727faa710ca78c /src
parent84a2302af790d28f5dd7e03620703710300305f1 (diff)
downloadriscv-openocd-54ef790149918df40e6bc2220ffd52ade1b9669b.zip
riscv-openocd-54ef790149918df40e6bc2220ffd52ade1b9669b.tar.gz
riscv-openocd-54ef790149918df40e6bc2220ffd52ade1b9669b.tar.bz2
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>
Diffstat (limited to 'src')
-rw-r--r--src/target/target.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/target.c b/src/target/target.c
index fa98c88..033fc07 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -4056,7 +4056,7 @@ COMMAND_HANDLER(handle_wp_command)
}
enum watchpoint_rw type = WPT_ACCESS;
- uint32_t addr = 0;
+ target_addr_t addr = 0;
uint32_t length = 0;
uint32_t data_value = 0x0;
uint32_t data_mask = 0xffffffff;
@@ -4086,7 +4086,7 @@ COMMAND_HANDLER(handle_wp_command)
/* fall through */
case 2:
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], length);
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
+ COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
break;
default:
@@ -4106,8 +4106,8 @@ COMMAND_HANDLER(handle_rwp_command)
if (CMD_ARGC != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- uint32_t addr;
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
+ target_addr_t addr;
+ COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
struct target *target = get_current_target(CMD_CTX);
watchpoint_remove(target, addr);