From: David Daney <ddaney@caviumnetworks.com>
To: Earl Chew <echew@ixiacom.com>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: Filling in struct mips64_watch_regs from a 32 bit process
Date: Mon, 31 Jan 2011 17:24:49 -0800 [thread overview]
Message-ID: <4D4760E1.9000400@caviumnetworks.com> (raw)
In-Reply-To: <4D475DFC.1040401@ixiacom.com>
On 01/31/2011 05:12 PM, Earl Chew wrote:
>>> I notice that a 32 bit process running on a 64 bit kernel is expected to
>>> know that it should fill in mips64_watch_regs --- even though it is running
>>> against a 32 bit ABI.
>>>
>>> Is this an oversight, or am I missing something ?
>>
>> It is intentional.
>
> Oh I see ... I have to call PTRACE_SET_WATCH_REGS first in order to figure
> out whether the kernel is expecting me to use pt_watch_style_mips32 or
> pt_watch_style_mips64.
>
That would be PTRACE_GET_WATCH_REGS. It will tell you the width of the
registers as well as how many are available (in the num_valid field) and
the properties of each (in the watch_masks[] fields).
Fill in watchlo[] and watchhi[], write them back with
PTRACE_SET_WATCH_REGS, then sit back and wait for SIGTRAP.
David Daney
next prev parent reply other threads:[~2011-02-01 1:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 0:41 Filling in struct mips64_watch_regs from a 32 bit process Earl Chew
2011-02-01 1:03 ` David Daney
2011-02-01 1:12 ` Earl Chew
2011-02-01 1:24 ` David Daney [this message]
2011-02-01 1:26 ` Earl Chew
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=4D4760E1.9000400@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=echew@ixiacom.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