This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/11] Add XTENSA_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:23:03 +0100
- Subject: Re: [PATCH 10/11] Add XTENSA_MAX_REGISTER_SIZE
- Authentication-results: sourceware.org; auth=none
- References: <A9D0B291-CF87-44EB-9B48-E1E66B7578D9@arm.com>
Alan Hayward <Alan.Hayward@arm.com> writes:
> @@ -559,7 +559,7 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch,
> && (regnum >= gdbarch_tdep (gdbarch)->a0_base)
> && (regnum <= gdbarch_tdep (gdbarch)->a0_base + 15))
> {
> - gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE);
> + gdb_byte *buf = (gdb_byte *) alloca (XTENSA_MAX_REGISTER_SIZE);
> enum register_status status;
>
> status = regcache_raw_read (regcache,
> @@ -655,7 +655,7 @@ xtensa_pseudo_register_write (struct gdbarch *gdbarch,
> && (regnum >= gdbarch_tdep (gdbarch)->a0_base)
> && (regnum <= gdbarch_tdep (gdbarch)->a0_base + 15))
> {
> - gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE);
> + gdb_byte *buf = (gdb_byte *) alloca (XTENSA_MAX_REGISTER_SIZE);
>
> regcache_raw_read (regcache,
> gdbarch_tdep (gdbarch)->wb_regnum, buf);
The "buf" can be removed by using regcache_raw_read_unsigned.
--
Yao (齐尧)