Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <alan.hayward@arm.com>
To: Yao Qi <qiyaoltc@gmail.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/8] AARCH64 SVE: Increse max register sizes
Date: Tue, 13 Dec 2016 10:05:00 -0000	[thread overview]
Message-ID: <D4757157.1649A%alan.hayward@arm.com> (raw)
In-Reply-To: <20161212181032.GC25542@E107787-LIN>

I’ve just noticed I forgot to add a changelog for all of my patches.
Apologies - I’ll add them for any V2 versions (or happy to repost all of
them again with changelogs if required).

On 12/12/2016 18:10, "Yao Qi" <qiyaoltc@gmail.com> wrote:

>On 16-12-05 12:26:24, Alan Hayward wrote:
>> This is part of a series adding AARCH64 SVE support to gdb and
>>gdbserver.
>> 
>> In SVE the maximum size of a variable-length vector register is 256
>>bytes,
>> four
>> times the current maximum size currently supported in gdb. This patch
>> increases
>> the max register size and max gdbserver buffer size accordingly.
>
>Joel expressed the willingness that we should make MAX_REGISTER_SIZE
>gdbarch specific last time when it was changed from 32 to 64.
>https://sourceware.org/ml/gdb-patches/2010-09/msg00245.html
>I think we should make MAX_REGISTER_SIZE gdbarch specific, or stop
>using it at all.

I’m happy to do this if that’s what people want. I avoided doing it
because I
didn’t want to subtly break something and it’s going to be quite a large
change -
I might submit it a set of patches by itself.

>
>> 
>> Alternatively, I could add a target variable using gdbarch.c, however
>> there are
>> 80+ static arrays within the code using the value, which would all need
>> replacing with mallocs/frees.
>
>We can use alloca to allocate memory on stack, and we can get the
>size of a register if gdbarch and regnum is available.  For example,
>we can replace MAX_REGISTER_SIZE with register_size in
>xtensa_pseudo_register_read this way,
>
>      gdb_byte *buf = (gdb_byte *) alloca (register_size (gdbarch,
>regnum));
>
>This can be used many places to replace MAX_REGISTER_SIZE.  Hopefully,
>this may get rid of the use of MAX_REGISTER_SIZE except the uses in
>python/py-unwind.c and remote.c.  We may replace array
>data[MAX_REGISTER_SIZE]
>with pointer in struct cached_reg and struct reg_info, and allocate memory
>dynamically, or use std::vector if it helps.
>

I’ll look into using this.


Thanks for the review.


Alan.



  reply	other threads:[~2016-12-13 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 12:26 Alan Hayward
2016-12-12 18:11 ` Yao Qi
2016-12-13 10:05   ` Alan Hayward [this message]
2016-12-13 11:48     ` Yao Qi
2016-12-13 11:53       ` Joel Brobecker

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=D4757157.1649A%alan.hayward@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.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