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]

Re: [COMMIT] Update s390-tdep.c to gdb_byte changes


Mark Kettenis wrote:

> Great.  There are some casts in s390_return_value() that can go now,
> and s390_breakpoint_from_pc() should also be converted to use gdb_byte
> instead of unsigned char.  Would be great if you could do that too.

Sorry for missing those.  I've now applied the following patch, too.

Bye,
Ulrich


ChangeLog:

	* s390-tdep.c (s390_return_value): Remove unnecessary casts.
	(s390_breakpoint_from_pc): Change type of return value and
	'breakpoint' to const gdb_byte *.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.144
diff -c -p -r1.144 s390-tdep.c
*** gdb/s390-tdep.c	16 May 2005 10:55:03 -0000	1.144
--- gdb/s390-tdep.c	16 May 2005 12:20:37 -0000
*************** s390_return_value (struct gdbarch *gdbar
*** 2726,2733 ****
  	  else if (length == 2*word_size)
  	    {
  	      regcache_cooked_write (regcache, S390_R2_REGNUM, in);
! 	      regcache_cooked_write (regcache, S390_R3_REGNUM,
! 				     (const char *)in + word_size);
  	    }
  	  else
  	    internal_error (__FILE__, __LINE__, _("invalid return type"));
--- 2726,2732 ----
  	  else if (length == 2*word_size)
  	    {
  	      regcache_cooked_write (regcache, S390_R2_REGNUM, in);
! 	      regcache_cooked_write (regcache, S390_R3_REGNUM, in + word_size);
  	    }
  	  else
  	    internal_error (__FILE__, __LINE__, _("invalid return type"));
*************** s390_return_value (struct gdbarch *gdbar
*** 2759,2766 ****
  	  else if (length == 2*word_size)
  	    {
  	      regcache_cooked_read (regcache, S390_R2_REGNUM, out);
! 	      regcache_cooked_read (regcache, S390_R3_REGNUM,
! 				    (char *)out + word_size);
  	    }
  	  else
  	    internal_error (__FILE__, __LINE__, _("invalid return type"));
--- 2758,2764 ----
  	  else if (length == 2*word_size)
  	    {
  	      regcache_cooked_read (regcache, S390_R2_REGNUM, out);
! 	      regcache_cooked_read (regcache, S390_R3_REGNUM, out + word_size);
  	    }
  	  else
  	    internal_error (__FILE__, __LINE__, _("invalid return type"));
*************** s390_return_value (struct gdbarch *gdbar
*** 2778,2787 ****
  
  /* Breakpoints.  */
  
! static const unsigned char *
  s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
  {
!   static unsigned char breakpoint[] = { 0x0, 0x1 };
  
    *lenptr = sizeof (breakpoint);
    return breakpoint;
--- 2776,2785 ----
  
  /* Breakpoints.  */
  
! static const gdb_byte *
  s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
  {
!   static const gdb_byte breakpoint[] = { 0x0, 0x1 };
  
    *lenptr = sizeof (breakpoint);
    return breakpoint;


-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


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