Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: gdb-patches@sources.redhat.com
Cc: cagney@redhat.com, kevinb@redhat.com
Subject: [RFA] 32/64 mistake in mips_find_saved_regs
Date: Mon, 05 Aug 2002 22:06:00 -0000	[thread overview]
Message-ID: <3D4F54EA.6CA82E5E@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

Here is a test that should check for stack/register size, not
whether target == mips64.

Fixes four failures in callfuncs.exp, no other regressions.

[-- Attachment #2: patch2.diff --]
[-- Type: text/plain, Size: 1332 bytes --]

2002-08-05  Michael Snyder  <msnyder@redhat.com>

	*  mips-tdep.c (mips_find_saved_regs): Adjust stack according
	to MIPS_SAVED_REGSIZE, not GDB_TARGET_IS_MIPS64.  N32 is not
	MIPS64, but it does save 64 bits worth of register.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.88
diff -p -r1.88 mips-tdep.c
*** mips-tdep.c	1 Aug 2002 23:10:34 -0000	1.88
--- mips-tdep.c	6 Aug 2002 04:32:33 -0000
*************** mips_find_saved_regs (struct frame_info 
*** 1371,1379 ****
       were saved.  */
    reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
  
!   /* The freg_offset points to where the first *double* register
!      is saved.  So skip to the high-order word. */
!   if (!GDB_TARGET_IS_MIPS64)
      reg_position += MIPS_SAVED_REGSIZE;
  
    /* Fill in the offsets for the float registers which float_mask says
--- 1371,1379 ----
       were saved.  */
    reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
  
!   /* The freg_offset points to where the first *double* register is
!      saved.  So skip to the high-order word if saved_reg_size == 4. */
!   if (MIPS_SAVED_REGSIZE == 4)
      reg_position += MIPS_SAVED_REGSIZE;
  
    /* Fill in the offsets for the float registers which float_mask says

             reply	other threads:[~2002-08-06  5:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 22:06 Michael Snyder [this message]
2002-08-06 13:26 ` Andrew Cagney
2002-08-06 16:23   ` Michael Snyder
2002-08-06 17:27     ` Michael Snyder
2002-08-07  8:32       ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D4F54EA.6CA82E5E@redhat.com \
    --to=msnyder@redhat.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox