Watchpoints seem to only work for the sizes 4 and 8, not 1 and 2. This means that watchpoints for chars and shorts will not be triggered. The cause of this seems to be in the hardware debug API, as setting a size 1 or 2 watchpoint does not generate a debug exception at all, but it is unclear why. The way we are setting the BAS field of the DBG_WCR register looks valid, as for a size 1 watch point we set the BAS field to '0b00000001' and for a size 2 to '0b00000011', which should select the first and first two bytes of the word pointed to by the watchpoint respectively as per the ARMv8 TRM.
Watchpoints seem to only work for the sizes 4 and 8, not 1 and 2. This means that watchpoints for chars and shorts will not be triggered. The cause of this seems to be in the hardware debug API, as setting a size 1 or 2 watchpoint does not generate a debug exception at all, but it is unclear why. The way we are setting the BAS field of the DBG_WCR register looks valid, as for a size 1 watch point we set the BAS field to '0b00000001' and for a size 2 to '0b00000011', which should select the first and first two bytes of the word pointed to by the watchpoint respectively as per the ARMv8 TRM.