This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/11] Add BFIN_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>, nd <nd at arm dot com>
- Date: Wed, 05 Apr 2017 11:28:02 +0100
- Subject: Re: [PATCH 7/11] Add BFIN_MAX_REGISTER_SIZE
- Authentication-results: sourceware.org; auth=none
- References: <EDDA588D-0125-4A03-AFD3-51DADFE0D4DF@arm.com>
Alan Hayward <Alan.Hayward@arm.com> writes:
> diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
> index 3df1ba387a323dc6827b1189432f8877d1833184..9b45633cab15b8e0adb0d51a2fa650dc2bc6339b 100644
> --- a/gdb/bfin-tdep.c
> +++ b/gdb/bfin-tdep.c
> @@ -689,7 +689,7 @@ static enum register_status
> bfin_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
> int regnum, gdb_byte *buffer)
> {
> - gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE);
> + gdb_byte *buf = (gdb_byte *) alloca (BFIN_MAX_REGISTER_SIZE);
Why don't you do "gdb_byte buf[4];"? It is only for CC register which
is 32-bit.
> enum register_status status;
>
> if (regnum != BFIN_CC_REGNUM)
> @@ -710,7 +710,7 @@ static void
> bfin_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
> int regnum, const gdb_byte *buffer)
> {
> - gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE);
> + gdb_byte *buf = (gdb_byte *) alloca (BFIN_MAX_REGISTER_SIZE);
--
Yao (齐尧)