From: John Baldwin <jhb@freebsd.org>
To: gdb-patches@sourceware.org
Cc: Alan Hayward <Alan.Hayward@arm.com>, nd <nd@arm.com>
Subject: Re: [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE
Date: Tue, 04 Apr 2017 17:19:00 -0000 [thread overview]
Message-ID: <4029978.dIfO0XF6y1@ralph.baldwin.cx> (raw)
In-Reply-To: <3C00280E-37C9-4C0A-9DA6-F3B9DB1A6E8F@arm.com>
On Tuesday, April 04, 2017 10:12:39 AM Alan Hayward wrote:
> Max size set to 64bits, which I determined using the files regformats/mips*.dat
>
> Tested on a --enable-targets=all build using make check with board files
> unix and native-gdbserver.
>
> I do not have a MIPS machine to test on.
>
> Ok to commit?
I don't know how much we (GDB) care, but keep in mind that this does mean that
these constants have to be updated as architectures change. In my case I'm
working on a research CPU that extends MIPS with some 128 and 256-bit registers.
This means that in my GDB patches for this processor I will need to bump this
constant explicitly. That's probably not the end of the world, but this approach
of per-arch constants vs a global constant does make that sort of thing slightly
more complex to handle.
> Alan.
>
> 2017-04-04 Alan Hayward <alan.hayward@arm.com>
>
> * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use MIPS_MAX_REGISTER_SIZE.
> (mips_fbsd_collect_reg): Likewise.
> * mips-linux-tdep.c (supply_32bit_reg): Likewise.
> (mips_supply_gregset): Likewise.
> (mips_supply_fpregset): Likewise.
> (mips64_supply_gregset): Likewise.
> (mips64_fill_gregset): Likewise.
> (mips64_fill_fpregset): Likewise.
> * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
> (mips_o32_return_value): Likewise.
> (print_gp_register_row): Likewise.
> * mips-tdep.h (MIPS_MAX_REGISTER_SIZE): Add
>
>
>
> diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c
> index 00fae0ec60ddc9e645d3236efe29f2f9e9ceab5c..cb696f7318a9da176fee2693e484ecf48346712c 100644
> --- a/gdb/mips-fbsd-tdep.c
> +++ b/gdb/mips-fbsd-tdep.c
> @@ -63,7 +63,7 @@ mips_fbsd_supply_reg (struct regcache *regcache, int regnum, const void *addr,
> else
> {
> enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
> - gdb_byte buf[MAX_REGISTER_SIZE];
> + gdb_byte buf[MIPS_MAX_REGISTER_SIZE];
> LONGEST val;
>
> val = extract_signed_integer ((const gdb_byte *) addr, len, byte_order);
> @@ -90,7 +90,7 @@ mips_fbsd_collect_reg (const struct regcache *regcache, int regnum, void *addr,
> else
> {
> enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
> - gdb_byte buf[MAX_REGISTER_SIZE];
> + gdb_byte buf[MIPS_MAX_REGISTER_SIZE];
> LONGEST val;
>
> regcache_raw_collect (regcache, regnum, buf);
This part is ok with me, but I can't approve changes so you will need
additional review from an approver.
--
John Baldwin
next prev parent reply other threads:[~2017-04-04 17:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 10:12 Alan Hayward
2017-04-04 17:19 ` John Baldwin [this message]
2017-04-05 10:27 ` Alan Hayward
2017-04-11 15:37 ` Yao Qi
2017-05-05 8:03 ` [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (1/4) Alan Hayward
2017-05-05 21:44 ` Yao Qi
2017-05-05 8:04 ` [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (2/4) Alan Hayward
2017-05-05 19:51 ` John Baldwin
2017-05-12 8:53 ` Yao Qi
2017-05-16 11:16 ` Alan Hayward
2017-05-22 12:07 ` Yao Qi
2017-05-22 16:05 ` Alan Hayward
2017-05-22 17:15 ` Pedro Alves
2017-05-23 17:49 ` Alan Hayward
2017-05-23 18:30 ` Pedro Alves
2017-05-24 9:08 ` Alan Hayward
2017-05-24 9:29 ` Pedro Alves
[not found] ` <40597975-9458-e9af-8915-9d303bb1ed98@redhat.com>
2017-05-24 10:20 ` Alan Hayward
[not found] ` <d32041ef-9df3-316a-68ca-3fe2a2797539@redhat.com>
2017-05-24 19:45 ` Alan Hayward
2017-05-25 10:46 ` Pedro Alves
2017-05-25 11:43 ` Yao Qi
2017-05-25 11:48 ` Pedro Alves
2017-05-26 8:54 ` Alan Hayward
2017-05-26 10:26 ` Pedro Alves
2017-05-26 15:30 ` Alan Hayward
2017-05-26 15:49 ` Pedro Alves
2017-05-26 16:18 ` Alan Hayward
2017-05-26 16:00 ` John Baldwin
2017-05-05 8:04 ` [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (3/4) Alan Hayward
2017-05-05 21:54 ` Yao Qi
2017-05-05 8:04 ` [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (4/4) Alan Hayward
[not found] ` <434A7317-C19A-4B53-8CB1-C7B4ACEC7D17@arm.com>
2017-06-08 20:27 ` Maciej W. Rozycki
2017-06-09 10:31 ` Alan Hayward
[not found] ` <ebebb23e-e61b-5eff-b666-f2632e554322@redhat.com>
2017-06-09 11:48 ` Maciej W. Rozycki
2017-06-09 12:05 ` Pedro Alves
2017-06-09 13:23 ` Maciej W. Rozycki
2017-06-09 14:29 ` Pedro Alves
2017-06-12 9:09 ` Alan Hayward
2017-06-12 18:11 ` Pedro Alves
2017-06-12 14:29 ` Maciej W. Rozycki
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=4029978.dIfO0XF6y1@ralph.baldwin.cx \
--to=jhb@freebsd.org \
--cc=Alan.Hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@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