Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* xtensa: reading privileged special registers
@ 2011-07-17 20:29 Max Filippov
  2011-07-18  1:12 ` Maxim Grigoriev
       [not found] ` <CAC3St3DkgTP_bAbpdSh6n3bVivik1tieUopy-jd-yNrEyE=C1A@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Max Filippov @ 2011-07-17 20:29 UTC (permalink / raw)
  To: Maxim Grigoriev; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-18  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-17 20:29 xtensa: reading privileged special registers Max Filippov
2011-07-18  1:12 ` Maxim Grigoriev
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox