This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Another patch to aix-thread.c
On Jul 22, 3:43pm, Andrew Cagney wrote:
> > + regcache_collect (regno, iar);
> > + regcache_collect (regno + 1, msr);
>
> Suggest ``regno + 0''. Otherwize gdb_indent.sh will mess up your nice
> alignment.
I agree that this is a good idea. However, I'm about to make some
changes which will obviate the use of regno + N. I.e, I'm about to
transform the above into the following:
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
...
regcache_collect (PC_REGNUM, iar);
regcache_collect (tdep->ppc_ps_regnum, msr);
...
This will also eliminate the use of FIRST_UISA_SP_REGNUM from the
file. While I'm at it, I'll also look at eliminating this macro
from rs6000-nat.c which means that it can be eliminated from GDB
entirely.
(It bothered me that aix-thread.c was making assumptions about the
order of the registers. Also, it was more difficult to verify the
correctness by having expressions of the form "regno + small_offset".
I was having to look elsewhere to verify that the specified offset
was correct.)
Kevin