Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Woody LaRue <larue@cadence.com>
Subject: Re: [PATCH v2] gdb: xtensa: handle privileged registers
Date: Wed, 09 May 2018 16:33:00 -0000	[thread overview]
Message-ID: <CAMo8BfK-nBszjZsdUbfziuu3JmDBemUHNDWyLgBZ+aTNKyZiYA@mail.gmail.com> (raw)
In-Reply-To: <40e66129-0691-2519-00ac-0bc7009c06b6@redhat.com>

On Wed, May 9, 2018 at 7:43 AM, Pedro Alves <palves@redhat.com> wrote:
> Thanks for the updated patch with the rationale in the
> commit log.  That helps.
>
> On 05/07/2018 06:11 PM, Max Filippov wrote:
>> xtensa GDB may be used with both bare-metal and linux-based
>> applications. In case of bare-metal application gdbserver is able to
>> provide information about all CPU registers: both unprivileged and
>> privileged. In case of linux-based application only a small subset of
>> privileged state is available. Currently xtensa GDB only expects
>> unprivileged registers in 'g' packets and it fails to communicate with
>> server that sends both privileged and unprivileged registers.
>>
>> Allow bare-metal xtensa GDB to deal with both privileged and
>> unprivileged registers by initializing tdep->num_regs with the total
>> number of target CPU registers. Keep linux-based xtensa GDB
>> functionality as is by copying tdep->num_nopriv_regs to tdep->num_regs.
>>
>> gdb/
>> 2018-05-07  Max Filippov  <jcmvbkbc@gmail.com>
>>
>>       * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
>>       (xtensa_linux_init_abi): Limit tdep->num_regs by
>>       tdep->num_nopriv_regs.
>>       * xtensa-tdep.c (xtensa_derive_tdep): Calculate
>>       tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
>>       not initialized.
>
> I have a feeling that this would be best address with xml
> target descriptions, but I really don't know enough about
> xtensa to say for sure.  This is OK with me as is.

Thank you. Applied to master.

-- Max


      reply	other threads:[~2018-05-09 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 17:11 Max Filippov
2018-05-09 14:43 ` Pedro Alves
2018-05-09 16:33   ` Max Filippov [this message]

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=CAMo8BfK-nBszjZsdUbfziuu3JmDBemUHNDWyLgBZ+aTNKyZiYA@mail.gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=larue@cadence.com \
    --cc=palves@redhat.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