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: Checked in: [RFA] read_frame_register_value and big endian arches


> This fixes the regressions on SPU for me.  Does this work for the
> platforms where you were seeing issues as well?

Thanks for doing this, Ulrich. I tested the patch on x86_64-linux
for kicks, but also on sparc-elf and avr, where the problems where
detected, and no regression.

> ChangeLog:
> 
> 	* findvar.c (read_frame_register_value): Respect value_offset
> 	of the register value.  Remove big-endian special case.

Just one tiny detail:

> +  struct gdbarch *gdbarch = get_frame_arch (frame);
>    int offset = 0;
> +  int reg_offset = value_offset (value);
>    int regnum = VALUE_REGNUM (value);
>    const int len = TYPE_LENGTH (check_typedef (value_type (value)));
     ^^^^^

I had to remove the const, since we are decrementing len each time
we read contents from a register...

-- 
Joel


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