2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-07-20 05:54:19 +10:00
openocd/src
Marc Schink fb43f1ff4e target: Rework 'set' variable of break-/watchpoints
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>
2022-03-19 09:14:39 +00:00
..
flash flash/stm32l4x: fix auto-probe when RDP is promoted from 0 to 0.5 2022-03-19 09:13:55 +00:00
helper keep-alive: drop link with log framework 2022-03-19 09:10:39 +00:00
jtag stlink: enable queuing with stlink-server API v3 2022-03-19 09:11:57 +00:00
pld openocd: use single line for register_commands*() 2021-11-23 11:03:38 +00:00
rtos rtos: threadx: Add hla_target support for ThreadX 2022-02-14 20:25:20 +00:00
rtt
server keep-alive: drop link with log framework 2022-03-19 09:10:39 +00:00
svf
target target: Rework 'set' variable of break-/watchpoints 2022-03-19 09:14:39 +00:00
transport
xsvf
hello.c
hello.h
main.c
Makefile.am
openocd.c log: fix memory leak when log to file is enabled 2022-01-22 10:15:48 +00:00
openocd.h