Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Christian Gagneraud <chgans@gmail.com>
To: gdb@sourceware.org
Subject: HW watchpoint on Linux/ARM
Date: Sun, 16 Jul 2017 01:19:00 -0000	[thread overview]
Message-ID: <CABxGUTjNQo=xjSVmjCD6x38gtKi3AH+eCDGWXRHwgQLGV0RGyQ@mail.gmail.com> (raw)

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


             reply	other threads:[~2017-07-16  1:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-16  1:19 Christian Gagneraud [this message]
     [not found] ` <201707160852.v6G8qFsw000816@licht.localdomain>
2017-07-16  9:42   ` Christian Gagneraud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABxGUTjNQo=xjSVmjCD6x38gtKi3AH+eCDGWXRHwgQLGV0RGyQ@mail.gmail.com' \
    --to=chgans@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox