Hi,
I already check GDB sources and found this error is only throw in two places at two different source files.
The two conditions only check a variable which copies the break point register from the ARM cpu.
The conditions are:
if (arm_hwbp_control_is_initialized (proc_info->bpts[i].control))
if (!arm_hwbp_control_is_enabled (bpts[i].control))
and the files are :
./gdb/arm-linux-nat.c
./gdb/gdbserver/linux-arm-low.c
When the error happens the issue throw a message "Unexpected error setting breakpoint" and attach a string generated from the erno variable the error in this case is
EINVAL (Invalid argument). Which is a generic error, that error should be throw by the kernel and the source could be one of many.
Errors: Linux System Errors
errno(3) - Linux manual page
In order to know which error is throwing the EINVAL you should debug the kernel in this source file:
arch/arm/kernel/hw_breakpoint.c
http://lxr.free-electrons.com/source/arch/arm/kernel/hw_breakpoint.c
Regards,
-Israel.