riscv-openocd/src
craigblackmore 7897d40099 Handle hardware watchpoints hit by RV32 loads and stores (#291)
* Add riscv_hit_watchpoint function for RV32I loads and stores

For GDB to fully support hardware watchpoints, OpenOCD needs to tell GDB
which data address has been hit. OpenOCD relies on a target-specific
hit_watchpoint function to do this. If GDB is not given the address, it
will not print the hit variable name or its old and new value.

There does not seem to be a way for the hardware to tell us which trigger
was hit (0.13 introduced the 'hit bit' but this is optional). Alternatively,
we can decode the instruction at dpc and find out which memory address
it accesses.

This commit adds support for RV32I load and store instructions
and could be extended for additional instructions in the future.

* 0.11: change debug reason for hw triggers to DBG_REASON_WATCHPOINT

This is to make sure riscv_hit_watchpoint is called to check for a data
address hit.

* Fix style issues

* Change %lx to PRIx64 to clear -m32 build errors

* Add clarifying comments/todos

* Fix types in format strings
2018-08-27 12:42:34 -07:00
..
flash From upstream (#286) 2018-08-20 14:55:30 -07:00
helper Merge branch 'riscv' into notice_reset 2018-04-30 13:36:06 -07:00
jtag From upstream (#286) 2018-08-20 14:55:30 -07:00
pld Convert to non-recursive make 2016-12-08 16:23:10 +00:00
rtos Handle the qC packet (#292) 2018-08-27 12:42:21 -07:00
server From upstream (#286) 2018-08-20 14:55:30 -07:00
svf svf: improve robustness when processing invalid SVF files 2018-03-13 08:41:21 +00:00
target Handle hardware watchpoints hit by RV32 loads and stores (#291) 2018-08-27 12:42:34 -07:00
transport configure: disable all drivers when zy1000 is enabled 2018-05-08 15:21:49 -07:00
xsvf Convert to non-recursive make 2016-12-08 16:23:10 +00:00
Makefile.am Convert to non-recursive make 2016-12-08 16:23:10 +00:00
hello.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
openocd.c armv8: valgrind memleak fixes 2018-05-08 15:21:49 -07:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00