From: David Daney <ddaney.cavm@gmail.com>
To: Bruce Korb <bruce.korb@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: Hardware breakpoints on MIPS
Date: Thu, 29 Jan 2015 15:51:09 -0800 [thread overview]
Message-ID: <54CAC76D.9020900@gmail.com> (raw)
In-Reply-To: <CAKRnqNKBCOF0toKNDc8=Y-geA18bzM_7_Mc5HN6jgb40H5OfaA@mail.gmail.com>
On 01/29/2015 03:43 PM, Bruce Korb wrote:
> Thank you!
>
> On Thu, Jan 29, 2015 at 3:01 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>>> Anyway, I need to set a hardware breakpoint on a Mips CPU on a "Cavium"
>>> platform
>>> in a kernel module.
>>
>> This would appear to be for the most part, completely independent of GDB,
>
> I had guessed as much, but did not have a better guess, either.
>
>> Since many years ago, WatchLo and WatchHi have been under the control of the
>> Linux kernel. If you set these registers and a Watch Exception is
>> triggered, it will cause the registers to be cleared and the exception will
>> be ignored, unless they were configured via ptrace(2) for userspace
>> addresses.
>
> Can a hacked ptrace set it up to panic instead?
> All I need is a stack trace once this one single spot in memory gets written.
>
Look at do_watch() in traps.c, you would have to doctor that function up
to generate the stacktrace.
>> For debugging kernel space with watchpoint registers on OCTEON it is
>> probably best to use the facilities in the EJTAG unit.
>
> Which, I'll hazard a guess, requires physical access.
> I'll have to go begging and pleading for special access to the Hardware Lab.
> Please don't ask me why we software types are kept out.
> I've not gotten a straight answer, so I could only answer with speculation.
>
>
> *sigh*. Thank you.
>
>
prev parent reply other threads:[~2015-01-29 23:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKRnqN+Js_zDn==T0+-EGzyTSW4P-dpvB7jKsLmFJEbKhxifJw@mail.gmail.com>
2015-01-29 23:01 ` Hardware breakpoints on MIPS David Daney
2015-01-29 23:43 ` Bruce Korb
2015-01-29 23:51 ` David Daney [this message]
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=54CAC76D.9020900@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=bruce.korb@gmail.com \
--cc=linux-mips@linux-mips.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