public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Pierre Langlois <pierre.langlois@arm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [AArch64] Mark single precision pseudo registers unavailable if invalid
Date: Wed, 15 Jul 2015 14:01:00 -0000	[thread overview]
Message-ID: <86mvyxjzah.fsf@gmail.com> (raw)
In-Reply-To: <1436957554-1403-1-git-send-email-pierre.langlois@arm.com>	(Pierre Langlois's message of "Wed, 15 Jul 2015 11:52:34 +0100")

Pierre Langlois <pierre.langlois@arm.com> writes:

> It turns out GDB does not check if S registers are valid before returning
> a value for them.  It should return <unavailable> in this case.

Yes, your fix is correct, however ...

>
> Thanks,
> Pierre
>
> gdb/ChangeLog:
>
> 	* aarch64-tdep.c (aarch64_pseudo_read_value): Mark S register as
> 	unavailable if invalid.

... when I read your patch, I am wondering why does aarch64 implement
gdbarch method pseudo_register_read_value rather than
pseudo_register_read.  If we implement the pseudo_register_read, the
caller will mark the value unavailable according to its return value.
pseudo_register_read_value was added to handle partially available
registers by https://sourceware.org/ml/gdb-patches/2011-07/msg00351.html
but I don't think of a case that some aarch64 register is partially
available.  Maybe, another fix to this problem is to implement
pseudo_register_read instead of pseudo_register_read_value.

-- 
Yao (齐尧)

  reply	other threads:[~2015-07-15 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 10:53 Pierre Langlois
2015-07-15 14:01 ` Yao Qi [this message]
2015-07-15 14:41   ` Yao Qi
2015-07-16  9:09     ` Pierre Langlois

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=86mvyxjzah.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.langlois@arm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).