From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] MIPS: Handle the DSP registers for bare metal
Date: Fri, 19 Dec 2014 15:07:00 -0000 [thread overview]
Message-ID: <54943F13.30307@redhat.com> (raw)
In-Reply-To: <87egrvrczm.fsf@codesourcery.com>
On 12/19/2014 01:22 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> The proper solution for this issue is to decouple GDB's internal
>> register numbers from the target's g/G packet layout, which is exactly
>> what happens when you have a description -- GDB uses the offsets found
>> in the target description. And you're touching code that is parsing a
>> description, so the real issue should be in the target description.
>
> So, these dsp registers on bare metal target have different layout from
> them on linux target, the stub should send the org.gnu.gdb.mips.dsp
> feature with some different "regnum", is that correct? On linux target,
> gdbserver sends
>
> <feature name="org.gnu.gdb.mips.dsp">
> <reg name="hi1" bitsize="32" regnum="72"/>
> ...
> </feature>
>
> on bare metal target, the stub should send
>
> <feature name="org.gnu.gdb.mips.dsp">
> <reg name="hi1" bitsize="32" regnum="73"/>
> ...
> </feature>
>
> is it right?
>
That should work. "regnum=" is really only needed to force gaps. If
you include extra registers in the description, GDB will display them.
So you could also do:
<feature name="org.gnu.gdb.mips.dsp">
<reg name="acx" bitsize="32"/>
<reg name="hi1" bitsize="32"/>
<reg name="lo1" bitsize="32"/>
<reg name="acx1" bitsize="32"/>
<reg name="hi2" bitsize="32"/>
<reg name="lo2" bitsize="32"/>
<reg name="acx2" bitsize="32"/>
<reg name="hi3" bitsize="32"/>
<reg name="lo3" bitsize="32"/>
<reg name="acx2" bitsize="32"/>
<reg name="dspctl" bitsize="32"/>
</feature>
Thanks,
Pedro Alves
next prev parent reply other threads:[~2014-12-19 15:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 13:26 Yao Qi
2014-12-18 17:28 ` Pedro Alves
2014-12-19 3:55 ` Yao Qi
2014-12-19 11:18 ` Pedro Alves
2014-12-19 13:22 ` Yao Qi
2014-12-19 15:07 ` Pedro Alves [this message]
2014-12-30 1:15 ` Maciej W. Rozycki
2014-12-30 10:12 ` Pedro Alves
2014-12-30 12:11 ` Maciej W. Rozycki
2015-01-05 11:40 ` Pedro Alves
2015-01-07 15:11 ` 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=54943F13.30307@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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