aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers/vdebug.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2022-12-14 15:21:43 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2022-12-17 09:32:34 +0000
commit2b6fe8f1ab739798309b47f7b3a664894ba43a19 (patch)
treeb3582be76108f615b578d0d821e8e3d45696f86a /src/jtag/drivers/vdebug.c
parenta51ac964c6160646f2c28db854aa8faf096eb314 (diff)
downloadriscv-openocd-2b6fe8f1ab739798309b47f7b3a664894ba43a19.zip
riscv-openocd-2b6fe8f1ab739798309b47f7b3a664894ba43a19.tar.gz
riscv-openocd-2b6fe8f1ab739798309b47f7b3a664894ba43a19.tar.bz2
target: fix assert in 'monitor profile' on constant PC
When target is stopped in WFI/WFE or is in an infinite loop, the sampled PC will always return the same value. Command 'profile' requires that distance between min and max PC should be at least 2, which is not the case for constant PC, and incorrectly enforces the check through as assert(). Move the code that reads the optional parameters 'start' and 'end' and check the gap 'end - start' before running the profile. For self-computed min and max, increase max (or decrease min) to match the required constraint. Drop the assert(). Change-Id: I2be8df8568ce8c889923888c492e4f7ce354b16b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: https://sourceforge.net/p/openocd/tickets/370/ Reviewed-on: https://review.openocd.org/c/openocd/+/7400 Tested-by: jenkins
Diffstat (limited to 'src/jtag/drivers/vdebug.c')
0 files changed, 0 insertions, 0 deletions