From: Daniel Jacobowitz <drow@false.org>
To: "Maciej W. Rozycki" <macro@mips.com>
Cc: gdb-patches@sourceware.org, Chris Dearman <chris@mips.com>,
"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: MIPS: Handle the DSP registers
Date: Thu, 27 Mar 2008 17:46:00 -0000 [thread overview]
Message-ID: <20080327174601.GA15198@caradoc.them.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0803270953470.26878@perivale.mips.com>
On Thu, Mar 27, 2008 at 05:13:03PM +0000, Maciej W. Rozycki wrote:
> As far as I know it both YAMON and the SDE library debugging stub both
> provide access to cp0 registers. I may not have time to check whether
> they use the problematic packets, but with the code shuffle above (1) this
> becomes a non-issue for this lone change.
Great. So we can figure out what register layout they need and
provide it explicitly.
> > Does the MDI patch rely on passing "1" to the new function? If not,
> > please just use regcache_invalidate. Speaking about good engineering
>
> Well, it passes "-1", so it is reasonable and not exactly the same as
> regcache_invalidate().
Hmm, that is more reasonable. That meaning is documented in a
comment, but not used anywhere else in present GDB, though, and none
of the callers of regcache_valid_p expect it - so I'd be dubious of it
actually working! If we want it to work there's going to be an
ugly audit involved.
May I ask you to save this function for later, and return to it along
with the MDI patch? I will look at that as soon as I can find a
moment, it's next after this one.
> > Then an N32 GDB is not going to be able to read these registers unless
> > we create a regset for them, FYI. ptrace takes and returns longs on
> > n32, not long longs. I experimented with using long long, but it was
> > a terrible mess.
>
> Hmm, I have had a peek at the kernel and it looks like PTRACE_POKEUSR and
> PTRACE_PEEKUSR requests are completely broken for n32; it's just that we
> have a way around it for GP/FP registers...
Yes, pretty much. Other platforms know how to fetch larger than
word-sized registers using these functions but they do it by using
register offsets in a hypothetical "struct user" as arguments, instead
of indexes. The fact that we pass 30 and 31 to get $30 and $31 really
messes things up when you want the other half of $30.
> Well, certainly fixing ptrace() to work with DSP registers one way or
> another for n32 can wait until we have a relevant piece of silicon and
> I'll sort out the numbering issue as referred to above (1). Please let me
> know whether there is anything else you have had in mind and I'll send a
> new version of the patch shortly.
Nope, I'm otherwise happy. Thanks for your patience.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-03-27 17:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 16:33 Maciej W. Rozycki
2007-12-18 13:42 ` Daniel Jacobowitz
2007-12-18 13:56 ` Nigel Stephens
2007-12-18 15:15 ` Daniel Jacobowitz
2007-12-18 16:06 ` Nigel Stephens
2008-03-19 17:07 ` Maciej W. Rozycki
2008-03-21 18:44 ` Daniel Jacobowitz
2008-03-26 16:59 ` Maciej W. Rozycki
2008-03-26 17:59 ` Daniel Jacobowitz
2008-03-27 17:13 ` Maciej W. Rozycki
2008-03-27 17:46 ` Daniel Jacobowitz [this message]
2008-03-28 17:16 ` Maciej W. Rozycki
2008-03-31 10:50 ` Maciej W. Rozycki
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=20080327174601.GA15198@caradoc.them.org \
--to=drow@false.org \
--cc=chris@mips.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@linux-mips.org \
--cc=macro@mips.com \
/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