fb43f1ff4e
The 'set' variable name suggests a boolean data type which determines whether a breakpoint (or watchpoint) is active. However, it is also used to store the number of the breakpoint. This encoding leads to inconsistent value assignments: boolean and integer values are mixed. Also, associated hardware comparator numbers, which are usually numbered from 0, cannot be used directly. An additional offset is required to store the comparator numbers. In order to make the code more readable and the value assignment more consistent, change the variable name to 'is_set', its data type to 'bool' and introduce a dedicated variable for the break-/watchpoint number. In order to make the review easier, the data types of various related variables (e.g. number of breakpoints) are not changed. While at it, fix a few coding style issues. Change-Id: I2193f5639247cce6b80580d4c1c6afee916aeb82 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6319 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> |
||
---|---|---|
.. | ||
jsp_server.c | ||
jsp_server.h | ||
Makefile.am | ||
or1k_du_adv.c | ||
or1k_du.h | ||
or1k_tap_mohor.c | ||
or1k_tap_vjtag.c | ||
or1k_tap_xilinx_bscan.c | ||
or1k_tap.h | ||
or1k.c | ||
or1k.h |