Hi Folks,
Some LLVM debugger developers would like to add unaligned as well as scoped watchpoints and it seems they need some additional support in the kernel to do so.
I'm not claiming to understand what they need, since GDB already supports it, it may be possible to do it with the current kernel. However, if there's a better way to do it, than I think it may be worth checking with them. If not, I'd appreciate if someone could help them understanding how they could do it with the current structure.
https://bugzilla.kernel.org/show_bug.cgi?id=117621
Both unaligned and scoped watchpoints require the same level of functionality: watch over a larger area and defer to a software implementation (table look-up) to see if it's a true or false positive.
For unaligned watchpoints, we'd need to watch over the area +-alignment then factor out the padding. For scoped watchpoints, we need to watch over the stack and always check if the variable is in scope or not by comparing it to the stack pointer / frame pointer / base pointer.
I don't think either of them would have to be implemented in the kernel itself, I'm expecting this to be in the debuggers code, but they may need additional logic in the kernel, which Pavel and Omair should know better.
This email is so that I don't prematurely add irrelevant people to the bug. :)
Thanks! --renato
linaro-kernel@lists.linaro.org