From: Will Deacon <will.deacon@arm.com>
To: "Wang, Yalin" <Yalin.Wang@sonymobile.com>
Cc: "'linux-mmc@vger.kernel.org'" <linux-mmc@vger.kernel.org>,
"'linux-arch-owner@vger.kernel.org'"
<linux-arch-owner@vger.kernel.org>
Subject: Re: how to creat watchpoint in kernel for data access debug
Date: Fri, 23 May 2014 14:45:50 +0100 [thread overview]
Message-ID: <20140523134550.GB21319@arm.com> (raw)
In-Reply-To: <35FD53F367049845BC99AC72306C23D1029A276569F4@CNBJMBX05.corpusers.net>
On Fri, May 23, 2014 at 03:51:17AM +0100, Wang, Yalin wrote:
> I have a problems that I want create a watchpoint to monitor a data for
> Debug in kernel , but I don't know how to do it , I try the kprobes , but
> seems it only support create .text section probe , Can't monitor data
> access , then I try perf_event_create to create a hardware Data
> watchpoint , it can work , but has a problem: When the data access hit , I
> don't know how to bypass this time's watchpoint , This need simulate the
> data access or step the break instructions in data abort Exception
> handler , seems kernel don't provide these for perf_event ..
>
> I test this on ARM arch ,
> My question is that how to create data watchpoint in kernel ?
It depends on why you want the watchpoint. If it's for counting accesses to
that data, then you can use the perf tool and the perf code will try to deal
with the single-stepping for you. Otherwise, you can investigate KGDB, but
I've never tried it myself (and I don't think it uses hardware watchpoint
for ARM)..
Will
next prev parent reply other threads:[~2014-05-23 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 2:50 (unknown), Wang, Yalin
2014-05-23 2:51 ` how to creat watchpoint in kernel for data access debug Wang, Yalin
2014-05-23 13:45 ` Will Deacon [this message]
2014-05-24 3:48 ` Wang, Yalin
2014-06-03 16:45 ` Will Deacon
2014-06-04 3:05 ` Wang, Yalin
2014-06-04 18:01 ` Will Deacon
2014-06-05 3:40 ` Wang, Yalin
2014-06-16 12:55 ` Will Deacon
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=20140523134550.GB21319@arm.com \
--to=will.deacon@arm.com \
--cc=Yalin.Wang@sonymobile.com \
--cc=linux-arch-owner@vger.kernel.org \
--cc=linux-mmc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.