This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Bug found in gdb-4.16 for target h8300.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Magdalena Raltcheva <magdar at codan dot com dot au>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 07 Mar 2002 13:03:11 -0500
- Subject: Re: Bug found in gdb-4.16 for target h8300.
- References: <3C4CF1BB.58C39927@codan.com.au>
Hello,
Could you please see if this problem occures in a more current gdb (see
http://sources.redhat.com/gdb/current). If it does the can I suggest
fileing a bug report (http://sources.redhat.com/gdb/bugs).
Andrew
> Hi,
>
> There is a bug in file h8300-tdep.c function 'examine_prologue',
> when is checking for push multiple instructions as follows:
>
>
> /* Now check for push multiple insns. */
> if (insn_word == 0x0110 || insn_word == 0x0120 || insn_word ==
> 0x0130)
> {
> int count = ((insn_word >> 4) & 0xf) + 1;
> int start, i;
>
> ip = next_ip;
> next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn_word);
> start = insn_word & 0x7;
>
> for (i = start; i <= start + count; i++)
> {
> fsr->regs[i] = after_prolog_fp + auto_depth;
> auto_depth += 4;
> }
> }
>
> The 'for' statement should be :
>
> for (i = start; i < start + count; i++)
>
> This bug will cause frame registers to be wrong and 'backtrace'
> and show registers in gdb will be wrong.
>
> I've tested the fix for Hitachi HS2000 series microcontrollers
> and it works.
> For Hitachi H8300 series it is not a problem as they don't have
> multiple pop/push instructions.
>
> Regards,
> Magda Raltcheva
>
>
>