This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 10/11] Add XTENSA_MAX_REGISTER_SIZE


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 (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]