This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/11] Add M32R_MAX_REGISTER_SIZE
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>,
- Date: Tue, 11 Apr 2017 10:02:44 +0100
- Subject: Re: [PATCH 5/11] Add M32R_MAX_REGISTER_SIZE
- Authentication-results: sourceware.org; auth=none
- References: <15D6C0CC-388D-4C9D-AC2F-5A924908D09F@arm.com>
Alan Hayward <Alan.Hayward@arm.com> writes:
> +/* Big enough to hold the size of the largest register in bytes. */
> +#define M32R_MAX_REGISTER_SIZE 4
> +
> #endif /* m32r-tdep.h */
> diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
> index 40f29d343b91f254cce2dd783553795c9c990eff..cb53a352b2d47068ad7cd5dacd3325d66bd77964 100644
> --- a/gdb/m32r-tdep.c
> +++ b/gdb/m32r-tdep.c
> @@ -677,7 +677,7 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
> enum type_code typecode;
> CORE_ADDR regval;
> gdb_byte *val;
> - gdb_byte valbuf[MAX_REGISTER_SIZE];
> + gdb_byte valbuf[M32R_MAX_REGISTER_SIZE];
valbuf is only used for argument registers, r0 - r3. Can you rename
M32R_MAX_REGISTER_SIZE with M32R_ARG_REGISTER_SIZE? and move its
definition into m32r-tdep.c.
/* The size of argument registers (r0 - r3) in bytes. */
#define M32R_ARG_REGISTER_SIZE 4
OK with the change.
--
Yao (齐尧)