Created attachment 7168 [details] Patch to update user manual for this issue. The GDB manual (section 5.1.2, "Setting Watchpoints") states: "If gdb cannot set a hardware watchpoint, it sets a software watchpoint,..." This appears to only be true for native targets. On a remote target connecting over Remote Serial Protocol, GDB will just report that hardware breakpoints are not supported. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints The user must explicitly request software watchpoints using set can-use-hw-watchpoints 0 Problem found using GDB for ARC. This really needs fixing in remote.c, but in the meantime, I attach a small patch to the documentation: 2013-05-13 Jeremy Bennett <jeremy.bennett@embecosm.com> * doc/gdb.texinfo (Setting Watchpoints): Note that automatic fallback to software watchpoints does not happen with remote targets.
I was able to reproduce this with x86_64 host and GDB 7.6 from release tarball after I commented handling of Z2 packet in gdbserver source code. (gdb) watch a Hardware watchpoint 2: a (gdb) c Continuing. Warning: Could not insert hardware watchpoint 2. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. main () at test.c:4 4 a = 2; (gdb)