Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Maxim Grigoriev <maxim2405@gmail.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: gdb@sourceware.org, Marc Gauthier <marc@tensilica.com>
Subject: Re: xtensa: reading privileged special registers
Date: Mon, 18 Jul 2011 01:12:00 -0000	[thread overview]
Message-ID: <CAC3St3B5jmxTYGV4bZ2GU4G0CX4_sPi0Adu9aBSZvyKvGvDyFw@mail.gmail.com> (raw)
In-Reply-To: <201107180028.54700.jcmvbkbc@gmail.com>

Hello Max,

Please, help us to precisely identify what exactly do you experience
by answering some questions:

1) Did you apply a source overlay for your specific hardware ?
    Xtensa is a configurable and expendable architecture. It's impossible
    to maintain the data base of all supported Xtensa processors
    because it's potentially infinite. Many Tensilica customers
    keep their hardware secret even from Tensilica, but all the tools
    still work. So for every instance of Xtensa processor, a set of source
    overlay files have to be provided. By default, so-called Xtensa FSF
    processor (we call it config) is supported by FSF tools. It is
    checked-in into FSF tree.

2) What Xtensa processor do you work with ( if it's not a secret ) ?
    What privileged registers do you have problems with ?

Thanks,
-- Maxim

On Sun, Jul 17, 2011 at 1:28 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hello.
>
> I'm trying to read privileged SRs from a remote gdbserver by the gdb configured for the elf target. All gdb versions that I've tried (6.8, 7.2 and 7.3) return 0 for those registers.
> Running gdb under gdb showed that reading those registers ends inside xtensa_pseudo_register_read in the following block:
>
> [...]
>  /* We have to find out how to deal with priveleged registers.
>     Let's treat them as pseudo-registers, but we cannot read/write them.  */
>
>  else if (regnum < gdbarch_tdep (gdbarch)->a0_base)
>    {
>      buffer[0] = (gdb_byte)0;
>      buffer[1] = (gdb_byte)0;
>      buffer[2] = (gdb_byte)0;
>      buffer[3] = (gdb_byte)0;
>    }
> [...]
>
> The question is is there any reason we cannot read/write them with the elf target?
> What would be the right way to make privileged SRs available to gdb?
>
> Thanks.
> -- Max
>


  reply	other threads:[~2011-07-18  1:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 20:29 Max Filippov
2011-07-18  1:12 ` Maxim Grigoriev [this message]
     [not found] ` <CAC3St3DkgTP_bAbpdSh6n3bVivik1tieUopy-jd-yNrEyE=C1A@mail.gmail.com>
2011-07-18  2:00   ` Marc Gauthier
2011-07-18  8:38     ` Max Filippov
2011-07-18  8:20   ` Max Filippov

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=CAC3St3B5jmxTYGV4bZ2GU4G0CX4_sPi0Adu9aBSZvyKvGvDyFw@mail.gmail.com \
    --to=maxim2405@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=marc@tensilica.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