This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

HW watchpoint on Linux/ARM


Hi there,

Does anyone know if it is possible to use HW watchpoint on ARM platform?

I have tried this feature on a Freescale i.mx6 CPU and a TI Sitara
(both ARM cortex), with GDB 7.12 and was unsuccessful so far.

I did some research, and it seems to me that this feature is supported
by both GDB for ARM and Linux for ARM

Support in GDB 7.12.1:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/gdbserver/linux-arm-low.c;h=b2b22581634489bc68130620428cda25f6ae43a0;hb=59b102452f0bdab7a9b19d9fdbb8ce5253f0ce9f

Support in Linux 4.9:
https://github.com/torvalds/linux/blob/v4.9/arch/arm/kernel/hw_breakpoint.c

When I tried with my i.mx6 system, I thought that my system might be a
bit old, so I decided to try with my BeagleBone system, which run a
much more recent software stack (Linux 4.9.37, GDB 7.12.1).

At this point i don't know which of GDB or Linux (or me) is to blame.
Has anyone had any success with hardware watchpoint on ARM (Cortex) platform?

Any sort of feedback appreciated.

Update:
On BeagleBone, the blame goes to Linux, it doesn't support
ARM_DEBUG_ARCH_V7_MM (memory-mapped interface), the kernel says
"hw-breakpoint: debug architecture 0x4 unsupported."
But on i.mx6, it does. From memory, the kernel told me that I have
access to 5 HW breakpoints and 1 HW watchpoint (I don't have the board
at hand, but will post details on Monday).


Thanks,
Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]