This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Removal of uses of MAX_REGISTER_SIZE
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 3 Feb 2017 10:59:53 +0000
- Subject: Re: [PATCH] Removal of uses of MAX_REGISTER_SIZE
- Authentication-results: sourceware.org; auth=none
- References: <7CF07197-4FED-4970-BB4B-2FE828E29A63@arm.com> <45e3a5e1-a9aa-1bc0-5d08-526b89fc458e@redhat.com> <20170201124123.GA27498@E107787-LIN> <dcfc96df-1917-8371-9069-4276dc3141fa@redhat.com> <20170202094012.dge4r6rsl2skdrii@adacore.com> <D06782D9-66E9-4194-86C4-275341686DB8@arm.com> <20170203102819.GA11916@E107787-LIN>
On 02/03/2017 10:28 AM, Yao Qi wrote:
> I don't think we have to replace all MAX_REGISTER_SIZE with std::vector.
> MAX_REGISTER_SIZE is mostly used in arch-dependent code (*-tdep.c
> and *-nat.c), where the register size or max register size is known. For
> example, MAX_REGISTER_SIZE is used only once in arm-tdep.c, and
> it can be replaced with FP_REGISTER_SIZE, because 'buf' is to get the
> contents for FPA register. Similarly, MAX_REGISTER_SIZE is used three
> times in aarch64-tdep.c, all of them can be repalced by V_REGISTER_SIZE.
> Also, MAX_REGISTER_SIZE can be replaced by
> I386_MAX_REGISTER_SIZE in i386-tdep.c. I would like to examine the
> usages of MAX_REGISTER_SIZE in each target-dependent code, and
> replace MAX_REGISTER_SIZE with known constants as much as we can.
> I don't think anyone has objections on replacing one constant
> MAX_REGISTER_SIZE with other smaller constants :)
>
> Then, let us discuss how to remove MAX_REGISTER_SIZE from
> arch-independent code after all above is done.
>
+1.
Thanks,
Pedro Alves