This is the mail archive of the gdb-patches@sources.redhat.com 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]

PATCH: S/390: always cache saved pc in frame extra info



2001-12-20  Jim Blandy  <jimb@redhat.com>

	* s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC
	out of the return address register, cache that in the frame's
	extra info, just as if we'd gotten it from the saved regs array;
	that way, it's not a lie to set the saved_pc_valid flag.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.33
diff -c -r2.33 s390-tdep.c
*** gdb/s390-tdep.c	2001/12/20 03:25:51	2.33
--- gdb/s390-tdep.c	2001/12/20 07:41:37
***************
*** 956,973 ****
    if (fi->extra_info)
      {
        fi->extra_info->saved_pc_valid = 1;
!       if (fi->extra_info->good_prologue)
! 	{
! 	  if (fi->saved_regs[S390_RETADDR_REGNUM])
! 	    {
! 	      return (fi->extra_info->saved_pc =
! 		      ADDR_BITS_REMOVE (read_memory_integer
! 					(fi->saved_regs[S390_RETADDR_REGNUM],
! 					 S390_GPR_SIZE)));
! 	    }
!           else
!             return read_register (S390_RETADDR_REGNUM);
! 	}
      }
    return 0;
  }
--- 960,975 ----
    if (fi->extra_info)
      {
        fi->extra_info->saved_pc_valid = 1;
!       if (fi->extra_info->good_prologue
!           && fi->saved_regs[S390_RETADDR_REGNUM])
!         fi->extra_info->saved_pc
!           = ADDR_BITS_REMOVE (read_memory_integer
!                               (fi->saved_regs[S390_RETADDR_REGNUM],
!                                S390_GPR_SIZE));
!       else
!         fi->extra_info->saved_pc
!           = ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
!       return fi->extra_info->saved_pc;
      }
    return 0;
  }


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