I'm trying to set a breakpoint on a memory value to see when that value is being read. I believe GDB calls this a data breakpoint or a watchpoint. From what I've read so far this requires a hardware breakpoint.
I saw support for a HW breakpoint being added to gdbserver in 2011 and support for it in the kernel was added earlier.
When I tried to add a such a data breakpoint from GDB, which was connected to the remote gdbsever ( 7.6 from the latest NDK ) it failed with a message which leads me to believe that it failed to set a hardware breakpoint.
Any ideas on this ? Is setting a HW breakpoint supported in Android ( using the gdbsever and gdb from the latest NDK ) ? How can I check if it's enabled or available, does the kernel need any specific configuration for this ?
Thanks.