This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] sh-tdep.c: Fix erroneus register skipping in sh_print_registers_info
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 8 Mar 2004 11:18:24 +0100
- Subject: Re: [RFA] sh-tdep.c: Fix erroneus register skipping in sh_print_registers_info
- References: <20040218135942.GA29776@cygbert.vinschen.de> <16456.65466.312420.773141@localhost.redhat.com>
- Reply-to: gdb-patches at sources dot redhat dot com
On Mar 5 17:31, Elena Zannoni wrote:
> Corinna Vinschen writes:
> > Hi,
> >
> > the below patch fixes a long standing bug in sh_print_registers_info.
> > When the print loop encounters a float type register and fpregs is
> > not set, then the loop counter (regnum) is not just incremented by
> > one, but instead it's incremented by FP_LAST_REGNUM - FP0_REGNUM.
> >
> > The problem with this is, that FPUL is also a float type register.
> > FPUL is two register numbers below FP0_REGNUM. So when the loop
> > arrives at FPUL, it skips the next 16 registers. The next evaluated
> > register then (fr14) is still a float type register, so the loop
> > skips again 16 registers. As a result, the register set is never
> > printed completely when calling `info registers'.
> >
> > The below patch fixes that and shortens the code slightly by using
> > a "for" loop instead of "while".
> >
> >
> > Corinna
> >
> >
> > ChangeLog:
> >
> > * sh-tdep.c (sh_print_registers_info): Use for loop.
> > Don't skip multiple registers when a float register is encountered.
> >
>
> ok
Thanks, applied.
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.