diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2019-03-15 23:20:55 +0100 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2019-06-12 15:15:29 +0100 |
commit | 48478967db9cc4a499ea821a945e81524557cfd2 (patch) | |
tree | 43559075decdd3b190f7b0a4902008912e06794c /src | |
parent | 88728abee1eea55e5c11bab55640ea13a1357f3a (diff) | |
download | riscv-openocd-48478967db9cc4a499ea821a945e81524557cfd2.zip riscv-openocd-48478967db9cc4a499ea821a945e81524557cfd2.tar.gz riscv-openocd-48478967db9cc4a499ea821a945e81524557cfd2.tar.bz2 |
mem_ap: fix format of logged addresses
The macro TARGET_ADDR_FMT, defined in helper/types.h, already
includes the prefix "0x" in front of the hexadecimal number,
being defined as:
#define TARGET_ADDR_FMT "0x%8.8" TARGET_PRIxADDR
An additional "0x" is present in mem_ap; it prints debug messages
with a double "0x" before the address:
Debug: 2921 34180 mem_ap.c:153 mem_ap_write_memory():
Writing memory at physical address 0x0x5000000c; size 4;
count 1
Remove the incorrect hexadecimal prefix.
Change-Id: I38f19ed2a2f542bd5df53e947a2604f1cbe80e08
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5222
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/mem_ap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/mem_ap.c b/src/target/mem_ap.c index 584e19d..29cd37a 100644 --- a/src/target/mem_ap.c +++ b/src/target/mem_ap.c @@ -140,7 +140,7 @@ static int mem_ap_read_memory(struct target *target, target_addr_t address, { struct mem_ap *mem_ap = target->arch_info; - LOG_DEBUG("Reading memory at physical address 0x" TARGET_ADDR_FMT + LOG_DEBUG("Reading memory at physical address " TARGET_ADDR_FMT "; size %" PRId32 "; count %" PRId32, address, size, count); if (count == 0 || buffer == NULL) @@ -155,7 +155,7 @@ static int mem_ap_write_memory(struct target *target, target_addr_t address, { struct mem_ap *mem_ap = target->arch_info; - LOG_DEBUG("Writing memory at physical address 0x" TARGET_ADDR_FMT + LOG_DEBUG("Writing memory at physical address " TARGET_ADDR_FMT "; size %" PRId32 "; count %" PRId32, address, size, count); if (count == 0 || buffer == NULL) |